Skip to main content
Glama

history_session_bootstrap

Idempotent

Initialize or resume a lossless project history archive for a conversation, capturing the user's verbatim first request and returning a session key to reuse in later calls.

Instructions

Initialize or resume a lossless project history archive (docs/history-session/). Call once near the start of a conversation with the user's verbatim first request as initial_user_input. Echo the returned session_key on later calls in this chat. Without host/explicit session_key, the server mints a new hs_ handle and opens a new archive (does not merge into a shared project-active file). Never invent a key. Returns bounded state (≤64 KiB). Disable with MCP_HISTORY_SESSION=0|false|off.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNoresume (default) reuses the archive for this session_key; fresh always creates a new archive
titleNoArchive title when creating a new session
history_dirNoRelative history directory; default docs/history-session
session_keyNoEcho the server-minted handle from a previous bootstrap in this conversation. Omit only on the first call; omitting later opens a new archive instead of merging.
project_rootNoProject root; omit to use workspace resolution
workspace_rootNoAlias of project_root
create_if_missingNoCreate archive when missing; default true
initial_user_inputNoVerbatim first user request for this conversation

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv4.1.1

TDQS

A4.1/5.0
Behavior4/5

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

Adds substantial context beyond the annotations: the server mints an hs_<uuid> handle, a fresh archive does NOT merge into a shared project-active file, the response is bounded to <=64 KiB, and the tool can be disabled via MCP_HISTORY_SESSION=0|false|off. Annotations cover the safety profile (idempotent, non-destructive), and the description complements them with operational detail rather than contradicting them.

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?

Front-loaded with the core action and artifact path, then layers the key-echo protocol and edge cases. Six short sentences, all relevant, though the density of edge-case caveats slightly crowds the definition.

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 an 8-parameter, no-output-schema tool, the description adequately explains the return (session_key plus bounded state <=64 KiB) and the disable switch. It does not describe failure modes (e.g., bad directory, permission errors), which would be the remaining gap given no output schema exists.

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 8 parameters are already documented in the schema, including session_key omission semantics and the mode enum. The description mostly restates that behavior ('Echo the returned session_key', 'does not merge'), adding only the 'Never invent a key' caution, which is marginal value over 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?

States a specific verb+resource ('Initialize or resume a lossless project history archive') and pins down the artifact location (docs/history-session/). It is clearly distinguishable from siblings like history_session_checkpoint, history_session_read, and history_session_search, which operate on an already-bootstrapped session.

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?

Gives explicit timing and sequencing: call once near the start of a conversation with the verbatim first request, then echo session_key on later calls, and never invent a key. It also warns that omitting the key later opens a new archive rather than merging. It does not name sibling tools as alternatives, so it falls short of the 5 bar.

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