Skip to main content
Glama

switch_thread

Binds a worktree to an open thread by case ID so agents can resume work, or omits the ID to unbind and pause; per-worktree bindings prevent concurrent agents from overwriting each other.

Instructions

Bind this worktree to an existing open thread (case_id), or pause: case_id omitted unbinds the worktree. Threads are per repository; the binding is per worktree, so two agents in two worktrees never overwrite each other. From a chat client the binding may point at a thread of any repository.

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_thread"
  }
}

Input Schema

NameRequiredDescriptionDefault
factsNo
case_idNo
worktreeNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior3/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 well on concurrency semantics: bindings are per worktree, threads per repository, so parallel agents cannot overwrite each other, plus a note on chat-client cross-repository bindings. It says nothing about what happens on an invalid or closed case_id, whether rebinding overwrites an existing binding, or what the call returns.

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, each adding distinct information: operation, pause semantics, concurrency model, cross-repo caveat. Nothing redundant and the primary operation is front-loaded.

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 purpose and concurrency well but leaves the facts parameter and error/return behavior undocumented, which an agent would need before calling confidently.

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 0%, so the description must compensate and it only partly does: case_id is well explained (existing open thread, omitted = unbind) and worktree is implied as the current one. The third parameter, facts, is entirely unexplained in both schema and description.

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: bind a worktree to an existing open thread via case_id, or unbind by omitting it. This distinguishes it from open_thread/close_thread by scope (binding vs. lifecycle), though it never names a sibling explicitly.

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?

Clearly explains the two use conditions: supply case_id to bind, omit it to pause/unbind the worktree. It does not say what to do when the thread does not yet exist (presumably open_thread), leaving one routing decision implicit.

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