Skip to main content
Glama
@caelaralabs/mcp

@caelaralabs/mcp

caelara_agent_json_auto_repair

Repairs malformed JSON from LLM output, correcting syntax errors so agents can parse and use the data.

Instructions

[Agent Safety] Repair malformed JSON from LLM output Measured p50 11 ms, p95 15 ms (2026-11-21, benchmarks.caelaralabs.com). Calls https://agent.caelaralabs.com.

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": {
      "text": "<text>"
    },
    "name": "caelara_agent_json_auto_repair"
  }
}

Input Schema

NameRequiredDescriptionDefault
textYesMalformed JSON text

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.1

TDQS

B3.4/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full disclosure burden. It does contribute real behavioral detail beyond structured fields: measured p50 11 ms / p95 15 ms latency and the fact that it makes a remote call to agent.caelaralabs.com. It omits the important parts – whether the call is idempotent, auth/rate-limit requirements, and what happens when the JSON cannot be repaired.

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?

The definition is short and front-loads the purpose before the performance and endpoint details. It is slightly run-on – three independent clauses jammed together without separators – but no sentence is padding.

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 one-parameter transform tool with no output schema, the description should say what comes back (a repaired JSON string? a parsed object? a failure indicator?) and it does not. Latency and endpoint are covered, but the return contract and failure behavior are missing for a tool whose whole job is error recovery.

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?

With one parameter at 100% schema description coverage, the schema already defines 'text' as the malformed JSON string. The description only adds the qualifier that the source is LLM output, which is marginal value beyond the schema and establishes the baseline of 3.

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 gives a specific verb+resource: 'Repair malformed JSON from LLM output', which is unambiguous about the operation and the expected input condition. It does not distinguish itself from plausible siblings such as caelara_agent_schema_enforcer or caelara_agent_agent_output_validator, which also touch model output correctness, leaving boundary selection 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 context is implied by 'malformed JSON from LLM output' – an agent can infer this is for when parsed JSON fails. However there is no explicit when-to-use vs. when-not, no mention of what to do if repair is impossible, and no routing to the validation/enforcement siblings.

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

Deploy Server

Other Tools