Skip to main content
Glama

mutation-intent

Diff a before/after JSON write for deletes, null-vs-omit and emptied arrays against protected paths — Compares the JSON document an agent read (before) with the one it is about to write (after) and lists every change by JSON Pointer: removed members, null turned into omitted (and the reverse), arrays emptied or shrunk, objects emptied, type changes. Fails when a change touches a protected path or is destructive and not listed in allowDestructive; use it before a PUT, PATCH or bulk update. Arrays a

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": {
      "before": "<before>",
      "after": "<after>"
    },
    "name": "mutation-intent"
  }
}

Input Schema

NameRequiredDescriptionDefault
afterYesJSON value about to be written.
beforeYesJSON value as last read.
protectedPathsNoJSON Pointers that must not change at all; a "*" token matches any one key or index.
allowDestructiveNoJSON Pointers ("*" wildcard) under which deletes, emptied containers and type changes are intended.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the behavioral burden and does so reasonably: it discloses failure conditions tied to protectedPaths and allowDestructive, and says output is a per-JSON-Pointer change list. It never explicitly states that the tool only reads and does not perform the write itself, which is the one behavioral fact an agent most needs.

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

Conciseness3/5

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

The purpose is front-loaded, but the body is a single run-on sentence with a long comma-chained list, and it ends in a truncated fragment ('Arrays a') that leaves an idea unfinished. The information is useful; the packaging is sloppy.

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?

There is no output schema, and the description compensates by describing the return as a list of changes keyed by JSON Pointer, plus the failure mode. That is nearly sufficient for a 4-parameter validation tool; the dangling trailing fragment is the only real incompleteness.

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?

Schema coverage is 100%, so a 3 would be the baseline, but the description adds relational meaning the schema does not: protectedPaths causes a hard failure on any change, while allowDestructive is the escape hatch that whitelists destructive changes. It does not restate the '*' wildcard token, which the schema already covers.

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 verb and resource ('Diff a before/after JSON write') and enumerates the exact change classes it detects: removed members, null-vs-omit, emptied or shrunk arrays, emptied objects, and type changes. An agent can tell precisely what this tool produces without opening the schema.

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 gives an explicit usage trigger: 'use it before a PUT, PATCH or bulk update.' It also states the gating condition (fails when a change touches a protected path or is destructive and not allowed). What is missing is any when-not guidance or an explicitly named alternative for callers who only need a plain diff.

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