Skip to main content
Glama

switch_tenant

DestructiveIdempotent

Act inside another tenant from now on — same connection, same key. Use it ON YOUR OWN, without asking, whenever the task belongs to another tenant (its company, customer, project, module or connected system such as Support-AI-ze/TenderAIze lives there — see list_my_tenants and the server instructions); say in one sentence that you switched, and switch back when done. Required: tenant_id, or null/omitted to RETURN to your own tenant (that direction always works and is never refused). The permission is re-checked on EVERY later call, not just here, so a revoked delegation takes effect immediately. IMPORTANT: module tools differ per tenant, and your client caches the tool list from when it connected — after switching, a module tool of the other tenant will answer with an explanation rather than silently failing. From a Dev-Agent session the switch applies to THIS session only; other sessions on the same key stay where they are. agent_id: the agent to act as in the target tenant (uuid from that tenant's list_agents), or 'none' for no agent. Omitted: in a foreign tenant no agent (your session's agent belongs to your home tenant); back home, your session's agent again.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "switch_tenant"
  }
}

Input Schema

NameRequiredDescriptionDefault
agent_idNoAgent in the target tenant to act as, or "none". Omit to use the session's own agent where it exists.
tenant_idNoID of the tenant

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / tenant_id / description
      Added value: +"ID of the tenant"
  2. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Beyond the annotations, it discloses that permissions are re-checked on every subsequent call, that revoked delegation takes effect immediately, that the client's cached tool list means foreign module tools will return an explanation instead of silently failing, and that a Dev-Agent switch is scoped to this session only. Those are non-obvious behaviors an agent could not infer from readOnlyHint/destructiveHint/idempotentHint alone.

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?

It is front-loaded with the action and the autonomy directive, and nearly every sentence carries operational information. However, it is dense and relies on long parenthetical clauses (tenant examples, session scoping), which makes the agent_id semantics harder to extract on a first pass.

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?

For a stateful context-switch tool with no output schema, the definition covers the return path, permission re-validation, tool-cache staleness, session scoping, and agent selection defaults. Nothing needed to call it correctly appears to be missing.

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

Parameters5/5

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

Schema coverage is already 100%, but the description adds real meaning: tenant_id null/omitted is a distinct 'return home' direction that always succeeds, and agent_id 'none' vs omitted have different outcomes depending on whether the target is foreign or home. That distinction is not fully captured by the schema's one-line agent_id note.

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?

The definition opens with a specific verb and effect: 'Act inside another tenant from now on — same connection, same key.' It makes clear this is a context/identity switch rather than a read of tenant data, which separates it from siblings like list_my_tenants or get_tenant_rules.

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?

It explicitly says when to use it ('whenever the task belongs to another tenant... its company, customer, project, module or connected system'), that it should be invoked autonomously without asking, that the switch should be announced in one sentence, and that it should be reversed when done. It also points to list_my_tenants as the discovery alternative.

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.