MCP Tools

get_active_workspace

Returns the workspace of the Relay window you used last.

Overview

Each Relay window shows its own workspace, so MCP has no current workspace. When you ask an agent to work in "the workspace I'm in", it calls get_active_workspace and passes the result's workspaceId to the tools that take one, such as import_collection and add_draft.

The tool takes no arguments.

Parameters

None.

Return Value

{
  "workspaceId": "7D1E6C2A-4F0B-4C55-9A57-3B8E2F1D9C40",
  "name": "Orders API",
  "activeEnvironmentId": "C3A9F0E2-1B7D-4E8A-8F21-6D5C0B9A7E13",
  "activeEnvironment": "Staging",
  "workspaceCount": 3,
  "isFallback": false,
  "location": "relay",
  "readOnly": false
}

Prop

Type

Discussion

The workspace is the one shown in the Relay window that was last the key window, and it's remembered when Relay quits. When isFallback is true, the agent should confirm the workspace with you before writing to it.

When readOnly is true or unavailable is present, tools that write to the workspace return an error until you fix its files or locate it in Relay.

See Also