Skip to main content
Glama

Find hard-coded secrets

secrets_scan
Read-only

Detect hard-coded API keys, tokens, private keys, and passwords in source and config files. Returns redacted JSON findings with provider, file, and line so agents can fix exposed credentials.

Instructions

Find hard-coded secrets and credentials (API keys, tokens, private keys, passwords) in source and config files.

Returns JSON with findings (provider, file, line) and _run_id. Secret values are redacted in the output. Read-only and local.

Defect and Review records remain complete. Advice is grouped by default; expand_advice=True includes every Advice record. Read _result_uri for the complete saved result without rescanning.

Requires SKYLOS_API_KEY: this tool returns an authentication error unless the MCP server is started with SKYLOS_API_KEY set. Without a key, analyze works (5 calls/day) and the local map tools (change_map and the graph_* tools) work with no limit. The local CLI needs no key: skylos verify <file> and skylos agent install-hooks.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "path": "<path>"
    },
    "name": "secrets_scan"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesDirectory or file to scan. A relative path resolves against the MCP server's working directory.
confidenceNoMinimum confidence (0-100) for dead-code findings. Higher values report fewer, surer candidates; 60 is the CLI default.
expand_adviceNoInclude every Advice record instead of rule-group counts; complete results are always available through _result_uri.
exclude_foldersNoFolder names to skip, e.g. ["migrations", "scripts"]. When given, this list replaces the default excludes (node_modules, .venv, build, dist and similar); omit it to keep the defaults.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv4.49.0
    • addedInput schema / properties / confidence / description
      Added value: +"Minimum confidence (0-100) for dead-code findings. Higher values report fewer, surer candidates; 60 is the CLI default."
    • addedInput schema / properties / exclude_folders / description
      Added value: +"Folder names to skip, e.g. [\"migrations\", \"scripts\"]. When given, this list replaces the default excludes (node_modules, .venv, build, dist and similar); omit it to keep the defaults."
    • addedInput schema / properties / expand_advice
      Added value: +{
      +  "default": false,
      +  "description": "Include every Advice record instead of rule-group counts; complete results are always available through _result_uri.",
      +  "title": "Expand Advice",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / path / description
      Added value: +"Directory or file to scan. A relative path resolves against the MCP server's working directory."
  2. Addedv4.10.0

TDQS

B3.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, and openWorldHint=false, so the safety profile is covered. The description adds real value beyond that: output shape (provider, file, line) plus `_run_id`, explicit redaction of secret values, and a hard auth precondition (SKYLOS_API_KEY) with the exact failure mode and per-tool rate limits. The only gap is that it does not say how large a repo it can handle or what happens on partial/binary files.

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

Conciseness2/5

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

The purpose and the auth requirement are front-loaded, which is good, but the middle block ('Defect and Review records remain complete. Advice is grouped by default...') and the dead-code framing read as boilerplate carried over from a different tool and do not earn their place in a secrets scanner description. The agent must sift irrelevant sentences to find the two that matter (redaction and the API-key precondition).

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?

An output schema exists, so the description did not need to describe return values, yet it spends lines on findings shape and `_result_uri`. The auth prerequisite and rate limits are genuinely necessary and present. What is missing for a 4-parameter security scanner is coverage of scope/limits (repo size, binary or vendored-file handling) and how results differ from the sibling security_scan.

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%, so all four parameters including path, confidence, expand_advice, and exclude_folders' default-replacement behavior are already documented in structured fields; baseline 3 applies. The description adds only a restatement of expand_advice and the `_result_uri` escape hatch, and it never mentions path, confidence, or exclude_folders, so it contributes little parameter meaning of its own.

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?

The opening sentence gives a specific verb and resource ('Find hard-coded secrets and credentials') and enumerates the covered secret classes (API keys, tokens, private keys, passwords) plus the file scope (source and config files). It does not differentiate itself from plausible siblings such as security_scan or provenance_scan, so the agent must infer that this tool is the secret-specific scanner rather than a general security pass.

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?

Usage context is implied rather than stated: 'Read-only and local' plus the SKYLOS_API_KEY paragraph tells the agent when the call will succeed or fail and names fallbacks (analyze at 5 calls/day, change_map, graph_* tools, the local CLI). However, there is no guidance on when to choose this over security_scan or provenance_scan for overlapping security questions, so task-selection guidance is missing.

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