Skip to main content
Glama

agent_set_model

Switch the AI model used by a Claude Code or agy session; live tmux sessions receive the /model command and confirmation, while background sessions apply the change on their next turn.

Instructions

Change the model a session runs on. For a running tmux session this types the /model command and confirms the switch, because a live process cannot be re-pointed any other way. For a background session it applies on the next turn.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelYesModel id
effortNo
sessionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.5/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does disclose a non-obvious behavioral trait: for a live tmux session it types /model and confirms the switch, while a background session applies on the next turn. That timing/mechanism detail is genuinely useful. It omits permissions, failure/confirmation behavior, and effect on in-flight work, so not a 5.

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?

Three tight sentences, front-loaded with the core action, then the two context-specific behaviors. Every sentence adds information and none is filler.

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

Completeness3/5

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

For a mutation tool with no annotations and no output schema, the description covers the change semantics and timing but leaves gaps: it does not say what a success/failure looks like, whether the switch affects an active turn, or where valid model ids come from. Adequate but incomplete given the lack of structured context.

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

Parameters2/5

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

Schema description coverage is only 33% — 'model' is described simply as 'Model id', while 'session' and the 'effort' enum (low/medium/high/max) have no descriptions at all. The description text adds no meaning about any parameter, so it fails to compensate for the coverage gap.

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?

States a specific verb and resource ('Change the model a session runs on'), which is clearly distinct from listing tools like agent_models or spawning tools like agent_spawn. It does not explicitly name a sibling to steer the agent away from, so it stops short of a 5.

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

Usage Guidelines3/5

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

The description explains the mechanism in two contexts (running tmux vs background session), which implies usage, but never states when to reach for this tool versus alternatives like re-spawning a session or picking a model at spawn time. Guidance is implied rather than explicit.

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