Skip to main content
Glama

Scan for secrets

scan_secrets
Read-only

Scans a project directory for .env files, private keys, and tokens before commit, flagging file and line without exposing the secret.

Instructions

Look for .env files, private keys and tokens in everything that would be committed. Reports file and line, never the secret itself.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dirYesProject folder (absolute path, or relative to the server's working directory).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

With only readOnlyHint=true declared, the description adds real value: it defines the scan scope (staged/committable content) and, importantly, discloses the output behavior that 'reports file and line, never the secret itself' — a meaningful safety property for a secrets scanner with no output schema. It stops short of noting limits, e.g. whether it blocks commits or is purely advisory.

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?

Two tight sentences with zero filler; the scan scope comes first and the reporting guarantee second, both front-loaded and each earning its place.

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?

For a single-parameter, read-only tool with no output schema, the description supplies the key missing piece — what the results look like and that secrets are never echoed. Minor gap: no guidance on how findings should influence subsequent actions (e.g. whether to proceed with git_commit).

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% and there is only one parameter, so the schema already documents 'dir' fully. The description adds no path-format or scope nuance beyond what the schema states, making the baseline 3 appropriate.

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?

States a specific verb (scan/look for) and concrete resource set (.env files, private keys, tokens) scoped to 'everything that would be committed', which is more precise than a generic file scan. It does not explicitly distinguish itself from near-neighbors like preflight or check_names, so it falls just short of 5.

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?

The phrase 'everything that would be committed' implies the pre-commit context, but there is no explicit when-to-use, when-not-to-use, or named alternative among siblings (preflight, run_checks). Usage is inferable rather than stated.

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