Skip to main content
Glama

Submit AI session handoff

session_handoff
Idempotent

User-initiated session migration only: submit the takeover prompt AFTER the user explicitly asks to hand off, move to a new chat, or generate a takeover prompt. Never call merely because advisory.type=SESSION_HANDOFF_RECOMMENDED or handoff_notice was returned, and never call when the user says continue or asks to finish the current work. The AI must summarize its own current conversation context, include the project goal, completed work, real Device/Worktree/Branch/Commit/deployment/test state when relevant, unfinished work, decisions and prohibitions, risks/BLOCKED/TODO, and the first next step. Never include passwords, tokens, private keys, bearer credentials, or other secrets. Reusing the same action_id is idempotent.

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": {
      "ai_session_id": "<ai_session_id>",
      "action_id": "<action_id>",
      "handoff_prompt": "<handoff_prompt>",
      "task_count": "<task_count>"
    },
    "name": "session_handoff"
  }
}

Input Schema

NameRequiredDescriptionDefault
action_idYesThe fixed action_id from SESSION_HANDOFF_RECOMMENDED advisory.
task_countYesPass advisory.task_count (live remote-task count) or get_ai_session_status.handoff_trigger_count (frozen threshold-crossing count). Either is accepted for the same PENDING action_id.
workflow_idNoOptional workflow_id for the same AI Session.
ai_session_idYesThe ai_session_id from SESSION_HANDOFF_RECOMMENDED advisory.
summary_titleNoOptional concise title for the handoff.
handoff_promptYesComplete prompt that a new AI session can use to take over the work. Do not include secrets.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare this is a non-read-only, non-destructive, idempotent operation. The description adds important behavioral context beyond annotations: the handoff prompt must contain specific current-state details and must never include passwords, tokens, private keys, or bearer credentials. It also clarifies that reusing the same action_id is idempotent, though it does not describe post-submission behavior or error handling.

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 front-loaded with the most important constraint—user-initiated handoff only—followed by exclusions and content requirements. It is dense and every sentence serves a purpose, though the long list of required summary contents makes it slightly heavy rather than maximally concise.

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 mutation tool with an output schema and detailed annotations, the description covers the essential gaps: when to call, when not to call, what the handoff prompt must contain, and which secrets must be excluded. The output schema handles return values, and the annotations cover safety and idempotency, so no critical behavioral information is missing.

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?

Schema coverage is 100%, so the schema already documents all parameters. The description adds meaning beyond the schema by emphasizing action_id reuse idempotency and by specifying the required content and secret-exclusion rules for handoff_prompt. It does not add much for task_count or workflow_id, but it compensates for key semantic fields.

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 a specific verb and resource: 'submit the takeover prompt' for a session handoff, and immediately scopes it to 'User-initiated session migration only.' It also rules out automatic calls driven by advisory signals, making the action's purpose and boundaries unambiguous.

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

Usage Guidelines5/5

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

It gives explicit triggering conditions: call only after the user explicitly asks to hand off, move to a new chat, or generate a takeover prompt. It also gives explicit exclusions: never call merely because of a SESSION_HANDOFF_RECOMMENDED advisory or handoff_notice, and never call when the user says continue or asks to finish current work.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources