Skip to main content
Glama
mcp-secret-sentinel

mcp-secret-sentinel

scan_git_range

Read-onlyIdempotent

Scan commits in a git range—by default, those a push would send—to detect exposed secrets before pushing and return redacted findings by commit.

Instructions

Scan the commits in base..head: by default, what git push would send.

Run this before pushing. With the defaults it scans every commit on the current branch that its upstream does not have yet. If the branch has no upstream, the error says so: pass the branch you will push to as base (for example "origin/main").

Args: repo_path: Absolute path to a git repository (or any path inside one). base: Commits reachable from here are excluded (default "@{upstream}"). head: Last commit to include (default "HEAD"). max_commits: Scan at most this many of the newest commits in the range. 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, plus "commits_scanned" and "range".

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_range"
  }
}

Input Schema

NameRequiredDescriptionDefault
baseNo@{upstream}
headNoHEAD
repo_pathYes
max_commitsNo
max_findingsNo

Output Schema

NameRequiredDescriptionDefault
cleanYes
rangeYes
summaryYes
findingsYes
baselinedNo
top_filesNo
truncatedNo
suppressedNo
files_scannedYes
total_findingsNo
commits_scannedYes
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"
      +    },
      +    "commits_scanned": {
      +      "title": "Commits Scanned",
      +      "type": "integer"
      +    },
      +    "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"
      +    },
      +    "range": {
      +      "title": "Range",
      +      "type": "string"
      +    },
      +    "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",
      +    "commits_scanned",
      +    "range"
      +  ],
      +  "title": "RangeReport",
      +  "type": "object"
      +}
  2. First observedv0.2.0

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive/closed-world, so the safety profile is covered; the description adds real value beyond that with default range resolution (@{upstream}..HEAD), the error behavior when no upstream exists, and finding ordering ('most severe first'). It does not mention scan cost or performance on large ranges, which is the main remaining unknown for a read-only scan.

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?

The lead sentence is front-loaded and high-signal, and the Args entries are tight. The Returns block is somewhat redundant given an output schema exists, and the docstring-style layout adds length without adding selection value.

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 5-parameter read-only git scanner with an output schema, everything an agent needs to invoke it correctly is present: what the range means, defaults, the upstream failure path, limits, and result ordering. No material gaps remain.

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 the load and it does: the Args block defines each parameter's meaning, defaults, and edge semantics ('0 = no limit', base excludes reachable commits, head is the last commit included, repo_path may be any path inside a repo). This is materially more than the bare titles/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?

The first sentence gives a precise verb+resource and defines the range semantics ('Scan the commits in base..head'), with the default identified as 'what `git push` would send'. This clearly separates it from scan_git_history (all history) and scan_git_staged (index-only) without needing 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 Guidelines4/5

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

'Run this before pushing' gives an explicit trigger condition, and the description explains the no-upstream failure mode plus the workaround (pass the branch you will push to as base, e.g. "origin/main"). It stops short of naming sibling alternatives such as scan_git_staged or scan_git_history when the pre-push range is not the right scope.

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