Skip to main content
Glama
GigantesHJI

securedact-mcp

prepare_for_external_ai

Sanitizes sensitive text locally before external AI use, ensuring policy compliance and blocking data leakage. Returns approved sanitized text for safe outbound workflows.

Instructions

Use this before sending user-supplied or potentially sensitive text to an external AI service.

SecuRedact inspects and sanitizes the text locally and returns the policy-approved representation; this tool does not transmit the text externally. It is the recommended default for outbound AI workflows. Use analyze_text for inspection-only classifications, redact_text for the lower-level compatibility path, create_safe_copy when a sanitized file is required, and restore_text only to reverse a prior local session in a trusted context.

Returns a JSON object with 'status' ('ok', 'review_required', or 'blocked'), 'sanitized_text' (present only when approved), 'counts', 'policy', and optionally 'restoration_session' (when response_mode is 'restore_capable').

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYesFree text to inspect and sanitize locally before it is sent to an external AI service. All processing happens on this machine; this tool never transmits the text to any provider.
policyNoNamed redaction policy controlling which entity types are masked or blocked. Defaults to 'strict_external_ai'. Common values include 'strict_external_ai' and 'default'; other policies may be registered in your environment. An unknown name returns a policy_not_found error.strict_external_ai
languageNoHint for the contextual detection language. One of 'auto' (detect automatically), 'en', or 'nl'. Defaults to 'auto'.auto
response_modeNoAmount of detail returned. 'minimal' returns only the approved result and counts; 'review' adds per-detection findings for human review; 'debug' adds engine internals (only when debug responses are enabled); 'restore_capable' additionally returns a local restoration_session for later trusted restore_text. Defaults to 'minimal'.minimal

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv0.4.2
    • addedInput schema / properties / language / description
      Added value: +"Hint for the contextual detection language. One of 'auto' (detect automatically), 'en', or 'nl'. Defaults to 'auto'."
    • addedInput schema / properties / policy / description
      Added value: +"Named redaction policy controlling which entity types are masked or blocked. Defaults to 'strict_external_ai'. Common values include 'strict_external_ai' and 'default'; other policies may be registered in your environment. An unknown name returns a policy_not_found error."
    • addedInput schema / properties / response_mode / description
      Added value: +"Amount of detail returned. 'minimal' returns only the approved result and counts; 'review' adds per-detection findings for human review; 'debug' adds engine internals (only when debug responses are enabled); 'restore_capable' additionally returns a local restoration_session for later trusted restore_text. Defaults to 'minimal'."
    • addedInput schema / properties / text / description
      Added value: +"Free text to inspect and sanitize locally before it is sent to an external AI service. All processing happens on this machine; this tool never transmits the text to any provider."
  2. Addedv0.2.0

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations provided, the description carries the full transparency burden and does well by stating that the tool does not transmit text externally, operates locally, can return different statuses, and optionally creates a restoration session. It also discloses the policy_not_found error behavior. It could go slightly further on whether any local state or session data is persisted, but overall it is transparent for a sanitization 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 front-loaded with the primary use case, then a clear sibling-routing paragraph, then a concise output contract. Every sentence earns its place, and the structure makes it easy for an agent to scan quickly.

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?

The description covers when to use the tool, how it behaves, what alternatives exist, and what the return value looks like including statuses and optional fields. With a rich input schema and output schema present, nothing essential is missing for an agent to select and invoke it correctly.

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%, and the input schema already explains text, policy, language, and response_mode in detail. The description adds little new parameter-level meaning beyond the schema, but the schema is fully sufficient, so the baseline score of 3 is appropriate.

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 states a specific use case: preparing user-supplied or sensitive text before sending it to an external AI service, with local sanitization via SecuRedact. It clearly differentiates from siblings by naming each alternative and its purpose (analyze_text, redact_text, create_safe_copy, restore_text).

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?

It explicitly recommends this tool as the default for outbound AI workflows and gives concrete routing rules: analyze_text for inspection-only, redact_text for lower-level compatibility, create_safe_copy when a file is needed, and restore_text only for reversing a prior local session. This leaves little ambiguity about when to choose it.

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