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

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

Annotations already cover read-only/idempotent/open-world, and the description adds meaningful extras: a per-call price ($0.002 USDC via x402 on Solana), the alternate HTTPS endpoint, and what the response contains. It does not discuss input size limits or error behavior, so it falls short of 5.

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 core operation and algorithm, followed by use cases and then payment/endpoint details. Dense but each clause is informative; the URL and pricing could arguably be split out, keeping it from a 5.

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 does the work of explaining return values (canonical bytes' SHA-256/SHA-512 digests, sorted pretty JSON, document stats). Missing only edge-case guidance such as size limits or invalid-JSON handling.

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 the required `json` and the `pretty` flag are already documented. The description mentions returning sorted pretty JSON but adds no format or semantics beyond what the schema states — baseline 3.

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 precise verb and resource (RFC 8785 JCS canonicalization), names the exact algorithm details (UTF-16 key sort, ECMAScript number formatting) and adds digests. An agent can distinguish it from siblings like json_diff, json_repair or json_to_types at a glance.

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?

Gives concrete use cases (signing, caching, deduplication) that imply when to reach for it, but never explicitly names an alternative or a when-not-to-use condition. Clear context without exclusions.

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