Skip to main content
Glama

Structural JSON diff module with pytest tests

submit_json_diff
Idempotent

Produce a standard-library Python module that reports the structural difference between two JSON documents, plus pytest tests. Choose this when you need the structural difference between two JSON documents as added, removed and changed paths, delivered as a module with tests. Do not choose this for a textual or line-oriented diff, for JSON Patch generation, or for applying a patch. This reports differences; it does not transform documents. Example requests: Write a Python module that diffs two JSON documents and reports added, removed and changed keys, with tests. | I need a structural JSON diff that shows changed paths, not a line diff. | Generate a JSON-diff module and prove it with pytest.

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": {
      "inputs": "<inputs>",
      "authorized_by": "<authorized_by>"
    },
    "name": "submit_json_diff"
  }
}

Input Schema

NameRequiredDescriptionDefault
inputsYes
quote_idNoThe quote_id returned by POST /v1/jobs. Required to authorize a priced capability; the service rejects a priced job that does not name the quote it issued.
authorized_byYesIdentifier of the human or agent authorizing this job.
accepted_priceNoThe amount accepted, exactly as quoted (for example "5.00" or 5). Checked against the stored quote, so a price that moved between quote and authorize is refused rather than silently absorbed. Optional, but sent to make the acceptance explicit.

Output Schema

NameRequiredDescriptionDefault
quoteNo
stateYes
job_idYes
artifactsNo
access_tokenNoPer-job credential. Present it as the X-Job-Token header to read the job or list it. Keep it; it is the only credential for this job.
verificationNoIndependent verification. verification.ok = false means the job failed, not a partial success.
capability_idNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Beyond the annotations, the description discloses that the output is a standard-library Python module with pytest tests, that behavior is fixed by the template, and that it reports differences rather than transforming documents. It does not discuss the authorization or pricing workflow, though the schema covers quote_id and accepted_price.

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 description is front-loaded with the core purpose and then adds selection guidance, exclusions, and example requests. It repeats the phrase 'structural difference between two JSON documents' more than necessary, but every part still helps an agent select or understand the tool.

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 submission tool with an output schema and detailed nested parameters, the description provides enough context about what will be produced and when to use it. It leaves the job authorization and quote workflow to the schema, which is reasonable given the schema descriptions, but a brief mention of the submission/pricing context would make it fully complete.

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 75%, and the nested input schema already documents template, module_name, and function_name. The description does not add parameter-level meaning beyond those schema descriptions, so it sits at the baseline for high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and output: produce a standard-library Python module that reports the structural difference between two JSON documents, plus pytest tests. It clearly distinguishes this from textual/line diffs, JSON Patch generation, and patch application, so an agent can identify the correct tool without opening the schema.

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

Usage Guidelines5/5

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

It gives explicit selection criteria: choose this when you need added, removed, and changed paths as a module with tests. It also explicitly says when not to choose it: textual/line diff, JSON Patch generation, or applying a patch, which leaves little to inference.

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