Skip to main content
Glama
mcp-secret-sentinel

mcp-secret-sentinel

scan_git_history

Read-onlyIdempotent

Scans recent Git commits for exposed secrets, tagging each finding with the commit hash that introduced it. Detects credentials even if later deleted so they can be rotated.

Instructions

Scan the lines added by the most recent commits (git log -p).

Each finding is tagged with the short hash of the commit that introduced it. A secret that was later deleted is still reported — history retains it, so the credential must be rotated regardless.

Args: repo_path: Absolute path to a git repository (or any path inside one). max_commits: How many commits back to inspect (default 50). all_branches: Walk every branch, tag and the stash instead of only the history of HEAD (default false). max_findings: List at most this many findings, most severe first (default 200, 0 = no limit).

Returns: The standard redacted findings report, with a "commit" field on each finding.

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": {
      "repo_path": "<repo_path>"
    },
    "name": "scan_git_history"
  }
}

Input Schema

NameRequiredDescriptionDefault
repo_pathYes
max_commitsNo
all_branchesNo
max_findingsNo

Output Schema

NameRequiredDescriptionDefault
cleanYes
summaryYes
findingsYes
baselinedNo
top_filesNo
truncatedNo
suppressedNo
files_scannedYes
total_findingsNo
counts_by_patternNo
counts_by_severityNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.3.0
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$defs": {
      +    "FileCount": {
      +      "properties": {
      +        "file": {
      +          "title": "File",
      +          "type": "string"
      +        },
      +        "findings": {
      +          "title": "Findings",
      +          "type": "integer"
      +        }
      +      },
      +      "required": [
      +        "file",
      +        "findings"
      +      ],
      +      "title": "FileCount",
      +      "type": "object"
      +    },
      +    "Finding": {
      +      "properties": {
      +        "advice": {
      +          "title": "Advice",
      +          "type": "string"
      +        },
      +        "commit": {
      +          "anyOf": [
      +            {
      +              "type": "string"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ],
      +          "title": "Commit"
      +        },
      +        "file": {
      +          "title": "File",
      +          "type": "string"
      +        },
      +        "line": {
      +          "title": "Line",
      +          "type": "integer"
      +        },
      +        "pattern": {
      +          "title": "Pattern",
      +          "type": "string"
      +        },
      +        "redacted": {
      +          "title": "Redacted",
      +          "type": "string"
      +        },
      +        "severity": {
      +          "enum": [
      +            "critical",
      +            "high",
      +            "medium"
      +          ],
      +          "title": "Severity",
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "file",
      +        "line",
      +        "pattern",
      +        "severity",
      +        "redacted",
      +        "advice"
      +      ],
      +      "title": "Finding",
      +      "type": "object"
      +    }
      +  },
      +  "properties": {
      +    "baselined": {
      +      "anyOf": [
      +        {
      +          "type": "integer"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "title": "Baselined"
      +    },
      +    "clean": {
      +      "title": "Clean",
      +      "type": "boolean"
      +    },
      +    "counts_by_pattern": {
      +      "anyOf": [
      +        {
      +          "additionalProperties": {
      +            "type": "integer"
      +          },
      +          "type": "object"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "title": "Counts By Pattern"
      +    },
      +    "counts_by_severity": {
      +      "anyOf": [
      +        {
      +          "additionalProperties": {
      +            "type": "integer"
      +          },
      +          "type": "object"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "title": "Counts By Severity"
      +    },
      +    "files_scanned": {
      +      "title": "Files Scanned",
      +      "type": "integer"
      +    },
      +    "findings": {
      +      "items": {
      +        "$ref": "#/$defs/Finding"
      +      },
      +      "title": "Findings",
      +      "type": "array"
      +    },
      +    "summary": {
      +      "title": "Summary",
      +      "type": "string"
      +    },
      +    "suppressed": {
      +      "anyOf": [
      +        {
      +          "type": "integer"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "title": "Suppressed"
      +    },
      +    "top_files": {
      +      "anyOf": [
      +        {
      +          "items": {
      +            "$ref": "#/$defs/FileCount"
      +          },
      +          "type": "array"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "title": "Top Files"
      +    },
      +    "total_findings": {
      +      "anyOf": [
      +        {
      +          "type": "integer"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "title": "Total Findings"
      +    },
      +    "truncated": {
      +      "anyOf": [
      +        {
      +          "type": "boolean"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "title": "Truncated"
      +    }
      +  },
      +  "required": [
      +    "clean",
      +    "findings",
      +    "files_scanned",
      +    "summary"
      +  ],
      +  "title": "ScanReport",
      +  "type": "object"
      +}
  2. First observedv0.2.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare this a read-only, idempotent, non-destructive, closed-world operation, so the safety bar is low. The description still adds real behavioral value beyond them: findings carry the short commit hash, and a secret deleted in a later commit is still reported because history retains it, which tells the agent that results imply mandatory rotation rather than a false positive.

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?

Purpose is front-loaded in the first line, followed by the most decision-relevant caveat (deleted secrets are still reported), then parameters and returns. The structure is clean and every section earns its space; the Returns block is slightly redundant given an output schema exists, though it does flag the added commit field.

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?

With four parameters at 0% schema coverage and an output schema present, the description covers everything needed to invoke the tool correctly, including defaults and the 0-means-unlimited edge case. The one gap is routing: with eight siblings including two other git scanners, it never states how results or scope differ from scan_git_range or scan_git_staged.

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 must carry all four parameters — and it does, documenting repo_path as an absolute path (or any path inside one), max_commits' default of 50, all_branches' inclusion of branches/tags/stash versus HEAD-only, and max_findings' default 200 with the non-obvious '0 = no limit' and severity ordering.

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 opening line gives a concrete verb and resource (scan the lines added by recent commits, git log -p), which is unambiguous on its own. It does not, however, name or contrast itself with the obvious siblings scan_git_staged and scan_git_range, leaving the boundary between those three git scanners to inference.

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 only implied: the description explains what history scope is scanned but never states when to prefer this over scan_git_range (a specific commit span) or scan_git_staged. The all_branches note hints at the scope trade-off, but no explicit when/when-not guidance or alternative is offered.

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