Skip to main content
Glama

ATTRACTOR Verification & State

diff_json

Read-onlyIdempotent

Use this tool when your workflow needs json diff api. Input: before, after. Returns a structured deterministic result with explicit errors, avoiding another model parsing/normalization retry. Generate deterministic JSON Patch add/remove/replace operations. Root path is empty string. Changed arrays are replaced whole. Does not execute patches or prove causality. 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
afterYes
beforeYes
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": {
      +            "array_strategy": {
      +              "type": "string"
      +            },
      +            "patch": {
      +              "type": "array"
      +            }
      +          },
      +          "required": [
      +            "patch",
      +            "array_strategy"
      +          ],
      +          "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.3/5.0
Behavior5/5

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

Annotations already mark the tool read-only, idempotent, and non-destructive; the description adds meaningful behavioral detail beyond this: deterministic output, explicit errors, no patch execution or causality claims, request limits, rejection of reserved keys/unsafe integers, and transient input handling. This is excellent transparency without contradicting the annotations.

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 each sentence contributes new information: usage condition, input names, output style, path semantics, array behavior, non-execution, limits, rejections, and privacy. It is front-loaded and contains no filler.

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?

The tool's behavior, limits, error model, privacy characteristics, and output nature are all covered, and an output schema exists to document return values. Nothing an agent needs to decide whether to call this tool and how to supply inputs is missing.

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 description coverage is 50% because the two optional correlation IDs are documented in the schema, while before and after are empty object schemas. The description identifies before and after as inputs and implies they are JSON, but it does not specify their types or parse requirements; the optional IDs are covered by the schema, not the description.

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 identifies the tool as a JSON diff utility that generates deterministic JSON Patch add/remove/replace operations between before and after inputs. It names specific behaviors (root path empty string, arrays replaced whole) that distinguish its function, but it does not explicitly contrast itself with any sibling tool, and 'json diff api' is slightly generic.

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 opens with an explicit when-to-use directive ('Use this tool when your workflow needs json diff api') and explains why it avoids model parsing/normalization retries. It does not name preferred alternatives or state when not to use it, so it falls short of full routing guidance.

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.