Skip to main content
Glama
kinbinghua-lgtm

agent-core-mcp

json_validate

Read-onlyIdempotent

Validate JSON text and pinpoint syntax errors with the exact line and column, returning the top-level shape on success.

Instructions

Check whether a string is valid JSON. On failure returns the parser message plus the computed line and column of the error. On success returns the top-level shape. Distinguishes valid-but-empty-object from invalid.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYesThe JSON text to validate
describeTopLevelNoInclude top-level keys or array length (default true)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive/openWorld=false, so the safety profile is covered. The description goes further by disclosing return behavior on both paths (parser message with computed line/column on failure, top-level shape on success) and the valid-empty-object edge case, which is genuine added context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three short sentences, front-loaded with the core purpose, then failure behavior, then success behavior. No filler or restatement of the name.

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

Completeness5/5

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

There is no output schema, so the description carries the burden of explaining returns — and it does, covering both success and failure outputs plus an edge case. Combined with full schema coverage and annotation safety hints, an agent has everything needed to call and interpret this tool.

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%, so both parameters are already documented by the schema, making 3 the baseline. The phrase 'top-level shape' in the description loosely corresponds to describeTopLevel but adds no format, default, or constraint detail beyond the schema.

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+resource: 'Check whether a string is valid JSON', which is unambiguous about what the tool does. However, it does not differentiate itself from siblings like json_query or json_pick, which an agent might plausibly confuse with validation work.

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?

The description implies the use case (validation before parsing) but never states when to pick this over json_query or json_pick, nor any prerequisites or exclusions. Usage is inferable but not guided.

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