Skip to main content
Glama

schema

Read-only

Validate JSON against 2020-12 rules or infer rules from samples; errors map to JSON pointers, including per-item array checks.

Instructions

Validate JSON against JSON Schema 2020-12 core (errors as JSON pointers; each = per array item), or infer a schema from samples.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "schema"
  }
}

Input Schema

NameRequiredDescriptionDefault
opNo
dataNo
eachNo
schemaNo
data_pathNo
schema_pathNo
samples_are_arrayNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.2

TDQS

B3.2/5.0
Behavior3/5

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

Annotations declare readOnlyHint=true, and the description is consistent with a non-mutating tool. It adds real context by stating errors are returned as JSON pointers and that 'each' applies per array item. It does not say what a successful validate returns, what infer outputs, or whether data can come from disk paths, which leaves gaps for a 7-parameter tool.

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 dense sentence with the two modes front-loaded and no filler. The parenthetical 'each = per array item' is terse to the point of being cryptic, but nothing is redundant.

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 7-parameter, dual-mode tool with no output schema and only a readOnly annotation, the description should explain the path-vs-inline data options and the shape of returned errors or inferred schemas. It covers the error format and the 'each' flag but leaves several parameters and both return shapes unexplained.

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 coverage is 0%, so the description must carry the burden. It meaningfully explains only 'each' (per array item) and hints at samples via 'infer from samples'; op, data, schema, data_path, schema_path, and samples_are_array are left entirely to inference. That is partial compensation, not full, so it sits just above the low baseline rather than at 2.

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?

Names two concrete operations: validating JSON against JSON Schema 2020-12 and inferring a schema from samples. The verb+resource is specific enough that an agent can distinguish this from the generic 'json' sibling. It stops short of 5 because the tool name 'schema' alone is ambiguous and the sentence does not explicitly contrast with alternatives.

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: nothing says when to choose validate vs infer, when to prefer this over the 'json' or 'convert_units'-style siblings, or what preconditions exist. The op enum in the schema implies the two modes, but the description does not route the agent between them.

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