Skip to main content
Glama

Re-identify from a client-held token map (legacy)

reinstate
Read-only

Reverse a redaction by replacing tokens with original values from a client-supplied token map, restoring personal data in the result.

Instructions

LEGACY: reverse a redaction using a token map held by the client (from the legacy redact tool). Restored personal data will appear in this tool result. For session-based restoration that keeps mappings server-side, use protect + release_to_file.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYesText containing Redacta tokens to restore.
token_mapYesToken map, e.g. {"[NHS_NUMBER_1]": "943 476 5919"}.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.1.0

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, and the description adds important behavioral context: restored personal data will appear in the tool result, which is a meaningful privacy warning. The description does not mention edge cases like unmapped tokens, but the read-only annotation covers the safety profile and there is no contradiction.

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 two sentences with no wasted words. 'LEGACY:' is front-loaded, immediately signaling the tool's status, and each sentence serves a distinct purpose: explaining what it does and directing to an alternative when appropriate.

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?

For a simple two-parameter legacy transform with a readOnly annotation, the description is nearly complete: it identifies inputs, warns about PII exposure, and names the alternative workflow. A small gap is that it does not explicitly state the return format, though the description's mention of restored personal data appearing in the result covers the main concern.

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?

The input schema already documents both parameters fully, so the baseline is 3. The description adds value by clarifying that the token_map is client-held from the legacy redact tool and that the text contains Redacta tokens, which helps the agent understand the provenance and expected format of the inputs.

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 clearly states the operation: reverse a redaction using a client-held token map from the legacy redact tool. It also differentiates this tool from session-based restoration by naming protect and release_to_file as the alternative, so an agent can identify this tool's exact role.

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 usage guidance: use this tool for legacy client-held token maps, and for session-based restoration that keeps mappings server-side, use protect + release_to_file. This provides both a clear when-to-use and when-not-to-use signal.

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