Skip to main content
Glama

scan_history

Read-onlyIdempotent

Scan git history to find secrets that were committed and later deleted, reporting each one with the commit that added it and the commit that removed it so leaked credentials can be rotated.

Instructions

Scan git history for secrets, including ones already deleted from the current files.

Streams git log -p and looks at every added and removed line. Each distinct secret is reported once with the commit that added it and, if it is gone from the newest commit, the commit that removed it. REMOVED means 'not in the current files', NOT 'safe': anyone who cloned in between still has it, so rotate it.

Args: path: a directory inside a git repository. max_commits: how many commits to walk back from HEAD (newest first). The report says if older ones were not scanned. all_branches: also walk every branch, tag and stash ref (git log --all) instead of only HEAD. max_findings: cap on findings listed.

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": "scan_history"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYes
max_commitsNo
all_branchesNo
max_findingsNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive and closed-world, so the safety profile is covered. The description adds real behavioral context beyond that: it streams `git log -p`, deduplicates secrets to one report each, attributes adding and removing commits, and warns that REMOVED means 'not in current files' rather than safe. The only gap is cost/latency expectations for large histories, which max_commits only partially addresses.

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?

Front-loaded with the one-line purpose, then mechanism and reporting semantics, then a compact Args block. Every sentence carries information an agent needs, and the REMOVED clarification is short but load-bearing rather than filler.

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 four-parameter read-only scanner with an output schema, the description covers purpose, mechanism, deduplication behavior, result attribution, the meaning of REMOVED, and truncation signaling. Nothing an agent needs to invoke it correctly or interpret the report is missing.

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

Parameters5/5

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

Schema description coverage is 0%, so the description carries the full burden and does: path is constrained to a directory inside a git repository, max_commits is defined as walking back from HEAD newest-first with a note that the report flags unscanned older commits, all_branches is explained as git log --all including tags and stashes versus HEAD-only, and max_findings is a cap on listed findings. This meaningfully exceeds the bare titles and defaults in 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 ('Scan git history for secrets') and immediately scopes it with 'including ones already deleted from the current files', which implicitly separates it from a working-tree scanner like scan_tree. An agent can tell what this does and what makes it distinct 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 Guidelines3/5

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

Usage is implied rather than stated: the 'already deleted' framing tells the agent this is the historical counterpart to a tree scan, and the REMOVED/rotate warning clarifies how to interpret results. However, it never explicitly says when to prefer this over scan_tree or check_gitignore, nor does it name any alternative, so the agent must infer routing.

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