Skip to main content
Glama

vicem_create_baton

Idempotent

Creates a compressed context baton and symbol ledger from your session and git state so work can be handed off to another coding agent without losing intent.

Instructions

Creates a compressed U-Shaped Context Baton (.vicem/BATON.md) and symbol ledger (.vicem/ledger.json) from the current project session and git state. Use at session end or before quota limits to hand off work; do not use to read an existing baton (vicem_read_baton), restore a skeletonized function (vicem_rehydrate), or validate edits (vicem_check_guard). Compresses context by skeletonizing unchanged functions >=12 lines into .vicem/ledger.json while keeping signatures intact. Idempotently overwrites .vicem/BATON.md, .vicem/baton.json, and .vicem/ledger.json after saving a rollback snapshot in .vicem/snapshots/, with secret redaction and zero source file mutations (no auth or rate limits). Parameter semantics: goal overrides auto-extracted session intent in Section 1; targetAgent tailors receiver rules (default "codex"); budgetTokens (500-128000, default 4000) controls skeletonization depth. Returns the generated Markdown baton (isError=false).

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": "vicem_create_baton"
  }
}

Input Schema

NameRequiredDescriptionDefault
goalNoOptional explicit engineering goal override for Section 1 (e.g., "Fix JWT refresh race in src/auth.ts"). If omitted, inferred from active session history and git diff.
decisionsNoOptional architectural decisions or hard constraints to persist in .vicem/decisions.json at 100% salience across sessions.
compactAllNoWhen true, packs the entire repository structurally (minLines=2, sampled JSON/CSV/SQL, stripped comments) while keeping 100% of elided functions restorable in .vicem/ledger.json.
targetAgentNoDestination AI coding agent identifier used to format receiver instructions (default: "codex").codex
budgetTokensNoMaximum token budget governing how aggressively Tier 3/4 context files are skeletonized (default: 4000, range: 500-128000).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.3.0
    • addedInput schema / properties / compactAll
      Added value: +{
      +  "default": false,
      +  "description": "When true, packs the entire repository structurally (minLines=2, sampled JSON/CSV/SQL, stripped comments) while keeping 100% of elided functions restorable in .vicem/ledger.json.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / decisions
      Added value: +{
      +  "description": "Optional architectural decisions or hard constraints to persist in .vicem/decisions.json at 100% salience across sessions.",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
  2. Changed9 schema fields changedv1.1.6
    • addedInput schema / additionalProperties
      Added value: +false
    • addedInput schema / properties / budgetTokens / default
      Added value: +4000
    • changedInput schema / properties / budgetTokens / description
      Previous value: -"Token budget (default: 4000)"New value: +"Maximum token budget governing how aggressively Tier 3/4 context files are skeletonized (default: 4000, range: 500-128000)."
    • addedInput schema / properties / budgetTokens / maximum
      Added value: +128000
    • addedInput schema / properties / budgetTokens / minimum
      Added value: +500
    • changedInput schema / properties / goal / description
      Previous value: -"Primary engineering goal"New value: +"Optional explicit engineering goal override for Section 1 (e.g., \"Fix JWT refresh race in src/auth.ts\"). If omitted, inferred from active session history and git diff."
    • addedInput schema / properties / targetAgent / default
      Added value: +"codex"
    • changedInput schema / properties / targetAgent / description
      Previous value: -"Target agent identifier (e.g., codex, claude, ide)"New value: +"Destination AI coding agent identifier used to format receiver instructions (default: \"codex\")."
    • addedInput schema / properties / targetAgent / enum
      Added value: +[
      +  "claude",
      +  "codex",
      +  "cursor",
      +  "antigravity",
      +  "gemini",
      +  "windsurf",
      +  "vscode",
      +  "web",
      +  "ide"
      +]
  3. First observedv1.0.0

TDQS

A4.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, idempotentHint=true, destructiveHint=false and a closed-world scope, so the safety profile is largely covered. The description still adds real context beyond them: idempotent overwrite of three named files, a rollback snapshot saved to .vicem/snapshots/ beforehand, secret redaction, and zero source file mutations with no auth or rate limits. Those extras are valuable, but the tool's mutation/rollback story is thin enough that it does not reach the top of this scale.

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 purpose and the negative routing before the mechanical details, and nearly every sentence carries distinct information. It is dense but long; the parameter-semantics sentence at the end is partly redundant with the schema and could be trimmed.

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 no-output-schema mutation tool, this covers the essentials an agent needs: what files are written, that overwrites are idempotent, that a snapshot precedes them, redaction behavior, and the returned value ('Returns the generated Markdown baton (isError=false)'). Nothing critical to correct invocation is missing.

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 100%, so the baseline is 3; the description mostly restates parameter behavior (goal overriding Section 1 intent, targetAgent default, budgetTokens range). It does add one genuinely new semantic link, that budgetTokens governs skeletonization depth, but it never mentions compactAll or decisions, so it does not meaningfully outpace the schema.

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 names a specific verb (creates) plus the exact artifacts produced (.vicem/BATON.md and .vicem/ledger.json) and the input sources (session history, git state). It also explicitly contrasts itself with vicem_read_baton, vicem_rehydrate, and vicem_check_guard, so an agent can pick it out of the sibling set without opening any schema.

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 a positive trigger ('at session end or before quota limits to hand off work') and three explicit exclusions mapped to the sibling tools that own those jobs. There is no inference required about when this tool is the wrong choice.

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