Skip to main content
Glama
GigantesHJI

securedact-mcp

prepare_for_external_ai

Read-onlyIdempotent

Sanitize sensitive text locally before sending to external AI. Inspects and redacts policy-defined data without transmitting original, returning approved content.

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?

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, so the agent knows the safety profile. The description adds valuable context: it explicitly states that the tool does not transmit text externally and that processing is local. It also discloses that unknown policy names return a policy_not_found error and describes the response structure (status field with values). This goes beyond annotations to explain operational behavior.

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?

The description is focused and well-structured. It opens with a clear directive and then alternates between contrasts and return-format details. Every sentence adds value, and the return format is clearly specified. It loses one point for being slightly longer than necessary, but it is still quite efficient with no fluff.

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?

The tool is moderately complex with 4 optional parameters and an output schema, so the description does not need to explain return values in detail. It covers key aspects: what it does, when to use it, distinctions from siblings, policy parameter semantics, and the response_mode conditional field. It does not mention rate limits or auth, but given the annotations indicate a safe read-only operation and the schema is fully documented, a 4 is appropriate for completeness.

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 description coverage is 100%, so the baseline is 3. The description adds significant parameter semantics beyond the schema: it explains the 'policy' parameter with default value and common values, warns about unknown policies causing errors; it clarifies 'response_mode' values including 'restore_capable' and mentions the conditional 'restoration_session' field in the output. It also explains 'language' options globally. This enriches parameter understanding.

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 begins with a clear directive: 'Use this before sending user-supplied or potentially sensitive text to an external AI service.' It specifies the action ('inspects and sanitizes'), the resource ('text'), and the local scope ('does not transmit the text externally'). It names its siblings and contrasts with them, making it easy to distinguish from alternatives like analyze_text and redact_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?

The description explicitly states when to use it ('before sending... to an external AI service') and what it is not for. It enumerates alternative tools by name and explains their different purposes: '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.' This gives clear routing guidance.

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