Skip to main content
Glama

Find and redact API keys, tokens, private keys and passwords in text

spill_scan_secrets
Read-onlyIdempotent

Use when the user asks whether some text contains secrets, or before you paste, commit, share, log or send code, a .env file, a diff, config, logs, a stack trace or a prompt that might contain credentials, for example "did I leak a key in this?", "is this safe to post?" or "redact the secrets in this log". Detects 48 services by exact key format (OpenAI, Anthropic, Gemini/Google, Groq, xAI, OpenRouter, Stripe, Supabase, AWS, GitHub, GitLab, npm, PyPI, Slack, Discord, Twilio, SendGrid, Resend, Shopify, Cloudflare and more) plus PEM private keys, database URLs with passwords, JWTs, Authorization headers and high-entropy values in variables named like secret, token, api_key or password. It verifies what it can deterministically: GitHub token CRC32 checksums, JWT and Supabase key role and expiry (service_role vs anon), documented example keys and placeholders, and NEXT_PUBLIC_/VITE_/EXPO_PUBLIC_ variables that ship to every browser. Returns findings with severity (critical, high, medium, public, info), line and column, a masked preview (never the full secret), why it matters, the fix and the provider's revoke URL, plus a redacted copy with labels like [STRIPE_SECRET_KEY_1]. Text is processed in memory to answer and is not stored. Limits: format-based, so a random secret with a neutral name can be missed; it never tests keys against providers; up to 200,000 characters. The same scanner also runs entirely in the browser at https://spill.clawhard.com.

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": {
      "text": "<text>"
    },
    "name": "spill_scan_secrets"
  }
}

Input Schema

NameRequiredDescriptionDefault
textYesThe text to scan: code, a diff, .env, config, logs, a stack trace, a chat or a prompt.
redact_public_keysNofalse (default): keep keys that are meant to be public (Stripe pk_, Supabase anon or publishable, Mapbox pk.) in the redacted copy so the code still runs. true: hide them too.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.8/5.0
Behavior5/5

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

With readOnlyHint/idempotent already declared by annotations, the description adds substantial context: processing is in memory and not stored, previews are masked and never show the full secret, keys are never tested against providers, there is a 200,000-character cap, and it can verify checksums, JWT roles/expiry and NEXT_PUBLIC_-style browser exposure. Nothing contradicts the annotations.

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 the usage trigger and examples, then detection scope, verification, output shape, limits and privacy — every clause carries information. It is dense as a single paragraph and the 20-provider list is longer than needed, but no sentence is 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?

No output schema exists, yet the description specifies the return shape (severity levels, line/column, masked preview, rationale, fix, revoke URL, labeled redacted copy) plus limits, size cap and privacy posture. An agent can predict results and call the tool correctly with no further information.

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

Parameters4/5

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

Schema coverage is 100% and both parameters are self-documenting, so baseline would be 3. The description adds marginal value by explaining the public-vs-secret distinction (keys that ship to every browser, 'public' severity) that motivates redact_public_keys, though it never names the parameter or its default directly.

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+resource (detect secrets in text and return a redacted copy) and enumerates detectable categories and 48 services with real examples. The first sentence alone tells an agent this is a secret scanner, not a general text transformer.

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?

Opens with explicit triggers: 'Use when the user asks whether some text contains secrets, or before you paste, commit, share, log or send...' and gives three concrete user-utterance examples. It also names the conditions where it fails ('format-based, so a random secret with a neutral name can be missed'), which functions as a when-not-to-rely-on-it caveat.

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.

Resources