Skip to main content
Glama

scan_secrets

Read-only

Recursively scans decompiled APK or decoded output directories for hardcoded AWS, Google, Slack, GitHub, Stripe, JWT, and private-key secrets, returning file, line, and type matches.

Instructions

Recursively scan a directory (typically decompile_apk or decode_apk output) for likely hardcoded secrets: AWS access keys, Google API keys, private key headers, Slack/GitHub/Stripe tokens, JWTs, and Firebase Cloud Messaging keys. A curated high-precision starting set, not exhaustive, and not a replacement for a maintained secret scanner. Only reads files; skips files over 2 MB. Returns { dirPath, filesScanned, matchCount, matches: [{ file, line, text, name }], truncated } where name is the secret type, file is relative to dirPath, line is 1-based, and text is the trimmed line (max 300 chars). For your own patterns use search_code.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dirPathYesAbsolute path of the directory to scan, e.g. the outputDir from decompile_apk. Must exist.
workspaceNoWorkspace name (not id). Created if it doesn't exist, and this call is recorded as a job in its history. Defaults to "default".
extensionsNoOnly scan files with these extensions - lowercase, with the leading dot, e.g. [".java", ".xml"]. Omit to scan every file except known binary types (.apk, .dex, .zip, .jar, .so, images, fonts).
maxResultsNoStop after this many matches. Default and maximum 200.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changedv1.3.7
    • changedInput schema / properties / dirPath / description
      Previous value: -"Directory to scan, e.g. a jadx output directory"New value: +"Absolute path of the directory to scan, e.g. the outputDir from decompile_apk. Must exist."
    • changedInput schema / properties / extensions / description
      Previous value: -"File extensions to include, e.g. [\".java\", \".xml\"]. Omit to scan all non-binary-looking files."New value: +"Only scan files with these extensions - lowercase, with the leading dot, e.g. [\".java\", \".xml\"]. Omit to scan every file except known binary types (.apk, .dex, .zip, .jar, .so, images, fonts)."
    • addedInput schema / properties / maxResults / default
      Added value: +200
    • changedInput schema / properties / maxResults / description
      Previous value: -"Cap on results, default/max 200"New value: +"Stop after this many matches. Default and maximum 200."
    • addedInput schema / properties / maxResults / maximum
      Added value: +200
    • addedInput schema / properties / maxResults / minimum
      Added value: +1
    • changedInput schema / properties / workspace / description
      Previous value: -"Workspace name (not id) - created automatically if it doesn't exist yet. Defaults to \"default\"."New value: +"Workspace name (not id). Created if it doesn't exist, and this call is recorded as a job in its history. Defaults to \"default\"."
  2. First observedv1.3.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, but the description adds real behavioral context beyond them: file-size ceiling ('skips files over 2 MB'), precision caveat ('curated high-precision... not exhaustive'), and the exact return shape. It does not add auth or rate-limit context, but for a read-only local scan that gap is minor.

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-loads purpose, then limitations, then return format — a logical order. The return-object sentence is dense but earns its place since there is no output schema; nothing is redundant filler.

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?

With no output schema, the description fully specifies the return structure including field semantics (name, relative file, 1-based line, 300-char text) and the truncated flag. An agent has everything needed to call it and interpret results.

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 all four parameters are already documented, including the decompile_apk origin for dirPath. The description adds no syntax or format detail beyond the schema, so the baseline 3 applies.

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?

States a specific verb ('Recursively scan a directory') and resource ('hardcoded secrets'), then enumerates the exact secret classes detected. It explicitly positions itself against the sibling search_code for custom patterns, so an agent can tell them apart without opening either 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?

Gives concrete when-to-use context ('typically decompile_apk or decode_apk output'), states its principal limitation ('not a replacement for a maintained secret scanner'), and names the alternative condition ('For your own patterns use search_code').

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