Skip to main content
Glama

commitlore_prepare_capture

Prepares a capture transaction by computing binding conditions and generating a prompt contract, returning the nonce needed for later verification and staging.

Instructions

Prepare a capture transaction: computes binding conditions (HEAD, staged diff, tree, policy hash), generates the prompt contract for the agent to use, and persists a phase:"prepared" pending transaction. Returns the nonce needed for verify and stage. The prompt carries the end of the transcript rather than all of it; transcript_window says which lines, numbered as the whole transcript numbers them. Verification still reads the whole transcript, so quote only what the prompt shows you.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
transcriptYesthe session transcript to compute source hashes from
unattendedNodeclare this capture unattended: nobody was asked before staging. Refused unless the repository opted in (.commitlore-policy.json: "unattended": true, mode "auto")

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

Beyond the annotations, the description discloses that the tool persists a pending transaction, that the generated prompt carries only a window of the transcript, and that verification reads the full transcript while the agent should quote only what the prompt shows. This is genuinely useful behavioral nuance that prevents a common mistake.

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 compact and front-loaded with the core purpose, then adds behavioral constraints that affect how the agent should interact with the result. Every sentence contributes value, though the prompt-window detail gains some length but remains justified because it prevents a false quote from the verification step.

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 tool with no output schema, the description provides essential return info (the nonce), the transaction phase, the prompt contract, and the verification-confirm behavior. Combined with the 100% schema coverage, an agent has enough information to invoke the tool correctly and know what to do next.

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%, and the schema already documents both the transcript and unattended parameters. The description does not add per-parameter meaning beyond what the schema provides, so it hits the baseline rather than exceeding it.

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 states a specific action — preparing a capture transaction — and details what that entails: computing binding conditions, generating a prompt contract, and persisting a prepared pending transaction. It also distinguishes itself from siblings like commitlore_stage_capture and commitlore_verify_capture by identifying the nonce return value as the requirement for those downstream steps.

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?

The description clearly conveys that this tool is the first step in a multi-step transaction flow, since it persists a "prepared" phase and returns the nonce needed for verify and stage. It does not explicitly say when NOT to use it or name alternatives, so a small gap remains, but the context is enough for an agent to know its role relative to the siblings.

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