Tools for agents: Batch JSON Pointer lookup

Extract selected JSON values with explicit missing-path diagnostics and preserved null values.

Connect with MCP

{
  "mcpServers": {
    "super-agent-tools": {
      "url": "https://app.getsupers.com/sites/agent-json-pointer/mcp"
    }
  }
}
Streamable HTTP · No API key · Stateless

Use this URL in any client supporting remote Streamable HTTP MCP. Calls return structured JSON; inputs are processed without persistence.

Call resolve_json_pointers

Uses the RFC 6901 JSON string form: empty string selects the root; slash separates tokens; ~1 means slash and ~0 means tilde. URI fragments beginning # are not accepted and percent escapes are not decoded. Object keys are exact and never normalized. Arrays require zero-based ASCII indices without leading zeros. The dash array token refers to a nonexistent append position and cannot be read. Each requested pointer produces one ordered result, including duplicates. Check found: a successful null includes value:null; an unresolved pointer omits value and includes an error. token_index is zero-based and identifies the first failing decoded token. Invalid pointer syntax is reported per item without aborting other lookups. Input is an already parsed JSON value, so duplicate keys discarded by an upstream parser cannot be recovered. No writes, wildcard queries, expression evaluation or remote fetching occurs. Specification: https://www.rfc-editor.org/rfc/rfc6901

Input and output schemas
{
  "name": "resolve_json_pointers",
  "title": "Batch JSON Pointer lookup",
  "description": "Resolve JSON Pointer strings without modifying the document. Return found/value or a per-pointer error; null is a successful value. URI-fragment form is not supported.",
  "inputSchema": {
    "$defs": {
      "JsonValue": {}
    },
    "properties": {
      "document": {
        "$ref": "#/$defs/JsonValue"
      },
      "pointers": {
        "items": {
          "type": "string"
        },
        "title": "Pointers",
        "type": "array"
      }
    },
    "required": [
      "document",
      "pointers"
    ],
    "title": "resolve_json_pointersArguments",
    "type": "object"
  },
  "outputSchema": {
    "additionalProperties": true,
    "title": "resolve_json_pointersDictOutput",
    "type": "object"
  },
  "icons": null,
  "annotations": {
    "title": null,
    "readOnlyHint": true,
    "destructiveHint": false,
    "idempotentHint": true,
    "openWorldHint": false
  },
  "meta": null,
  "execution": null
}

Run the example to see the actual result.

HTTP alternative

POST https://app.getsupers.com/sites/agent-json-pointer/call
Content-Type: application/json

{
  "document": {
    "agents": [
      {
        "name": "builder",
        "result": null
      }
    ],
    "a/b": {
      "~key": 42
    }
  },
  "pointers": [
    "/agents/0/name",
    "/agents/0/result",
    "/agents/1",
    "/a~1b/~0key"
  ]
}

The HTTP and MCP interfaces execute the same implementation. Validation errors are returned explicitly. See the tool notes above for its supported inputs and behavior.

Exact tokens distinguish null from missing

Read the explanation

The source example supplies four pointers. Agents zero name finds builder. Agents zero result succeeds with null as its value. Agents one is absent because the array contains only one entry. The escaped object path finds forty two. That means three found results and one missing result. Check the found flag: a successful null contains a value field set to null, while a missing result omits value and carries an error. The agents array has one element at index zero. Requesting index one fails at decoded token index one: agents was token zero and the numeric array index is token one. Arrays accept ASCII indices without leading zeros. Dash denotes a nonexistent append position and cannot be read. Duplicate requested pointers still produce duplicate ordered results; there is no wildcard or expression evaluation. Tilde one decodes to slash and tilde zero to tilde. The path a tilde one b, slash tilde zero key therefore selects the literal key a slash b, then literal tilde key, returning forty two. The empty pointer selects the root. Hash-prefixed URI fragments are rejected and percent escapes are not decoded. Invalid syntax is reported per item without aborting other lookups. These are source-contract explanations only: the offline page cannot validate remote HTTP or MCP execution, and no request was sent.

Batch RFC 6901 JSON Pointer Traversal Mechanics

How does RFC 6901 evaluate slash-separated reference tokens and unescape special characters during batch JSON lookups?

This tool accepts an already parsed JSON document and a list of RFC 6901 JSON Pointer strings, sequentially traversing nested objects and zero-based array indices. Each reference token unescapes '~1' to '/' and '~0' to '~' in exact order before evaluating keys byte-for-byte. When an element is found, it preserves the exact value—including explicit nulls—while missing properties, scalar over-traversals, or illegal array indices return structured diagnostic errors with the failing token index.

Only the RFC 6901 string representation is evaluated; URI fragment pointers starting with '#' are not supported and URI percent-escapes are not decoded. Because evaluation operates in-memory on parsed JSON, duplicate keys discarded by the upstream JSON parser cannot be inspected, and the '-' token always evaluates to an error because it represents an append position rather than an existing element.

Try a worked example

Click 'Run tool' with the preset arguments. The runner queries four pointers against the sample document: '/agents/0/name' resolves to 'builder', '/agents/0/result' resolves to null with 'found': true, '/agents/1' halts with 'index_out_of_range' at token_index 1, and '/a~1b/~0key' decodes the escaped tokens to look up key 'a/b' followed by '~key', resolving to 42.

Token Escaping and Unescape Order

RFC 6901 section 3 reserves '/' as the token separator and '~' as the escaping prefix. When referencing keys that contain literal slashes or tildes, '~1' encodes '/' and '~0' encodes '~'. Section 4 specifies that implementations must transform '~1' into '/' prior to transforming '~0' into '~' so that sequences like '~01' resolve correctly to '~1' instead of accidentally mutating into a delimiter. RFC 6901: JavaScript Object Notation (JSON) Pointer

Array Indexing Constraints and the Append Token

Per RFC 6901 section 4, referencing array elements requires unsigned base-10 integer tokens without leading zeros, matching '0' or digits starting from 1 to 9. The single character '-' specifies the nonexistent position immediately following the last element; in a read-only resolution tool, querying '-' consistently terminates with an error because no concrete member exists at that position. RFC 6901: JavaScript Object Notation (JSON) Pointer

Sources and further reading