Skip to main content
Glama

ztds_restore

Restores original cleartext values in LLM output by reversing local in-memory token mappings, so sanitized responses can be displayed with their real data.

Instructions

Restore authentic cleartext values into LLM-generated output from local in-memory token mapping.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYesThe sanitized response text received from the LLM containing surrogate tokens.
sessionIdNoOptional session identifier used during initial sanitization.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden. It does disclose the key mechanism ("local in-memory token mapping"), which usefully implies statefulness and that the mapping is scoped to the local process. It does not state failure behavior on an unknown/expired session, whether the restore is read-only or consumes the mapping, or any auth requirements.

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?

A single tight sentence that front-loads the action and the payload, with no filler. It is appropriately sized, though it could carry one more clause about session requirements at little cost.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool is simple (two parameters, no nested objects, no output schema) and the description covers the core transformation and its state source. It omits session-scoping semantics and failure modes, which matter for a stateful in-memory restore operation, so it is adequate but not complete.

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 description coverage is 100%, so both parameters are already documented, including that sessionId is optional and set during sanitization. The description adds no format, matching, or fallback semantics for text or sessionId. Baseline 3 is appropriate when the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description pairs a specific verb ("Restore") with a specific resource ("authentic cleartext values") and the target artifact ("LLM-generated output"), which is far more precise than a tautology. It does not name or explicitly contrast with ztds_sanitize, though the inverse relationship is inferable from the sibling names.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is only implied: the agent can infer this is the reverse step of ztds_sanitize and applies to text containing surrogate tokens. There is no explicit statement of when to call it versus ztds_reset_session or ztds_audit, and no stated prerequisite that it must run in the same process/session that performed the sanitization.

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