Skip to main content
Glama

workspace_switch

Switch the workspace THIS MCP session works in. Pass exactly one of workspace_id or slug (find them via workspace.list). Takes effect on the very next tool call — no MCP reconnect, no new API key. The switch is scoped to the current MCP session (the response says scope: session), or, for a client that sends no MCP session id, to that client (scope: client: every conversation of that client on this key moves together). Other sessions using the same API key are not affected, and the key's own workspace stays the default for new sessions. Sequential checkpoint: do not parallelize tool calls across a switch — calls already in flight when the switch commits will run against the previous workspace. Keys created with workspace_locked=true refuse to switch in either scope (they are pinned to their workspace); use a key belonging to the target workspace instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
slugNoWorkspace slug to switch to. Resolved within the caller's memberships, so cross-tenant slug collisions are not possible. Mutually exclusive with `workspace_id`.
workspace_idNoNumeric workspace id to switch to. Mutually exclusive with `slug`.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added
  2. Removed
  3. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the annotations (which only say non-readonly, non-idempotent, non-destructive). It discloses that the switch takes effect on the next call with no reconnect, that other sessions on the same key are unaffected, that the key's default workspace is preserved, that in-flight calls run against the previous workspace, and that locked keys are refused.

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?

The core action is front-loaded and each sentence carries information (scoping, effect timing, key behavior, sequencing, locked keys). It is dense and fairly long, but the length is justified by the intricacy of session/client scope semantics rather than padding.

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 no output schema and minimal annotations, the description carries the full burden and does so: it covers effect timing, scope, side effects on other sessions, error conditions (locked keys), and even mentions the response's scope field. An agent has everything needed to invoke it correctly.

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

Parameters3/5

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

Schema description coverage is 100%, with both slug and workspace_id fully documented including mutual exclusivity and slug resolution. The description reinforces the 'exactly one' requirement, which is mildly useful, but adds no syntax or format detail beyond the schema, so the baseline 3 is appropriate.

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+resource (switch the workspace this MCP session works in) and scopes it precisely to the session. The name alone could be ambiguous against siblings like workspace_current or workspace_list, but the description immediately clarifies what it changes and at what scope.

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 routes the agent to workspace.list to obtain ids, states the exactly-one-of constraint, and gives concrete when-not guidance: workspace_locked keys refuse to switch, so use a key belonging to the target workspace instead. It also warns not to parallelize calls across a switch.

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.