Skip to main content
Glama

ScorpTech x402 Tools

Json Canonicalize

json_canonicalize
Read-onlyIdempotent

RFC 8785 JSON Canonicalization Scheme (JCS): deterministic serialization with keys sorted by UTF-16 code units and ECMAScript number formatting, plus SHA-256 / SHA-512 digests of the canonical bytes for signing, caching and deduplication. Also returns sorted pretty JSON and document stats (depth, keys, values, bytes). POST JSON body {json}. Returns JSON with: canonical, bytes, sha256, sha512, sha256Base64url, stats. Price: $0.002 USDC per successful call (x402, Base or Solana). Same tool over HTTPS: POST https://scorptech.it.com/api/x402/v1/json-canonicalize

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": {
      "json": "<json>"
    },
    "name": "json_canonicalize"
  }
}

Input Schema

NameRequiredDescriptionDefault
jsonYesAny JSON value
prettyNoAlso return an indented key-sorted rendering

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already declare readOnly, idempotent, and non-destructive, and the description adds substantive context beyond them: deterministic byte output, digest algorithms, per-call pricing ($0.002 USDC via x402 on Base or Solana), payment protocol, and an equivalent HTTPS route. For a paid, no-output-schema tool, that is unusually complete behavioral disclosure.

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?

Dense but front-loaded: algorithm and guarantees lead, then outputs, then pricing and transport. It is a single long paragraph with a run-on clause, and the pricing/endpoint sentences could be split out, but no sentence is truly wasted.

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?

With no output schema, the description carries the return-value burden and does so by enumerating canonical, bytes, sha256, sha512, sha256Base64url, and stats. Combined with the algorithm specification and payment details, an agent has everything needed to invoke it correctly.

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 100%, so both parameters are documented structurally and the baseline is 3. The description adds the request shape ({json} body) and references a sorted pretty rendering, but because pretty defaults to false while the description says it 'also returns sorted pretty JSON' without a conditional, it adds little clarity and slightly muddies when that output appears.

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 names a specific standard (RFC 8785 JCS) and the exact operation: deterministic serialization with UTF-16 sorted keys, ECMAScript number formatting, and SHA-256/SHA-512 digests of canonical bytes. This clearly separates it from siblings like json_diff, json_patch, json_repair, and json_to_types, which transform rather than canonicalize.

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

Usage Guidelines4/5

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

It supplies concrete use contexts (signing, caching, deduplication) that tell an agent when this tool is the right choice, plus pricing and an alternate HTTPS endpoint. It does not explicitly state when not to use it or name a sibling alternative, so it falls short of a 5.

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