Skip to main content
Glama

ScorpTech x402 Tools

Json Patch

json_patch
Read-onlyIdempotent

Apply a JSON Patch (RFC 6902: add, remove, replace, move, copy, test) or a JSON Merge Patch (RFC 7386) to a JSON document and return the result. Atomic: any failing operation or test returns 422 with the operation index and nothing is applied. POST JSON body {document, patch}. Returns JSON with: mode, applied, result. Price: $0.002 USDC per successful call (x402, Base or Solana). Same tool over HTTPS: POST https://scorptech.it.com/api/x402/v1/json-patch

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": {
      "document": "<document>",
      "patch": "<patch>"
    },
    "name": "json_patch"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeNoauto
patchYesRFC 6902 operations array, or an object = RFC 7386 merge patch
documentYesTarget JSON value

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.3/5.0
Behavior5/5

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

Annotations already cover readOnly/idempotent/non-destructive, and the description adds genuinely new behavioral facts: atomicity, that any failing operation or test yields 422 with the operation index and applies nothing, and that billing only occurs per successful call. This is exactly the extra context annotations cannot express.

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 operation and standards, then failure semantics, body shape, and return fields. Mostly efficient, though the pricing sentence and HTTPS endpoint are somewhat promotional relative to the core calling guidance.

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?

With no output schema, the description usefully enumerates the return fields (mode, applied, result) and the error contract, so an agent can interpret results. Minor gap: what `applied` contains and how `auto` resolves mode are left unspecified.

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 67%, and the description compensates by clarifying that `patch` is either an RFC 6902 operation array or an object interpreted as an RFC 7386 merge patch, and that the body is {document, patch}. The only gap is that the `auto` mode's detection rules (how it chooses between json-patch and merge-patch) are never explained.

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?

States a specific verb and resource ('Apply a JSON Patch ... or a JSON Merge Patch to a JSON document and return the result') and names the exact RFCs, which cleanly separates it from siblings like json_diff, json_repair, and json_canonicalize without opening any schema.

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?

Usage is implied by the standards cited (RFC 6902 vs RFC 7386) and by the mode enum, but there is no explicit 'use this when X, use json_diff/json_repair instead when Y' routing. An agent knows what it does, not definitively when to prefer it over a sibling.

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