Skip to main content
Glama
opami-protect-mcp

opami-protect-mcp

Official
by opamiai

restore_text

Read-onlyIdempotent

Restores original private and sensitive values into placeholder-filled text using a map_id from protect_text or protect_file, running locally without network calls or API keys.

Instructions

Puts the real details back into a text that holds placeholders, using the placeholder map the server kept for a map_id from protect_text or protect_file. It runs locally: no network call and no API key. The result contains the real private and sensitive data, so call it only when you need them. Placeholders that are not in this map (for example from another map_id, or edited) stay as written. The result gives restored_count and not_found_count, so check not_found_count before you use the text. The maps live only in this server's memory: after a restart the map is gone, so protect the text again.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "text": "<text>",
      "map_id": "<map_id>"
    },
    "name": "restore_text"
  }
}

Input Schema

NameRequiredDescriptionDefault
textYesText that holds placeholders such as [PERSON_1].
map_idYesThe map_id returned by protect_text or protect_file.

Output Schema

NameRequiredDescriptionDefault
restored_textYes
restored_countYesPlaceholders put back (each occurrence counts).
not_found_countYesPlaceholder-shaped tokens such as [PERSON_7] that are not in this map_id's map; left as written.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/5

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

Beyond the readOnly/closed-world/idempotent annotations, it discloses that execution is local with no network call or API key, that the output contains real private data, that unmatched or edited placeholders are left untouched, and that maps are lost on server restart. It does not contradict readOnlyHint since no server state is mutated. Minor gap: it doesn't say whether a map_id can be reused across calls or how long maps survive.

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?

Five sentences, each carrying distinct load: purpose, locality, data-sensitivity warning, partial-match behavior, result counters, and the memory/restart caveat. Purpose and precondition are front-loaded and there is no filler.

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?

An output schema exists, yet the description still adds actionable return guidance ('check not_found_count before you use the text'), which is exactly the kind of decision rule the schema cannot convey. Combined with the restart caveat and the restricted-input note, an agent has everything needed to call it correctly and interpret the result.

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 both 'text' and 'map_id' are already documented in the schema, including the [PERSON_1] example and the map_id provenance. The description adds only the behavioral note that placeholders absent from the map stay as written, which is semantics of the result rather than of the parameters. Baseline 3 applies.

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?

States a precise verb ('puts the real details back') and resource ('a text that holds placeholders') and ties itself to a specific input source, the map_id from protect_text or protect_file. This lets an agent immediately see it is the inverse of protect_text/protect_file, distinct from detect_pii.

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?

Explicitly names the precondition (a map_id returned by protect_text or protect_file) and gives a clear when-to-use guard: call it only when you actually need the real sensitive data. It also adds an operational exclusion ('maps live only in memory, so protect the text again after a restart'), which tells the agent when this call will fail and what to do instead.

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

Deploy Server

Other Tools