Skip to main content
Glama

unescape_nested_json_logs

Read-onlyIdempotent

Recursively unescape nested stringified JSON fields in gateway, Kafka, or OpenTelemetry .json/.jsonl logs while preserving 64-bit IDs and redacting JWT signatures.

Instructions

Recursively un-escapes nested stringified JSON fields inside gateway, Kafka, or OpenTelemetry .json/.jsonl logs while preserving exact 64-bit Snowflake IDs and redacting JWT signatures.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "unescape_nested_json_logs"
  }
}

Input Schema

NameRequiredDescriptionDefault
filePathNoOptional local file path to a .json or .jsonl log file on disk when payloadContent is omitted.
payloadContentNoRaw JSON or multi-line .jsonl log text containing double- or triple-escaped JSON string fields.
quoteUnsafeNumbersNoWhen true, quotes unsafe int64/uint64/decimal literals as strings in the un-escaped output so downstream JSON.parse() callers stay lossless.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive, and closed-world, so the safety profile is covered. The description adds real behavior beyond that: recursive traversal of nested stringified fields, lossless 64-bit Snowflake ID preservation, and JWT signature redaction. It does not describe error handling or what the transformed output looks like, which keeps it off a 5.

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 sentence with no filler, front-loaded on the core action and followed by the two behavioral guarantees. It is dense but every clause carries information; a slight overload of three distinct claims in one sentence is the only reason it is not a 5.

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?

Annotations cover safety and there is no output schema to explain, so the main burden is purpose and input selection. However, with zero required parameters and no output schema, the description never states what happens when neither filePath nor payloadContent is supplied, nor what the tool returns — a real gap for a transformation tool.

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 all three parameters are already documented in the schema, making 3 the baseline. The description's mention of preserving Snowflake IDs is relevant to number handling but does not clarify the relationship between that default behavior and the quoteUnsafeNumbers flag, so it adds little param-level meaning.

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 opens with a specific verb and resource ('Recursively un-escapes nested stringified JSON fields') and scopes it to gateway, Kafka, or OpenTelemetry .json/.jsonl logs. It also names two distinguishing behaviors (64-bit Snowflake ID preservation, JWT signature redaction) that separate it from the bigint-inspection sibling. It stops short of naming any sibling explicitly, so the differentiation is implicit.

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?

The log-source framing ('gateway, Kafka, or OpenTelemetry .json/.jsonl logs') and the 'double- or triple-escaped' phrasing give an implied trigger for use. There is no explicit when-not condition and no routing to a sibling such as inspect_lossless_bigint_json for plain inspection, so the agent must infer the boundary.

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