Skip to main content
Glama

Fork Agent Session

agent_fork
Destructive

Duplicate an existing session to branch work into a new parallel execution when the backend supports forking. Use it to preserve context and continue independently.

Instructions

Fork an existing session when its backend advertises that capability.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
configNo
promptNo
contextNo
file_refsNo
workspaceYesReference to exactly one durable workspace identity.
session_idYes
idempotency_keyNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
stateNoqueued
job_idYes
operationYes
session_idNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.1.0

TDQS

B3.1/5.0
Behavior3/5

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

Annotations already mark the operation as destructive and not idempotent; the description adds the backend-capability prerequisite, which is genuine behavioral context. It does not go deeper into what forking does to the original session, whether config is copied, or what makes it destructive, but the annotation coverage lowers the burden somewhat.

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?

The description is a single front-loaded sentence with no wasted words, and the key scoping detail ('existing session', 'backend advertises that capability') comes early. It could carry a bit more operational context, but as a concise statement it is effective.

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

Completeness2/5

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

The tool has seven parameters, a nested config object, destructive annotations, and no usage guidance in the description. An output schema exists, which covers return shape, but the description leaves important gaps around when to fork versus start/continue, parameter roles, and behavioral consequences.

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 14%, and the tool description adds no parameter-level meaning. Most parameters like prompt, context, file_refs, session_id, and idempotency_key are left for the agent to infer from names alone, and the nested config object is only explained inside the schema, not in the tool 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?

The description clearly identifies the action ('Fork') and the resource ('an existing session'), and adds a meaningful condition ('when its backend advertises that capability'). This distinguishes it from agent_start and agent_continue, though it does not explicitly name those siblings, so it stops short of a top score.

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 phrase 'when its backend advertises that capability' gives a condition for using the tool, which is useful context. However, there is no explicit guidance on when not to use it or which sibling tool should be used instead, so usage routing is left mostly to inference.

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