Skip to main content
Glama

detect_secrets

Read-onlyIdempotent

Scan code or config files for hardcoded secrets: AWS keys, GitHub tokens, OpenAI/Anthropic API keys, Stripe secrets, JWTs, Slack/Teams/Discord webhook URLs, session cookies, database connection strings, and generic passwords. Returns findings with severity.

Example tool call

This call uses example arguments supplied in the tool’s input schema.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "input": "redis://cache:6379"
    },
    "name": "detect_secrets"
  }
}

Input Schema

NameRequiredDescriptionDefault
inputYesCode or config content to scan (max 500KB)
filenameNoOptional filename for context (e.g. ".env", "config.js")

Output Schema

NameRequiredDescriptionDefault
filenameNo
findingsNo
risk_levelNo
recommendationNo
total_findingsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "input": "redis://cache:6379"
      +  }
      +]
  2. First observed

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false, and closed-world, so safety and repeatability are covered. The description adds genuinely useful behavioral detail: it says results are findings tagged with severity, which tells the agent the output is graded rather than binary. It does not mention rate limits, auth, or whether findings include line numbers, so it goes modestly beyond annotations rather than substantially.

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?

Two sentences, front-loaded with the verb and resource, then a dense but scannable enumeration of detection categories. The long secret-type list earns its place by telling the agent what coverage to expect; nothing is padded or restated from the name.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Return values are covered by the output schema and safety by annotations, so the description doesn't need to explain those. However, for a tool sitting in a crowded security-scanning family with a near-identical sibling (secret_scan), the absence of any disambiguation leaves a real completeness gap.

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 coverage is 100% with only two well-described parameters, so the baseline is 3. The description's mention of "code or config files" loosely corroborates what belongs in `input` but adds no format, size, or filename-behavior detail beyond the schema.

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?

Specific verb plus resource ("Scan code or config files for hardcoded secrets") with an unusually concrete enumeration of what it detects (AWS keys, JWTs, webhook URLs, connection strings). That is far more informative than a tautology. It loses a point because a sibling named secret_scan exists and the description never says how these two differ, so an agent cannot fully disambiguate from the text alone.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

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

There is no explicit when-to-use, when-not-to-use, or routing guidance. The phrase "Scan code or config files" implies the input domain, but with siblings like secret_scan, redact_pii, and cookie_security_audit in the same family, the agent is left to infer which tool handles which case.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.