Skip to main content
Glama
Diogenes Developer, Data & Prompt Engineering Utilities MCP

Diogenes Developer, Data & Prompt Engineering Utilities MCP

agent_schema_enforcer

Validates LLM outputs against a JSON Schema, coercing types and removing extra fields to ensure strict compliance.

Instructions

Enforces strict JSON Schema compliance, automatic type coercion, and extraneous field pruning on LLM outputs.

Input Schema

NameRequiredDescriptionDefault
schemaNo
raw_outputYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.9/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden. It does disclose three concrete behaviors (strict compliance, automatic type coercion, extraneous field pruning), which is more than a bare name. However, it omits failure semantics (does it error or coerce?), whether pruning is lossy, and what the caller receives back.

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 with no filler; the core behaviors lead. It is efficiently sized, though the extreme brevity is also the source of the coverage gaps rather than a virtue in itself.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No annotations, no output schema, 0% parameter coverage, and a nested schema object: the description leaves too much unresolved. It does not say what validation result is returned, how failures surface, or how the optional schema parameter affects behavior.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Two parameters with 0% schema description coverage and a nested schema object, yet the description explains neither. It never says what 'schema' is for, that it is optional, or what happens when it is omitted, nor does it define the expected shape of 'raw_output'.

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 states a specific verb+resource: it enforces JSON Schema compliance, coercion, and field pruning on LLM outputs. That is clearly distinguishable work, but it never names or contrasts itself against the closest sibling (json_repair), which also handles malformed LLM JSON. Clear, but no sibling differentiation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no when-to-use guidance, no prerequisites, and no mention of alternatives such as json_repair for repair vs. this tool for strict validation. The agent must infer the trigger condition from the name alone.

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