Skip to main content
Glama

ATTRACTOR Verification & State

canonicalize_json

Read-onlyIdempotent

Use this tool when your workflow needs canonical json api. Input: value. Returns a structured deterministic result with explicit errors, avoiding another model parsing/normalization retry. Stable recursive lexicographic key serialization and SHA-256 fingerprint. ATTRACTOR format v1, not RFC 8785. Arrays retain order. Limits: request 24 KB, JSON depth 24, 4,000 nodes. Reserved prototype keys and unsafe integers rejected. Inputs processed transiently; private HMAC trace metadata retained.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
valueYes
attractor_trace_idNoOptional public correlation handle from a prior result; not authentication or proof of identity.
attractor_knowledge_idNoOptional prior result handle. Reuse is counted only when the supplied value matches that result fingerprint.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / properties / attractor_knowledge_id
      Added value: +{
      +  "description": "Optional prior result handle. Reuse is counted only when the supplied value matches that result fingerprint.",
      +  "pattern": "^ATR-K-[a-f0-9]{64}$",
      +  "type": "string"
      +}
    • addedInput schema / properties / attractor_trace_id
      Added value: +{
      +  "description": "Optional public correlation handle from a prior result; not authentication or proof of identity.",
      +  "pattern": "^ATR-T-[a-f0-9]{32}$",
      +  "type": "string"
      +}
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "anyOf": [
      +    {
      +      "properties": {
      +        "attractor_trace_id": {
      +          "type": "string"
      +        },
      +        "commons": {
      +          "type": "object"
      +        },
      +        "knowledge_id": {
      +          "type": "string"
      +        },
      +        "ok": {
      +          "const": true
      +        },
      +        "request_id": {
      +          "type": "string"
      +        },
      +        "result": {
      +          "properties": {
      +            "canonical": {
      +              "type": "string"
      +            },
      +            "fingerprint": {
      +              "type": "string"
      +            },
      +            "value": {}
      +          },
      +          "required": [
      +            "value",
      +            "canonical",
      +            "fingerprint"
      +          ],
      +          "type": "object"
      +        },
      +        "tool": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "ok",
      +        "tool",
      +        "result",
      +        "knowledge_id",
      +        "attractor_trace_id",
      +        "request_id",
      +        "commons"
      +      ],
      +      "type": "object"
      +    },
      +    {
      +      "properties": {
      +        "error": {
      +          "type": "string"
      +        },
      +        "request_id": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "error"
      +      ],
      +      "type": "object"
      +    }
      +  ],
      +  "type": "object"
      +}
  2. Added

TDQS

A4.4/5.0
Behavior5/5

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

With annotations already declaring read-only and idempotent behavior, the description adds substantial extra detail: request limits (24 KB, depth 24, 4,000 nodes), rejection of reserved keys and unsafe integers, transient input processing, and HMAC metadata retention. These go beyond annotations and paint a complete behavioral picture.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is dense but every sentence adds value: usage, format, limits, and security. It's front-loaded with the primary use case, and the technical details are tightly packed without redundancy.

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?

Given the output schema exists, the description need not explain return values. It covers usage, constraints, rejection conditions, and data handling, making it fully sufficient for an agent to decide when and how to invoke the tool.

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?

The schema covers 67% of parameters (attractor_trace_id and attractor_knowledge_id have descriptions), but the main 'value' parameter is undefined in the schema. The description compensates by defining 'value' as a JSON input and adding size/depth/node limits and rejection rules, which adds meaning beyond the schema.

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 clearly implies the tool canonicalizes JSON input, specifying deterministic serialization and a SHA-256 fingerprint. It distinguishes itself from siblings by naming the ATTRACTOR format and its unique constraints, though it doesn't explicitly state the verb 'canonicalize' or directly contrast with fingerprint_json.

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 provides a clear usage condition ('when your workflow needs canonical json api') and hints at avoiding model retries. It implicitly excludes use when RFC 8785 is needed, but it doesn't explicitly name alternatives like fingerprint_json or diff_json, so the guidance is good but not exhaustive.

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.