Skip to main content
Glama
cyberdroid2077

opsecforge-mcp

Scan files or staged changes for secrets

scan_secrets
Read-onlyIdempotent

Detect hardcoded secrets in files, directories, or staged Git changes before commit. Reports file, line, secret type, and a masked value preview without exposing originals.

Instructions

Pre-commit check. Scans files or directories (paths) and/or the lines added in the staged git diff (staged: true) for known secret patterns. Lists only file:line, the secret type and a masked preview (at most the first 4 characters of values of 20+ characters; short values are shown as an ellipsis), never the original value. Provide paths, staged, or both. Heuristic: a clean result is not proof that nothing sensitive is present.

Input Schema

NameRequiredDescriptionDefault
pathsNoFiles or directories to scan. Directories are walked recursively (skipping .git, node_modules, build output and symlinks; at most 2000 files).
stagedNoWhen true, scan only the lines added in `git diff --cached` (the staged changes) in the server working directory.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, closed-world), yet the description adds substantive behavior: the output is limited to file:line, type and a masked preview, with exact masking rules (first 4 chars for 20+ char values, ellipsis for short ones). It also warns that a clean result is not proof of safety, which is a meaningful limitation the annotations do not convey.

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?

Four tight sentences, front-loaded with the use case, then parameters, then output shape, then the caveat. Every sentence carries information and nothing is repeated from the schema.

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 no output schema, the description takes on the job of describing the return shape — which it does precisely (file:line, type, masked preview) — and it flags the false-negative heuristic limitation. An agent has everything it needs to call this correctly.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, and the schema already documents recursion, skips and the 2000-file cap. The description adds a small but real clarification beyond the schema: that paths and staged are combinable ('Provide paths, staged, or both'), removing ambiguity about whether the two parameters are mutually exclusive.

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 ('Scans files or directories... for known secret patterns') with an explicit positional context ('Pre-commit check'). It is clearly distinguishable from the redact_* and inspect_jwt siblings, which transform or decode rather than detect.

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?

Gives clear operating context (pre-commit check) and an explicit parameter-combination rule: 'Provide paths, staged, or both.' It does not, however, contrast itself with siblings such as redact_file, which would tell an agent when to scan versus when to redact.

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