Skip to main content
Glama

Redact JSON

redact_json

Redact sensitive values in JSON documents while preserving their structure, using field-name hints and configurable policies to protect PII, PHI, and secrets.

Instructions

Redact a JSON document while keeping its structure. Field names count as evidence: values under keys like 'name' or 'address' are redacted whole.

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": {
      "data": "<data>"
    },
    "name": "redact_json"
  }
}

Input Schema

NameRequiredDescriptionDefault
dataYesA JSON object/array, or a JSON string
modeNoReplacement mode: one of placeholder, synthetic, hash, mask, label. Default: server setting.
policyNoPolicy pack(s), e.g. 'hipaa', 'dpdp,secrets', 'all,-URL'. Default: server setting.
session_idNoReuse an existing session for consistent tokens. Omit to start a new one.
use_field_hintsNoAlso redact whole values under telling keys (name, aadhaar, password…)

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare the safety profile (not read-only, not destructive, not idempotent), so the bar is lower. The description adds real behavioral context by explaining that key names act as evidence and that matching values are redacted whole — but it presents this as unconditional even though use_field_hints defaults to true and can be disabled, and it says nothing about the persistent session that session_id implies.

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?

Two sentences with zero waste. The core guarantee (structure preserved) is front-loaded, then the non-obvious redaction rule is added immediately after.

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?

Output schema exists, so return values need not be explained, and every parameter is documented in the schema. The definition is nearly sufficient for a mutation-flavoured tool; the only real omissions are the effect of creating a session and the interaction between the stated field-name rule and use_field_hints being toggleable.

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 all five parameters, including mode, policy, session_id and use_field_hints, already carry their own descriptions. The description reinforces the intent of the field-hint heuristic but adds no new parameter-level detail such as mode/policy syntax or the consistency guarantees of a reused session; baseline 3 applies 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 states a specific verb and resource: redact a JSON document, with the explicit constraint that structure is preserved. That scope separates it implicitly from file-oriented siblings, though it never names redact or redact_file to make the distinction unambiguous.

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 by the phrase 'a JSON document', which suggests in-memory payloads rather than files. There is no statement of when to prefer this over redact or redact_file, no prerequisites, and no mention of when reusing a session is appropriate despite session_id being a parameter.

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