Skip to main content
Glama

Audit a JSON payload

audit_json

Inspect JSON text to detect duplicate keys, prototype pollution, depth, size, node count, unsafe numbers, invalid Unicode, BOM, and NUL hazards.

Instructions

Inspect JSON text with jsoncage for duplicate keys, prototype pollution keys, depth, size, node count, unsafe numbers, invalid Unicode, BOM, and NUL hazards.

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": "audit_json"
  }
}

Input Schema

NameRequiredDescriptionDefault
jsonYes
optionsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full behavioral burden. 'Inspect' correctly signals a non-mutating read, and the enumerated checks tell the agent what categories of problems surface, but nothing says whether findings are returned as a report, whether analysis stops at the first hazard, or what happens on malformed input. Nothing contradicts the (absent) annotations.

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?

One dense, front-loaded sentence; the verb and resource lead, and the hazard enumeration fills the rest with no filler. The only near-waste is the vendor name 'jsoncage', which adds little for a caller, but it is brief.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema exists, so some indication of what comes back would help, and the undocumented options bag is a real hole for a nested-object parameter. Against that, the check list is unusually specific for a single-sentence definition, so an agent knows what the tool examines even if not how to configure it.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% for two parameters. The 'json' argument is self-evident, but 'options' is an open object with additionalProperties=true and no documented keys — the description never says which option flags exist or what they toggle. A reader cannot populate 'options' from either the description or 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?

States a specific verb ('Inspect') and resource ('JSON text') and enumerates the exact hazard classes it looks for — duplicate keys, prototype pollution, depth, size, node count, unsafe numbers, invalid Unicode, BOM, NUL. This immediately separates it from siblings like audit_cookie, audit_headers or audit_zip_entries, which operate on entirely different payload types.

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

Usage Guidelines2/5

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

There is no guidance on when to reach for this tool versus lint_security_code or redact_log, and no statement of preconditions (e.g. that the payload must already be UTF-8 text under 1 MB). The agent must infer usage purely from the hazard list.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.