Skip to main content
Glama
GigantesHJI

securedact-mcp

restore_text

Reverse SecuRedact protection locally to restore original text for trusted review using a prior restoration session.

Instructions

Reverse a prior SecuRedact protection step in a trusted, local-only context.

Use this ONLY after you previously received a restoration_session from SecuRedact (for example from prepare_for_external_ai with response_mode 'restore_capable') and now need to reconstruct the original text locally for trusted review. Restoration can reveal the original sensitive values (PII, secrets, credentials); it is a trusted-local operation, not a step to prepare data for external transmission. Never call it to sanitize or prepare text for an external AI; for that use prepare_for_external_ai. Never call it on text you did not previously protect with SecuRedact.

Security boundary: all processing is local and nothing leaves the machine. The 'mapping' form requires trusted_local_review=true and exposes raw originals, so its output must never be transmitted. Returns a JSON object with 'status' ('ok' or 'blocked'), 'restored_text' (present only on success), and 'reason_codes' describing any failure.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYesText containing SecuRedact placeholders (or a prior protected representation) to restore. Processed locally; never transmitted.
mappingNoLegacy direct mapping from placeholder token to original value. Supplying this bypasses the session vault and immediately reveals the original sensitive values. It is only honored when 'trusted_local_review' is true and 'restoration_session' is omitted.
restoration_sessionNoOpaque session token previously returned by SecuRedact (for example from prepare_for_external_ai with response_mode 'restore_capable'). It identifies the trusted local vault entry used to reverse protection and recover the original values. Required unless you supply 'mapping' together with trusted_local_review.
trusted_local_reviewNoExplicit acknowledgment that you are in a trusted local review context and accept that restoration reveals original sensitive values. Required (true) to use the 'mapping' form. It has no effect on the 'restoration_session' form.

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 / mapping / description
      Added value: +"Legacy direct mapping from placeholder token to original value. Supplying this bypasses the session vault and immediately reveals the original sensitive values. It is only honored when 'trusted_local_review' is true and 'restoration_session' is omitted."
    • addedInput schema / properties / restoration_session / description
      Added value: +"Opaque session token previously returned by SecuRedact (for example from prepare_for_external_ai with response_mode 'restore_capable'). It identifies the trusted local vault entry used to reverse protection and recover the original values. Required unless you supply 'mapping' together with trusted_local_review."
    • addedInput schema / properties / text / description
      Added value: +"Text containing SecuRedact placeholders (or a prior protected representation) to restore. Processed locally; never transmitted."
    • addedInput schema / properties / trusted_local_review / description
      Added value: +"Explicit acknowledgment that you are in a trusted local review context and accept that restoration reveals original sensitive values. Required (true) to use the 'mapping' form. It has no effect on the 'restoration_session' form."
  2. Changed11 schema fields changedv0.2.0
    • removedInput schema / properties / mapping / additionalProperties
      Removed value: -{
      -  "type": "string"
      -}
    • addedInput schema / properties / mapping / anyOf
      Added value: +[
      +  {
      +    "additionalProperties": {
      +      "type": "string"
      +    },
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / mapping / default
      Added value: +null
    • removedInput schema / properties / mapping / type
      Removed value: -"object"
    • addedInput schema / properties / restoration_session
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Restoration Session"
      +}
    • addedInput schema / properties / trusted_local_review
      Added value: +{
      +  "default": false,
      +  "title": "Trusted Local Review",
      +  "type": "boolean"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "text",
      -  "mapping"
      -]New value: +[
      +  "text"
      +]
    • addedOutput schema / additionalProperties
      Added value: +true
    • removedOutput schema / properties
      Removed value: -{
      -  "result": {
      -    "title": "Result",
      -    "type": "string"
      -  }
      -}
    • removedOutput schema / required
      Removed value: -[
      -  "result"
      -]
    • changedOutput schema / title
      Previous value: -"restore_textOutput"New value: +"restore_textDictOutput"
  3. First observedv0.1.0

TDQS

A4.9/5.0
Behavior5/5

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

With no annotations provided, the description takes full responsibility for behavioral disclosure. It reveals that processing is entirely local and nothing leaves the machine, that the mapping form requires trusted_local_review=true and exposes raw originals that must never be transmitted, and it details the return format including 'status', 'restored_text', and 'reason_codes' for failures. This goes well beyond the schema and covers security-boundary concerns comprehensively.

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 structured with a clear lead sentence stating the core action, followed by usage conditions and security boundary in a logical flow. Every sentence contributes new information—no redundancy or fluff—and the critical constraints (local-only, trusted-review) are front-loaded. The length is justified by the security-sensitive nature of the operation.

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?

For a security-sensitive restoration tool with no annotations and no explicit output schema details (though an output schema exists), the description is remarkably complete. It covers preconditions, security boundaries, parameter interactions, failure handling via reason_codes, and explicitly routes to the correct sibling for sanitization. Nothing an agent needs to call it correctly and safely is missing.

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%, so the baseline is 3. However, the description enriches the parameters: it explains the mapping parameter as 'legacy direct mapping' that bypasses the session vault and immediately reveals originals, describes restoration_session as an opaque token identifying the trusted vault entry, and clarifies that trusted_local_review is an acknowledgment with no effect on the session form. These security-relevant semantics add value beyond the schema.

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 'Reverse' and identifies the resource as 'a prior SecuRedact protection step', clearly stating the local trusted-review purpose. It explicitly distinguishes itself from sibling tools by warning against using it for external AI preparation and pointing to prepare_for_external_ai for that role, so it is immediately differentiated.

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 gives explicit preconditions: use only after receiving a restoration_session from SecuRedact (e.g., from prepare_for_external_ai with response_mode 'restore_capable'), and never on text not previously protected. It also names the alternative tool and states the exact negative condition ('never call it to sanitize or prepare text for an external AI'), leaving no ambiguity about when to choose this tool.

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