Skip to main content
Glama

Desescapar cadena JSON

json-string-unescape
Read-onlyIdempotent

Interpreta el cuerpo de un literal de cadena JSON y devuelve el texto. Cuándo: hay que convertir bytes o texto a esta codificación, o desde ella, con exactitud y sin adivinar. No para: escapar texto como literal de cadena JSON (json-string-escape). Efectos secundarios: ninguno (solo lectura, sin red, sin estado guardado). Determinista: la misma entrada da la misma salida. Límites: entrada JSON de hasta 64 KB, 1 s por llamada, resultado de hasta 1 MB.

EN: Parses the body of a JSON string literal (with or without quotes) and returns the raw text. When: bytes or text have to be converted to or from this encoding exactly, without guessing. Not for: escaping text as the body of a JSON string literal (json-string-escape). Side effects: none (read-only, no network access, no stored state). Deterministic: the same input gives the same output. Limits: JSON input up to 64 KB, 1 s per call, result up to 1 MB.

Input Schema

NameRequiredDescriptionDefault
escapedYesEscaped JSON string body (string; required).

Output Schema

NameRequiredDescriptionDefault
textNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / escaped / examples
      Added value: +[
      +  "He said \\\"hi\\\"\\n"
      +]
  2. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already cover read-only, closed-world, idempotent and non-destructive, yet the description adds real context: no network, no stored state, determinism, and concrete resource caps (64 KB input, 1 s per call, 1 MB result). It also discloses that the input may be given with or without surrounding quotes, which is behavior the schema does not state. It loses a point because the stated 64 KB input cap conflicts with the schema's 1 MB maxLength, which could mislead an agent about the real boundary.

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?

Each labeled segment (When / Not for / Side effects / Deterministic / Limits) is front-loaded and scannable. The only waste is that the entire content is duplicated verbatim in Spanish and English, roughly doubling the length without adding information.

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?

An output schema exists, so return-value explanation is rightly omitted, and a single-parameter tool needs little more. The only gap is the inconsistency between the documented 64 KB input limit and the schema's larger maxLength, which should be reconciled so an agent knows the true ceiling.

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?

Schema coverage is 100%, so the baseline is 3, and the description earns an increment by clarifying that the 'escaped' value is accepted with or without quotes — a genuine semantic point the schema's one-line description omits. Beyond that it adds no format or escaping-rules detail.

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 specific verb and resource ('parses the body of a JSON string literal ... returns the raw text') and immediately distinguishes itself from the escape direction. The explicit 'Not for: ... (json-string-escape)' removes any ambiguity against the nearest sibling in a catalogue of hundreds.

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 'When' clause gives the positive condition (exact conversion to/from this encoding, no guessing) and the 'Not for' clause names the alternative tool by name with its opposite purpose. This is the when/when-not/alternative triad done explicitly.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources