> ## Documentation Index
> Fetch the complete documentation index at: https://mcp.docs.relayfi.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Tool results: structured content, money, and pagination

> Relay MCP returns dual-channel tool results with structuredContent and content, and uses cursor-based pagination for list tools.

Every Relay MCP tool returns its payload in two channels at once: as validated `structuredContent` and as JSON text inside `content`. List tools also include pagination metadata.

## Dual-channel results

A successful tool call returns the same data twice:

* `structuredContent`: the JSON payload validated against the tool's `outputSchema`.
* `content`: an array containing a `text` item with the same payload serialized as JSON text.

This lets agents read structured data directly or parse the text representation depending on their client implementation.

## Example ToolCallResult

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 3,
  "result": {
    "content": [
      {
        "type": "text",
        "text": "{\"object\":\"organization\",\"id\":\"org_1\",\"name\":\"Acme Inc\"}"
      }
    ],
    "structuredContent": {
      "object": "organization",
      "id": "org_1",
      "name": "Acme Inc"
    }
  }
}
```

## Money

Every monetary value is returned as a Money object:

| Field | Type | Description |
| - | - | - |
| `cents` | integer | Amount in minor units (cents). Signed where the value can be negative. |
| `display` | string | Formatted amount with two decimals and thousands separators, for example `"5,200.00"`. Contains no currency symbol. |
| `currency` | string (optional) | ISO 4217 currency code, for example `"USD"`. |

```json theme={null}
{ "cents": 520000, "display": "5,200.00", "currency": "USD" }
```

Use `cents` for arithmetic and `display` when showing an amount to a user. Transaction amounts are unsigned; read `direction` for the sign. A missing value, such as an omitted `balances` object, means the value is unavailable, never zero.

## Pagination

List tools return a `pagination` object with these fields:

| Field | Type | Description |
| - | - | - |
| `hasNextPage` | boolean | `true` when more results exist |
| `pageSize` | integer | Number of items in this page |
| `nextCursor` | string (optional) | Opaque cursor for the next page |

Follow `nextCursor` until `hasNextPage` is `false`. Keep the same filters and `pageSize` on every page.

> [!NOTE]
>
> Cursors are opaque and bound to the exact filter set. Never parse them, edit them, or reuse a cursor across different filters.

## Paginated result example

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 4,
  "result": {
    "content": [
      {
        "type": "text",
        "text": "{\"data\":[{\"object\":\"transaction\",\"id\":\"txn_1\"}],\"pagination\":{\"hasNextPage\":true,\"pageSize\":50,\"nextCursor\":\"eyJwYWdlIjoyfQ\"}}"
      }
    ],
    "structuredContent": {
      "data": [
        { "object": "transaction", "id": "txn_1" }
      ],
      "pagination": {
        "hasNextPage": true,
        "pageSize": 50,
        "nextCursor": "eyJwYWdlIjoyfQ"
      }
    }
  }
}
```

> [card] [Errors](https://mcp.docs.relayfi.com/concepts/errors.md)
>
> Learn how MCP tool errors and invalid cursors are surfaced.

> [card] [Transport](https://mcp.docs.relayfi.com/concepts/transport.md)
>
> Review how stateless requests carry results over Streamable HTTP.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.