Skip to main content
Glama

switch_agent

Switch the active agent for subsequent tool calls; loads it from disk if needed. Requires security.agent_switch_enabled on the current agent (override with ELISYM_ALLOW_AGENT_SWITCH=1 for CI) to prevent unauthorized switches.

Instructions

Switch the active agent. Loads from disk if not already loaded. Gated by security.agent_switch_enabled on the CURRENTLY ACTIVE agent - the one being switched away from, not the target - so a prompt-injected instruction cannot hop to a different wallet (the ELISYM_ALLOW_AGENT_SWITCH=1 env var overrides for CI). All subsequent tool calls will use this agent.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.37
  2. Removedv0.1.36
  3. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations provided, the description carries the full burden, and it does so thoroughly. It discloses the disk-loading behavior, the security gate based on the currently active agent rather than the target, the CI environment override, and the persistent effect on subsequent tool calls. This is rich, non-obvious behavioral context that an agent needs before invoking the tool.

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

Conciseness5/5

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

Every sentence earns its place: the first states the core action, the second explains loading, the third covers critical security semantics, and the fourth clarifies downstream impact. The most important information is front-loaded, and there is no filler or repetition.

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 single-parameter tool with no annotations and no output schema, the description is remarkably complete. It explains what the tool does, how the parameter is resolved, the security constraint, the CI override, and the persistent effect on future calls. Nothing essential is missing for an agent to select and invoke it correctly.

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?

The schema provides only a required 'name' string with 0% description coverage, so the description must compensate. It does by implying that 'name' identifies the agent to switch to and that this agent may be loaded from disk. It does not explicitly say the name must match an existing configured agent, but for a single obvious parameter, this is adequate guidance.

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 description opens with 'Switch the active agent,' a specific verb and resource that clearly identifies the tool's function. It distinguishes itself from sibling tools like list_agents or create_agent by focusing on changing the active runtime agent rather than managing or querying agents.

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

Usage Guidelines4/5

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

The description makes the usage context clear: call this tool to change which agent will handle subsequent tool calls, with the explicit statement 'All subsequent tool calls will use this agent.' It also notes the security gating and CI override, which clarifies when it may be blocked, though it does not name alternative tools or explicit when-not-to-use scenarios.

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