Skip to main content
Glama

doc_history

Read-only

Retrieve a document's git revision history, newest first and following renames, to inspect changes, get commit SHAs for diff or revert, and see created and last-modified commits.

Instructions

A document's git history, newest first, following renames: each revision's sha feeds doc_at, doc_diff and doc_revert; also its created and last_modified commits. Use activity for the whole mind, doc_blame for who wrote a given line, search_history for when a text appeared.

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": {
      "path": "<path>"
    },
    "name": "doc_history"
  }
}

Input Schema

NameRequiredDescriptionDefault
grepNoKeep revisions whose commit subject contains this.
pathYesPath of the doc as named now, e.g. projets/cdc.md: its past names are followed.
limitNoMost revisions to return, newest first.
sinceNoDate filter, e.g. '2 weeks ago' or '2026-06-01' (not a revision).
untilNoUpper date bound, same format.

Output Schema

NameRequiredDescriptionDefault
pathYes
createdNo
revisionsYes
last_modifiedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv2.8.0
    • addedInput schema / properties / limit / description
      Added value: +"Most revisions to return, newest first."
    • changedInput schema / properties / path / description
      Previous value: -"e.g. projets/cdc.md."New value: +"Path of the doc as named now, e.g. projets/cdc.md: its past names are followed."
  2. First observedv2.7.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so safety is covered; the description adds genuine behavioral context beyond that—newest-first ordering, rename-following (so old paths still resolve), and that the result includes `created` and `last_modified` commits.

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 behavior and free of filler, but the second sentence is a dense semicolon-and-colon run-on that packs three sibling redirects and an output-field contract into one breath, which slightly hurts scannability.

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?

With an output schema present, the description needn't explain return values, and annotations cover the safety profile; the remaining essentials—ordering, rename handling, downstream consumers, and sibling alternatives—are all present.

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 every parameter including grep, since, until and limit is already documented in the schema. The description adds only the implicit note that rename-following applies to `path`, which is meaningful but thin—baseline 3 is appropriate when the schema does the heavy lifting.

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 ('A document's git history') plus its ordering and scope ('newest first, following renames'), which tells an agent exactly what it returns and how it differs from the other history tools.

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?

Explicitly routes the agent elsewhere: 'Use activity for the whole mind, doc_blame for who wrote a given line, search_history for when a text appeared.' It also states the downstream contract, that each revision's `sha` feeds doc_at, doc_diff and doc_revert, so the agent knows when this tool is a prerequisite rather than a substitute.

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