Skip to main content
Glama
GigantesHJI

securedact-mcp

restore_text

Restore original text from SecuRedact placeholders using a prior restoration session. Recover sensitive values locally for trusted review without external transmission.

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.8/5.0
Behavior5/5

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

Annotations carry almost no signal (all hints false), so the description bears full responsibility for behavioral disclosure, and it delivers: local-only processing, that restored values are raw PII/secrets never to be transmitted, that the mapping form bypasses the session vault, and the exact response contract (status, restored_text, reason_codes). This goes well beyond what the annotations provide and directly informs safe invocation.

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 purpose is front-loaded and the structure flows from what-it-does to when-to-use to security boundary to return format. It is somewhat longer than necessary — the mapping/trusted_local_review constraint is stated both in the description and in the schema — but the repeated security warnings are justified given the sensitivity of restored data.

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?

With an output schema present and 100% parameter coverage, the description needs only to add selection and safety context, which it does thoroughly. An agent has everything needed to decide when to call it, which parameters to supply, what security posture to assume, and what the response will contain.

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 raises it by explaining the two mutually exclusive invocation forms (restoration_session vs mapping + trusted_local_review) and adding the security consequence of the mapping form. It adds semantic cohesion among the parameters that the schema's individual field descriptions do not provide.

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 opens with a specific verb and resource ('Reverse a prior SecuRedact protection step') and clearly frames the operation as trusted-local reconstruction. It also differentiates itself from the key sibling by explicitly naming prepare_for_external_ai as the tool for the opposite direction, so an agent can disambiguate without opening schemas.

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?

Usage conditions are explicit: call it only after receiving a restoration_session from a prior SecuRedact step, never to sanitize data, and never on text not previously protected. It names the alternative tool (prepare_for_external_ai) and states the exact precondition ('restore_capable'), leaving no ambiguity about when this tool applies.

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