Skip to main content
Glama
AgentHistoryMCP
by luo0629

Get Cross-Agent Handoff Context

get_handoff_context
Read-onlyIdempotent

Retrieves a compact, budgeted context pack from recent project sessions across AI coding agents so a new agent can resume work with prior requests, turns, and file changes.

Instructions

Retrieve a compact, budgeted handoff context pack from the most recent sessions of a project across other AI Coding Agents (e.g. switching from Codex to Claude Code). Returns initial request, latest turns, touched files, and provenance.

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": {
      "project_path": "<project_path>"
    },
    "name": "get_handoff_context"
  }
}

Input Schema

NameRequiredDescriptionDefault
max_sessionsNoMaximum number of recent sessions to include (1-10, default 3).
project_pathYesAbsolute path to the project directory (or a subdirectory inside it).
exclude_agentNoOptional agent_id of the currently active tool to exclude (e.g. 'claude', 'codex', 'cursor') so sessions from other tools are prioritized.
source_agentsNoOptional allowlist of agent_ids to include (defaults to all agents).
max_context_charsNoStrict character budget for the assembled context pack (default 20000).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive and closed-world, so the safety profile is covered. The description adds genuinely non-derivable context: the pack is budget-limited and consists of initial request, latest turns, touched files and provenance. It does not explain what gets dropped when the character budget is hit, which is the one behavioral gap.

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?

A single well-formed sentence with the tool's distinctive trait (cross-agent handoff) front-loaded. Slightly dense adjective stacking ('compact, budgeted handoff context pack') but no wasted clauses.

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?

With no output schema, the description does the necessary work of listing the returned contents, and all five parameters are documented in the schema. An agent can call it correctly; only the budget-truncation behavior and any latency or scope limits are left unstated.

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 description coverage is 100%, with every parameter documented including defaults, ranges and examples, so the schema carries the semantic load. The description only loosely hints at max_sessions ('most recent sessions'), the agent allowlist/exclusion, and max_context_chars ('budgeted'), adding little beyond the schema. Baseline 3 is appropriate.

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 ('Retrieve') and resource ('handoff context pack') scoped to recent project sessions across other agents, plus what the pack contains. It is clearly distinguishable from read_session and search_history by its cross-agent, budgeted-pack framing, though it never names those siblings 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?

Provides a clear usage context with the parenthetical example of switching from Codex to Claude Code, which tells an agent when this tool is the right pick. It stops short of explicit exclusions or naming the alternative tools to use when the agent is not switching.

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