Skip to main content
Glama

Save Context Tool

save_context

Saves a project’s approved Markdown context document as a first or new version, preserving concurrent updates and excluding secrets.

Instructions

Saves the project's context document: the first version (base_version 0) or a new one (base_version = the version you read with project_context). Only after the person saw the text and said yes. Never secrets. If a colleague saved a newer version meanwhile, nothing is overwritten.

Input Schema

NameRequiredDescriptionDefault
bodyYesThe whole context, in Markdown (not only the changed part).
noteNoWhat changed, in a few words (e.g. "added how to deploy").
repoNoThe output of git remote -v in the working directory.
agentNoThe agent writing this: claude-code, codex, cursor.
projectNoProject slug or name, when there is no repo or session project.
sessionNoThis session's id, from the cemainou line at the start of the session. The session's project wins over the repo.
base_versionYes0 for the first version; otherwise the version you read with project_context.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior4/5

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

With no annotations, the description carries the burden and does well: it discloses the human-approval prerequisite, the no-secrets policy, and optimistic concurrency ('nothing is overwritten'), which is exactly the kind of mutation risk an agent needs. It stops short of saying what the tool returns (e.g. the new version number) or what happens if base_version is stale, so it is not fully complete.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three tight sentences with no filler; the two-mode rule is front-loaded, followed by the prerequisites and the concurrency guarantee. The telegraphic style ('Never secrets.') is efficient rather than vague.

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 7-parameter mutation with no output schema and no annotations, the description covers mode selection, approval gating, secret handling, and conflict behavior, which is most of what matters. It omits return value and failure behavior on a stale base_version, a modest remaining gap.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with rich per-parameter descriptions, so the baseline is 3; the description adds real meaning by explaining the base_version 0 convention and tying the non-zero value to the version read via project_context. The remaining parameters (repo, agent, session, note) are left entirely to 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 and resource (saves the project's context document) and immediately distinguishes the two modes of the operation: first version (base_version 0) vs a new version keyed to what was read with project_context. An agent can tell this apart from sibling tools like write_document or project_context without opening the 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?

Explicit about the workflow gate ('Only after the person saw the text and said yes') and the constraint ('Never secrets'), plus the concurrency rule when a colleague saved a newer version. It also points to the sibling (project_context) that supplies the value for base_version.

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