Skip to main content
Glama

commit_memory

Validates Markdown frontmatter, commits memory as a Git artifact with agent provenance, and updates the local FTS5 search index so AI agents can store and recall project decisions deterministically.

Instructions

Deterministic state write: validates Markdown frontmatter, atomically commits to Git with agent provenance, and updates local FTS5 index.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "namespace": "<namespace>",
      "title": "<title>",
      "content": "<content>",
      "author_agent": "<author_agent>"
    },
    "name": "commit_memory"
  }
}

Input Schema

NameRequiredDescriptionDefault
tagsNoTags for categorizing and discovering this memory artifact
titleYesConcise human-readable title summarizing the decision or state
contentYesMarkdown formatted memory content (facts, decisions, specs, handoff notes)
trace_idNoOptional observability trace ID correlating this memory mutation to a session/run
namespaceYesTopic namespace (e.g. "backend/payments", "architecture/auth")
stale_afterNoOptional ISO-8601 UTC timestamp after which this memory is considered soft-stale and dampened in rank
valid_untilNoOptional ISO-8601 UTC timestamp after which this memory is hard-expired and excluded from default recall
author_agentYesName or identifier of the AI agent creating this memory (e.g. "claude-code", "gemini-developer")
allow_secretsNoExplicit bypass parameter allowing intentional credential patterns in test fixtures or mock examples
supersedes_idNoOptional memory ID that this new artifact supersedes/replaces

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.4.0
    • addedInput schema / properties / allow_secrets
      Added value: +{
      +  "default": false,
      +  "description": "Explicit bypass parameter allowing intentional credential patterns in test fixtures or mock examples",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / stale_after
      Added value: +{
      +  "description": "Optional ISO-8601 UTC timestamp after which this memory is considered soft-stale and dampened in rank",
      +  "format": "date-time",
      +  "type": "string"
      +}
    • addedInput schema / properties / valid_until
      Added value: +{
      +  "description": "Optional ISO-8601 UTC timestamp after which this memory is hard-expired and excluded from default recall",
      +  "format": "date-time",
      +  "type": "string"
      +}
  2. First observedv0.1.0

TDQS

B3.2/5.0
Behavior3/5

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

With no annotations, the description does real work: it discloses that writes are atomic, that a Git commit with agent provenance occurs, and that the local FTS5 index is updated. However, it says nothing about reversibility, whether a commit can be undone, permission requirements, or how validation failures surface, which matters for a mutation tool.

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?

A single dense sentence with the write action front-loaded and each clause earning its place. The colon-and-list construction sacrifices some readability but wastes no words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a ten-parameter mutation tool with no annotations and no output schema, the description covers the write pipeline adequately but leaves the return value (e.g. the new memory ID), failure modes, and secret-scanning behavior unexplained. It is sufficient to identify the tool but not to call it confidently in edge cases.

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 all ten parameters including namespace, supersedes_id, stale_after, and allow_secrets are already documented in the schema. The description adds no syntax, format, or interaction guidance (such as how supersedes_id relates to valid_until) 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.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb plus resource ('Deterministic state write') and enumerates the concrete operations performed (frontmatter validation, Git commit, FTS5 index update). It implicitly contrasts with read-oriented siblings like recall_memory, but never names an alternative explicitly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no statement of when to call this versus recall_memory, sync_memory_index, or propose_constitution_rule, and no prerequisites (e.g. must the memory already exist, should supersedes_id be preferred over a fresh commit). The agent must infer usage from the name and mechanics alone.

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