Skip to main content
Glama

switch_workspace

Idempotent

Make the connector act in another of the user's workspaces, by its id from list_workspaces. Without confirm:true it returns a preview naming the workspace, the user's role there and its write and AI-spend switches, and changes nothing. It changes only which workspace the user's connector uses, for every assistant connected with the account, until the next switch; it changes no workspace data and works even where write actions are off or the plan has lapsed. Every later call reads and writes in the new workspace, under the user's role there and that workspace's own plan and switches.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "workspaceId": "<workspaceId>"
    },
    "name": "switch_workspace"
  }
}

Input Schema

NameRequiredDescriptionDefault
confirmNoSet true to switch. Omit for a preview. With confirm:true, also pass the preview's previewToken.
workspaceIdYesThe id of one of the user's workspaces, from list_workspaces.
previewTokenNoWith confirm:true: the previewToken from this tool's preview (valid 15 minutes, once, for exactly the previewed arguments).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • removedInput schema / additionalProperties
      Removed value: -false
  2. Changed1 schema field changed
    • changedInput schema / properties / workspaceId / description
      Previous value: -"The id of one of your workspaces, from list_workspaces."New value: +"The id of one of the user's workspaces, from list_workspaces."
  3. First observed

TDQS

A4.8/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Goes well beyond the annotations: it discloses that a confirm-less call returns a preview naming the workspace and its switches, that the change affects every assistant connected with the account until the next switch, that no workspace data is altered, and that it works even when write actions are off or the plan has lapsed. This is unusually rich behavioral context for a non-destructive mutation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loads the action, then layers preview behavior, scope, and persistence. It is a dense single paragraph but every sentence adds distinct information; only minor tightening would help.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With annotations, full schema coverage, and no output schema, the description covers the preview/confirm mechanics, scope of the change, safety, and effect on subsequent calls. Nothing an agent needs to invoke it correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is already 100%, so the schema documents confirm, workspaceId, and previewToken. The description still adds value by explaining the preview→previewToken→confirm flow as a sequence, though individual parameter meanings are largely redundant with the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (make the connector act) and resource (another of the user's workspaces), and points to list_workspaces for the id. An agent can immediately tell this switches the active workspace.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly describes the when: pass the workspace id from list_workspaces, and omit confirm for a preview first. It also explains the confirm:true path, so the two-step calling pattern is unambiguous.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources