Skip to main content
Glama

Tinplate AI Agent Security & Guardrails MCP

tinplate_json_heal

Read-onlyIdempotent

Repair malformed JSON and LLM outputs (markdown fences, trailing commas, single quotes, unquoted keys, truncated delimiters) with optional JSON Schema validation offline. (Endpoint: POST /v1/json-heal)

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": {
      "raw": "<raw>"
    },
    "name": "tinplate_json_heal"
  }
}

Input Schema

NameRequiredDescriptionDefault
rawYesMalformed JSON or LLM output string (max 256 KB).
schemaNoOptional JSON Schema (draft subset) to validate the healed JSON against without eval.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • removedInput schema / properties / raw / example
      Removed value: -"```json\n{ name: 'Tinplate', tags: ['api', 'edge',], active: True, }\n```"
    • removedInput schema / properties / schema / example
      Removed value: -{
      -  "properties": {
      -    "active": {
      -      "type": "boolean"
      -    },
      -    "name": {
      -      "type": "string"
      -    }
      -  },
      -  "required": [
      -    "name",
      -    "active"
      -  ],
      -  "type": "object"
      -}
  2. Changed2 schema fields changed
    • addedInput schema / additionalProperties
      Added value: +false
    • removedInput schema / properties / schema / additionalProperties / nullable
      Removed value: -true
  3. Changed5 schema fields changed
    • changedInput schema / properties / raw / description
      Previous value: -"Parameter 'raw' (e.g. \"Sure! Here is the JSON:\\n```json\\n{\\\"name\\\": \\\"Ada\\\", 'active': Tr\")"New value: +"Malformed JSON or LLM output string (max 256 KB)."
    • addedInput schema / properties / raw / example
      Added value: +"```json\n{ name: 'Tinplate', tags: ['api', 'edge',], active: True, }\n```"
    • addedInput schema / properties / raw / maxLength
      Added value: +262144
    • addedInput schema / properties / raw / minLength
      Added value: +1
    • addedInput schema / properties / schema
      Added value: +{
      +  "additionalProperties": {
      +    "nullable": true
      +  },
      +  "description": "Optional JSON Schema (draft subset) to validate the healed JSON against without eval.",
      +  "example": {
      +    "properties": {
      +      "active": {
      +        "type": "boolean"
      +      },
      +      "name": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "name",
      +      "active"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "object"
      +}
  4. First observed

TDQS

B3.4/5.0
Behavior3/5

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

The annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so the safety profile is largely covered upstream. The description adds two genuinely new behavioral facts — that processing happens offline and schema validation runs "without eval" — which is useful context, but it says nothing about failure behavior (what is returned when the input cannot be healed) or whether schema-validation failures raise an error versus returning a report. No contradiction with the readOnly annotation, since the tool transforms input rather than mutating external state.

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 front-loaded sentence that leads with the verb and the failure modes, then closes with the endpoint in parentheses. Dense and mostly waste-free; the parenthetical HTTP endpoint is marginally useful metadata for a non-HTTP-context agent but costs little.

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?

For a two-parameter tool with a required string and an optional nested schema object, the description covers the input side adequately. However, there is no output schema and the description never indicates the return shape — healed string, whether the original is echoed, or how validation results are surfaced — which is the main thing an agent must guess before calling it.

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%, with both `raw` and `schema` documented inline including the 256 KB cap, so the description need not re-explain them. Its only added signal is that the JSON Schema is an optional "draft subset" used for validation, which is largely redundant with the schema text. Baseline 3 applies.

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 ("Repair") with a specific resource ("malformed JSON and LLM outputs") and enumerates the exact failure modes handled: markdown fences, trailing commas, single quotes, unquoted keys, truncated delimiters. This makes the tool's scope unambiguous, though it never contrasts itself with the adjacent tinplate_llm_output_guard or other siblings, so the last point of differentiation is left to inference.

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 implied by the failure-mode list — an agent can infer it should call this when handed broken JSON — but there is no explicit when-to-use/when-not guidance, no statement of what happens if repair fails, and no pointer to a sibling for cases this tool does not cover. The "offline" note gives useful context about execution environment but not about tool selection.

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.