Tools for agents: UTF-8 byte-budget JSON batching

Partition ordered JSON records into request-sized arrays with exact UTF-8 byte counts and copyable serialized bodies.

Connect with MCP

{
  "mcpServers": {
    "super-agent-tools": {
      "url": "https://app.getsupers.com/sites/agent-json-batches/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 batch_json_by_bytes

records may contain any finite JSON values, including objects, arrays, scalars and null. Each output json field is a complete compact JSON array body, serialized with literal Unicode and no optional whitespace. utf8_bytes measures that string encoded as UTF-8, including array brackets and commas. It excludes HTTP headers, compression and the enclosing MCP response. Use the returned string verbatim when its exact budget matters: a client serializer can escape Unicode or format numbers differently. Batches preserve record order, never split a record, and greedily include the longest next contiguous prefix that fits. Source ranges are zero-based half-open [start_index,end_index). Empty input returns no batches. max_bytes is an integer of at least two; a record too large to fit alone fails the entire call with its index and required bytes. Nonfinite numbers and unpaired Unicode surrogates fail. Input lexical formatting and duplicate JSON object keys are not recoverable from parsed values. No request is sent and records are not persisted.

Input and output schemas
{
  "name": "batch_json_by_bytes",
  "title": "UTF-8 byte-budget JSON batching",
  "description": "Partition records into maximal consecutive compact JSON arrays within a UTF-8 byte budget; return exact serialized request bodies and source ranges.",
  "inputSchema": {
    "$defs": {
      "JsonValue": {}
    },
    "properties": {
      "records": {
        "items": {
          "$ref": "#/$defs/JsonValue"
        },
        "title": "Records",
        "type": "array"
      },
      "max_bytes": {
        "title": "Max Bytes",
        "type": "integer"
      }
    },
    "required": [
      "records",
      "max_bytes"
    ],
    "title": "batch_json_by_bytesArguments",
    "type": "object"
  },
  "outputSchema": {
    "additionalProperties": true,
    "title": "batch_json_by_bytesDictOutput",
    "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-batches/call
Content-Type: application/json

{
  "records": [
    {
      "id": 1,
      "text": "caf\u00e9"
    },
    {
      "id": 2,
      "text": "\u6771\u4eac"
    },
    null,
    {
      "id": 3,
      "text": "ready"
    }
  ],
  "max_bytes": 50
}

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.