Skip to main content
Glama
ajmainapon

One Agent Harness

by ajmainapon

pull_handoff_context

Retrieve exact context from a prior AI coding session, including plans, files, terminal errors, and git state, so you can continue work in another agent.

Instructions

Pull the exact context (verbatim recent conversation turns, implementation plans, task checklists, modified/read files, terminal commands/errors, and git state) from the user's previous session in Claude Code, Antigravity, Codex, or Grok Build CLI. Also returns a snapshot of the latest active sessions across all other platforms. Call this whenever the user says '/handoff', '$handoff', 'continue from my last session', or switches from another agent.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cwdNoOptional workspace path to match sessions for the current project.
queryNoOptional topic, project name (e.g. 'auth refactor', 'api-server', 'frontend'), session number ('1', '2'), or agent name ('claude', 'codex') to match.
max_turnsNoNumber of verbatim turns to include (default: 25).
session_idNoOptional specific session ID prefix, index number ('1', '2'), or fuzzy query to pull.
source_agentNoOptional source platform ('claude', 'antigravity', 'codex', 'grok'). Omit to auto-detect the most recently active session.
exclude_agentNoOptional current agent name to exclude when auto-detecting the previous agent.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations and no output schema, the description carries the full disclosure burden, and it does most of that work: it details the returned content (verbatim turns, plans, checklists, file lists, terminal errors, git state) and the extra cross-platform snapshot. It does not state the operation is read-only/non-mutating, nor mention any size, rate, or truncation limits beyond the max_turns parameter, leaving a modest 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?

Two sentences, front-loaded with the core action, and the long parenthetical enumeration of returned artifacts is information-dense rather than padding. It is slightly heavy in one sentence, but every element earns its place by telling the agent what it gets back.

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?

For a read tool with no annotations and no output schema, the description supplies the return-content inventory an agent needs to decide whether calling it is worthwhile, plus trigger phrases. Remaining gaps — read-only guarantee, truncation/limits behavior, and how the cross-platform snapshot relates to the primary result — are minor but real.

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%, so all six parameters are already documented in the schema with examples and defaults. The description adds no parameter-level syntax, format, or interaction guidance beyond what the schema provides, so the baseline 3 applies.

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+resource ('Pull the exact context ... from the user's previous session') and enumerates exactly what that context contains: verbatim turns, plans, checklists, files, commands/errors, git state. It also names the supported source platforms and a secondary behavior (cross-platform session snapshot), which distinguishes it from list_recent_sessions and search_cross_agent_history.

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?

It gives concrete invocation triggers — literal strings like '/handoff', '$handoff', 'continue from my last session', and the agent-switch scenario. That is strong when-to-use guidance. It stops short of naming sibling tools as alternatives or stating when NOT to use it (e.g., versus search_cross_agent_history), so it's clear but not fully routing.

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