Skip to main content
Glama

verify_security_guard

Idempotent

Scans workspace files and code buffers for hardcoded secrets and API keys, or installs a git pre-commit hook to block credential leaks before committing.

Instructions

Scans workspace files and code buffers for hardcoded secrets and API keys, or installs the automated git pre-commit zero-leak security 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 (str, optional, default='scan'): Security action: 'scan' to inspect files or content for secret leaks, 'install_pre_commit' to install the automated git zero-leak hook.

  • project_root (str, optional, default='.'): Target repository root to scan or install hook into (default: current directory).

  • content (str, optional, default=''): Optional raw text string to scan for secrets in memory without scanning disk files.

Behavior:

  • Read-only when action is 'scan'; installs hook file when action is 'install_pre_commit'.

  • Idempotent: Scans produce identical results; hook installation is idempotent.

  • 100% Offline: Zero data transmission; all entropy and pattern checks execute locally.

  • Auth & Rate Limits: Zero authentication or cloud credentials required; runs in <50ms.

  • Error Handling: Reports exact line numbers and entropy score when secrets are detected.

Usage Guidelines:

  • When to use: Ensure zero confidential credentials (OpenAI, Anthropic, Gemini, GitHub tokens, private keys) are exposed in code before committing or sharing context.

  • When NOT to use: Do not use for general code quality, cyclomatic complexity, and duplicate code scans (use 'audit_code_quality' instead); do not use for enforcing layer boundary architecture rules (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.

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.4/5.0
Behavior4/5

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

Goes well beyond the annotations: it discloses the conditional write behavior (read-only under 'scan', writes a hook file under 'install_pre_commit'), that everything runs fully offline with zero data transmission, zero auth requirements, and sub-50ms latency, plus what errors report. This usefully reconciles readOnlyHint=false with the read-only scan mode rather than contradicting it. Only omission is what exactly gets written/where the hook lands.

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?

Front-loaded with purpose and sibling differentiation, then cleanly sectioned into Parameters, Behavior, Guidelines, and Returns. It is on the long side and the parameter block duplicates schema text nearly verbatim, which is the only wasted space.

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?

Annotations cover safety hints and an output schema exists, so the description needn't explain return values beyond its summary line. It still supplies the operational context an agent needs: offline execution, idempotency, conditional mutation, and error reporting with line numbers and entropy scores.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents all three parameters, and the description's parameter list largely restates those same strings. It adds only minor value ('default: current directory', explicit default for content). Baseline 3 is correct since the schema carries the load.

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 specific verbs and resources ('scans workspace files and code buffers for hardcoded secrets and API keys', 'installs the automated git pre-commit zero-leak security guard') and explicitly contrasts the mechanism against two named siblings (entropy credentials and git hooks vs. complexity or layer rules). An agent can distinguish it from audit_code_quality and enforce_architecture_rules 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?

Dedicated 'When to use' and 'When NOT to use' sections give the trigger condition (before committing or sharing context) and route each exclusion to a named alternative tool. There is no ambiguity about which sibling to pick for quality scans or architecture enforcement.

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