Skip to main content
Glama

Verify Zero Leak Shannon Entropy Secrets Guard

verify_security_guard
Idempotent

Scan workspace files or in-memory code for hardcoded secrets and API keys, or install a git pre-commit hook to block credential leaks before commits.

Instructions

Scans workspace files and code buffers for hardcoded secrets and API keys, or installs the automated git pre-commit zero-leak guard, distinguishing from 'audit_code_quality' and 'enforce_architecture_rules' by identifying high-entropy credentials and git hooks rather than checking code complexity or enforcing layer rules.

Parameters:

  • action: Security action: 'scan' inspects workspace files or in-memory text for confidential credentials; 'install_pre_commit' installs the automated git pre-commit security hook into .git/hooks/pre-commit.

  • project_root: Root directory of the repository to scan or install the pre-commit hook into.

  • content: Optional raw in-memory code string or configuration text to scan for secrets directly without touching disk files.

Behavior:

  • Mutability: Strictly read-only when action is 'scan'; writes executable hook file .git/hooks/pre-commit when action is 'install_pre_commit'.

  • Idempotency: Scans are strictly idempotent; hook installation is idempotent and will not overwrite custom existing hooks without backup.

  • Privacy & Network: 100% offline local regex and Shannon entropy calculation; zero secret tokens are ever transmitted over the network.

  • Performance & Resources: Scans 1,000 files in <100ms using <30MB RAM; hook execution completes in <50ms.

  • Auth: Zero authentication or cloud credentials required.

  • Return Structure: Emits security audit report showing 100% Zero-Leak pass status or lists detected secret leaks with file names, line numbers, and redacted tokens.

  • Error Handling: Gracefully reports if directory is not a git repository when attempting pre-commit installation.

Usage Guidelines:

  • When to use: Ensure zero confidential credentials (OpenAI, Anthropic, Gemini, GitHub tokens, AWS keys, private certificates) are committed to git or exposed in LLM prompt contexts.

  • When NOT to use: Do not use for checking code quality, cyclomatic complexity, or duplicate code (use 'audit_code_quality' instead); do not use for enforcing architectural layer boundaries (use 'enforce_architecture_rules' instead).

Returns: Security audit report showing 100% Zero-Leak certification or list of detected secret leaks with line numbers, or hook installation confirmation.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "verify_security_guard"
  }
}

Input Schema

NameRequiredDescriptionDefault
actionNoSecurity action: 'scan' to inspect files or content for secret leaks, 'install_pre_commit' to install the automated git zero-leak hook.scan
contentNoOptional raw text string to scan for secrets in memory without scanning disk files.
project_rootNoTarget repository root to scan or install hook into (default: current directory)..

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv7.3.2
  2. Removedv7.0.1
  3. Addedv7.0.0

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already declare readOnlyHint=false, idempotentHint=true, destructiveHint=false and openWorldHint=false, and the description goes well beyond them: it states which action mutates (only 'install_pre_commit' writes .git/hooks/pre-commit), that existing custom hooks are backed up rather than clobbered, that scanning is 100% offline with no network transmission of tokens, plus performance figures, auth requirements, and error handling for non-git directories. No claim conflicts with the annotations, since readOnlyHint=false is consistent with the install mode.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The information is well organized under Behavior / Usage Guidelines headers and front-loaded with the purpose, but it is long for a three-parameter tool. The closing 'Returns:' section restates the return structure already given under Behavior, and the first sentence is a single overloaded run-on that packs purpose, scope, and sibling differentiation together.

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 dual-mode tool that both reads and writes, every decision-relevant fact is present: mode semantics, mutation side effects, idempotency, offline guarantee, auth, error conditions, and return shape. The description even covers return values that the output schema would already have carried.

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, but the description adds real meaning: it specifies the concrete install target path (.git/hooks/pre-commit) and clarifies that 'content' scans in-memory text 'without touching disk files', which disambiguates how content and project_root interact. The gain is incremental rather than decisive because the schema already describes all three parameters adequately.

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 opening sentence names a specific verb (scans / installs) and resources (workspace files, code buffers, git pre-commit hook), and explicitly differentiates from 'audit_code_quality' and 'enforce_architecture_rules' by stating it looks for high-entropy credentials and git hooks rather than complexity or layer rules. An agent can route between these siblings without opening any schema.

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?

There is an explicit 'When to use' (preventing committed credentials in git or LLM prompt contexts) and a 'When NOT to use' block that names both alternatives and the exact conditions that select them. This is the strongest form of routing guidance.

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