Skip to main content
Glama

Caelara Labs Agent Safety

agent_output_validator

Validate LLM output: repair JSON, enforce schema, check grounding against a source, extract citations. Use when you need to check or repair a model answer: parse and fix broken JSON, validate against a schema, compare with a source for unsupported claims, extract citations. Example input: {"output":"{"total": 42,}","schema":{"type":"object"},"source":"optional source text"}. Returns: verdict, json{parseable,fixes_applied,value}, schema, grounding, citations.

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": {
      "output": "<output>"
    },
    "name": "agent_output_validator"
  }
}

Input Schema

NameRequiredDescriptionDefault
outputYesRaw LLM output
schemaNoJSON Schema subset to enforce
sourceNoSource text for grounding check

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior4/5

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

No annotations are supplied, so the description carries the full burden, and it meets much of that burden: it names the return structure ('verdict, json{parseable,fixes_applied,value}, schema, grounding, citations') in the absence of an output schema, plus a concrete example input. Remaining gaps are minor for a pure computation tool — no explicit statement that nothing is mutated and no note on cost/latency of the grounding check.

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?

Front-loaded with the purpose, then usage, then an example, then returns — a sensible order. Slight redundancy: the second sentence's 'parse and fix broken JSON, validate against a schema, compare with a source, extract citations' largely restates the first sentence's four capabilities, costing a sentence of budget.

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?

For a 3-parameter tool with a nested schema object and no output schema, the definition supplies purpose, trigger context, an example, and the return shape — enough for an agent to call it correctly. The notable omission is any mention that 'schema' accepts only a 'JSON Schema subset' (known only from the parameter description) and how partial failures are reported in 'verdict'.

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 baseline is 3; the description earns one point above baseline by giving a worked example input that shows 'output' is a raw (possibly broken) string, 'schema' is a JSON Schema object, and 'source' is optional free text for grounding. That demonstrates how the parameters combine, which the schema alone does not.

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?

States a specific verb and resource ('Validate LLM output') and enumerates the four sub-operations: JSON repair, schema enforcement, grounding check, citation extraction. That is far more concrete than a tautology. It stops short of differentiating itself from the single-purpose siblings (json_auto_repair, schema_enforcer, hallucination_diff, citation_extractor) whose functions it bundles.

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?

'Use when you need to check or repair a model answer' gives a general triggering context, and the second sentence re-lists the sub-cases. However, with four siblings covering exactly the same sub-tasks, an agent gets no guidance on when to pick this composite tool versus the focused one, and no stated exclusions or preconditions.

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