---
title: MCP
description: The tools an agent calls over MCP: issue a pass, set a mandate, read the record.
canonical: https://tollrelay.com/docs/mcp
lastmod: 2026-09-15
---

# MCP

The tools an agent calls over MCP: issue a pass, set a mandate, read the record.

Endpoint `https://api.trlay.dev/mcp`, transport `streamable-http`. An organisation API key on `Authorization: Bearer`.

The server card is published at `https://api.trlay.dev/.well-known/mcp/server-card.json`.

## Tools

### identity

Issue a pass for one agent under the organisation. Returns the identity id and its signing key, once.

Read only: false.

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "org": {
      "type": "string",
      "pattern": "^org_(eu|us)_[0-9a-f]{32}$"
    },
    "label": {
      "type": "string",
      "pattern": "^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$",
      "description": "What your team calls the agent, as in procurement-agent."
    }
  },
  "required": [
    "org",
    "label"
  ]
}
```

### mandate

Set what an identity may spend: per day, per call, and which sellers are allowed or denied.

Read only: false.

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "usd_per_day": {
      "type": "string",
      "pattern": "^\\d{1,9}(?:\\.\\d{1,6})?$",
      "description": "A USD amount as a decimal string with up to six decimals."
    },
    "usd_per_call_max": {
      "type": "string",
      "pattern": "^\\d{1,9}(?:\\.\\d{1,6})?$",
      "description": "A USD amount as a decimal string with up to six decimals."
    },
    "sellers_allow": {
      "maxItems": 200,
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1
      }
    },
    "sellers_deny": {
      "maxItems": 200,
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1
      }
    },
    "rails": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "x402",
          "mpp",
          "voucher"
        ]
      }
    },
    "mid": {
      "type": "string",
      "pattern": "^mid_(eu|us)_[0-9a-f]{32}$"
    }
  },
  "required": [
    "usd_per_day",
    "mid"
  ]
}
```

### record

Read the organisation's record, newest first: the ingested mandate receipts, settlements, wallet activity and verifier events. A calendar month in UTC, as YYYY-MM, narrows the page to that month.

Read only: true.

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 200
    },
    "cursor": {
      "type": "string"
    },
    "month": {
      "type": "string",
      "pattern": "^\\d{4}-(0[1-9]|1[0-2])$"
    }
  }
}
```

### revoke

Revoke an agent's pass. The online gate refuses it at once.

Read only: false.

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "mid": {
      "type": "string",
      "pattern": "^mid_(eu|us)_[0-9a-f]{32}$"
    }
  },
  "required": [
    "mid"
  ]
}
```

### token

Mint the interim identity token for a pass, signed by the region's key. The identity needs a mandate set first.

Read only: false.

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "mid": {
      "type": "string",
      "pattern": "^mid_(eu|us)_[0-9a-f]{32}$"
    }
  },
  "required": [
    "mid"
  ]
}
```

### gate

Evaluate a pass in a context and answer a decision, the evidence by class and a receipt id. Keyed by a verifier's own key, not the organisation's.

Read only: false.

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "subject": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "did"
            },
            "did": {
              "type": "string",
              "minLength": 1,
              "description": "An organisation or agent did:web identifier."
            }
          },
          "required": [
            "type",
            "did"
          ]
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "credential"
            },
            "credential": {
              "type": "string",
              "minLength": 1,
              "description": "An SD-JWT VC organisation credential, compact serialisation."
            }
          },
          "required": [
            "type",
            "credential"
          ]
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "envelope"
            },
            "envelope": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {},
              "description": "An x402 identity envelope, as carried in PaymentPayload.extensions."
            }
          },
          "required": [
            "type",
            "envelope"
          ]
        }
      ],
      "description": "What is being evaluated: a DID, a credential or an x402 envelope."
    },
    "context": {
      "type": "object",
      "properties": {
        "seller": {
          "type": "string",
          "minLength": 1,
          "description": "The seller, by DID or by domain."
        },
        "endpoint": {
          "type": "string",
          "minLength": 1,
          "description": "The endpoint the call is for."
        },
        "amount_usd": {
          "type": "string",
          "pattern": "^\\d{1,9}(?:\\.\\d{1,6})?$",
          "description": "A USD amount as a decimal string with up to six decimals."
        },
        "rail": {
          "type": "string",
          "enum": [
            "x402",
            "mpp",
            "voucher"
          ]
        },
        "settlement_ref": {
          "description": "The settlement reference, when the call was already settled.",
          "type": "string",
          "maxLength": 200
        }
      },
      "required": [
        "seller",
        "endpoint",
        "amount_usd",
        "rail"
      ]
    }
  },
  "required": [
    "subject",
    "context"
  ]
}
```

### passes

Read the organisation's passes, newest first.

Read only: true.

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 200
    },
    "cursor": {
      "type": "string"
    }
  }
}
```
