Skip to main content
Glama

Route to a persona

route_and_load

Route to a specialist. Call only for initial selection or a needed specialization change; keep the active role locally on continuations. Pass protocol_version=2 and current_persona. Returns separate instruction blocks.

Instructions

Route to a specialist. Call only for initial selection or a needed
specialization change; keep the active role locally on continuations. Pass
protocol_version=2 and current_persona. Returns separate instruction blocks.
ROUTE_REQUIRED needs get_agent_context with the same version and descriptor.
Explicit known roles can be loaded directly. Pass workspace, your working
directory: the first SUCCESS or NO_CHANGE of this session in a workspace carries
its repository context in repo_context, and a workspace outside this session's
grant carries the workspace_mismatch report there instead of a description.

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": {
      "query": "<query>"
    },
    "name": "route_and_load"
  }
}

Input Schema

NameRequiredDescriptionDefault
queryYesThe user request to route.
workspaceNoAbsolute path of your working directory, the project this session works in. Pass it whenever you have one. It never widens this session's grant: over HTTP the workspace registered for the connection decides, and over stdio it is checked against the client's own MCP roots unless this session's root is already pinned, when it is ignored. Each tool's description says what it does with a path that grant does not cover.
chat_historyNoOptional relevant earlier conversation facts, as a JSON array of strings.
current_personaNoThe `persona` object of the last SUCCESS/NO_CHANGE, copied verbatim; omit or null on first activation. All 7 keys: agent, activation_id, bundle_revision (64 hex characters), scope, skills_loaded, implants_loaded, rules_loaded.
protocol_versionNoPersona protocol version; always 2.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv26.10.18
    • addedInput schema / properties / workspace
      Added value: +{
      +  "default": null,
      +  "description": "Absolute path of your working directory, the project this session works in. Pass it whenever you have one. It never widens this session's grant: over HTTP the workspace registered for the connection decides, and over stdio it is checked against the client's own MCP roots unless this session's root is already pinned, when it is ignored. Each tool's description says what it does with a path that grant does not cover.",
      +  "title": "Workspace",
      +  "type": "string"
      +}
  2. First observedv26.10.14+1807

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already state this is a non-readonly, non-idempotent, non-destructive, closed-world call. The description adds genuine context beyond that: it returns separate instruction blocks, can return ROUTE_REQUIRED, and the session's first SUCCESS/NO_CHANGE carries repo_context while an out-of-grant workspace yields workspace_mismatch instead of a description. Missing are any note on repeated-call cost or what happens to a previously active persona when rerouting.

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?

Purpose and call condition are front-loaded, then protocol and return-shape details follow in a compact block. A few clauses (the grant/pinning explanation, the repo_context aside) are dense and could be tightened, but no sentence is filler.

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

Completeness4/5

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

An output schema exists, yet the description still usefully names the key response states (ROUTE_REQUIRED, SUCCESS/NO_CHANGE, NO_CHANGE semantics, repo_context, workspace_mismatch) an agent must branch on. It does not address how a failed or ambiguous query is resolved, which leaves a small gap for a routing tool.

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 coverage is 100%, so the schema already documents query, workspace, chat_history, current_persona and protocol_version, giving a baseline of 3. The description adds marginal operational meaning (protocol_version=2, copy current_persona verbatim, workspace reveals repo_context) but chat_history and the routing behavior of query are left entirely to the schema.

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

Purpose4/5

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

"Route to a specialist" pairs a specific verb with a clear resource, and the description explains it selects/loads a persona for the session. It distinguishes itself from get_agent_context by explaining the ROUTE_REQUIRED handoff, though it never explicitly contrasts with siblings like set_flow_persona or get_subagent_context.

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?

Explicit timing guidance: "Call only for initial selection or a needed specialization change; keep the active role locally on continuations," plus "Explicit known roles can be loaded directly." It names the downstream handoff to get_agent_context when ROUTE_REQUIRED is returned, but gives no exclusions against other persona-related siblings.

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