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}. Price: $0.002 USDC per successful call (x402, 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

A3.9/5.0
Behavior5/5

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

Goes well beyond the annotations: it declares atomicity ('any failing operation or test returns 422 with the operation index and nothing is applied'), the request shape, the per-call price ($0.002 USDC, x402 on Solana), and an alternate HTTPS transport. That is exactly the payment/auth, failure-mode and reversibility context the annotations don't carry.

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?

Four dense sentences, front-loaded with the operation and format, followed by atomicity, request body, and cost. Every sentence carries information, though the pricing/HTTPS sentence could be split out as secondary detail.

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 3-parameter pure function with no output schema, the description covers semantics, error behavior, and cost adequately; 'return the result' is a reasonable sketch of the return value. The one gap is the unexplained `mode` parameter and the auto-detection rule between patch formats.

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 67%, so baseline is 3. The description clarifies that `patch` may be an RFC 6902 operations array or an object meaning an RFC 7386 merge patch, which adds real meaning, but it never explains the `mode` enum (auto/json-patch/merge-patch) that governs that choice.

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 names a precise verb and resource ('Apply a JSON Patch (RFC 6902...) or a JSON Merge Patch (RFC 7386) to a JSON document') and enumerates the supported operations, so its function is unmistakable. It never names a sibling (json_diff, json_repair, jsonpath, schema_validate), so the distinction from those tools is left to the agent.

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 format specification: this is the tool that applies an RFC 6902 operation array or an RFC 7386 merge object. There is no explicit when-to-use/when-not statement and no routing to alternatives such as json_diff (compare) or jsonpath (query), which is what a 4 or 5 would require.

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