Skip to main content
Glama

promptshift_sanitize_secrets

Inspect and redact exposed private credentials in AI prompt instructions in memory before committing, sharing, or deploying to prevent leaks.

Instructions

Inspect and redact exposed private credentials (OpenAI sk-, Anthropic sk-ant-, AWS AKIA*, GitHub ghp_*, Google AIza*, Stripe sk_*) from prompt instructions in-RAM. Use this tool before committing, sharing, or deploying AI prompts to prevent credential leaks. Do not use for cryptographic key generation or data encryption. Pure idempotent scanner executing with zero persistent retention.

Input Schema

NameRequiredDescriptionDefault
textYesText, system prompt, or configuration file content to inspect and sanitize.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and discloses meaningful behavior: in-RAM processing, zero persistent retention, and idempotent scanning. It still does not clarify whether the input text is mutated in place or whether a redacted copy/report is returned, which is important for a redaction tool.

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?

The description is three tight sentences, front-loading the core action and credential examples. Every sentence contributes: the first states what it does, the second states when to use it, the third states an exclusion and key behavioral traits.

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 one-parameter scanner with no output schema, the description is largely complete: it explains purpose, timing, exclusions, patterns, and retention behavior. The main gap is the lack of return-value description, since there is no output schema to define whether the caller receives redacted text, a report, or both.

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 the single 'text' parameter is already documented in the input schema. The description adds useful context about the credential patterns being detected, but it does not add syntax, formatting, or validation details beyond the schema baseline.

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?

The description uses a specific verb pair, 'Inspect and redact,' on a clear resource: exposed private credentials in prompt instructions. It lists concrete credential patterns (OpenAI sk-*, AWS AKIA*, GitHub ghp_*, etc.), so an agent can immediately distinguish this sanitization tool from its transpile/validate siblings.

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

Usage Guidelines4/5

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

It gives explicit usage timing: 'before committing, sharing, or deploying AI prompts' and a clear exclusion: 'Do not use for cryptographic key generation or data encryption.' It does not name alternatives such as promptshift_validate_ast or promptshift_transpile, so it stops short of full when/when-not/alternative routing.

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