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

# Tools

> Complete reference for the orriven MCP server: tool definitions, input parameters, response schemas, and permission requirements.

The orriven MCP server provides eighteen administrative tools aligned with the [command-line tool](/en/developers/cli) and the Console Developer surface.

Tools operating within a Business Unit require a `workspaceId`, which can be retrieved via `list_workspaces`. Inaccessible or non-existent business units return a standard `not found` response.

## Account and scope

Tools for inspecting authenticated user identity and organizational hierarchy.

| Tool                 | Parameters       | Description and Returns                                                                                                     |
| -------------------- | ---------------- | --------------------------------------------------------------------------------------------------------------------------- |
| `whoami`             | —                | Returns authenticated user details and the connected client application identifier.                                         |
| `list_organizations` | —                | Returns all organizations accessible to the authenticated account, including organization-level roles.                      |
| `list_workspaces`    | `organizationId` | Returns Business Units within the specified organization, including effective roles, `restricted` status, and `archivedAt`. |

## API keys

Manage developer credentials. Requires **Owner** or **Admin** role in the specified Business Unit.

| Tool                          | Parameters                                               | Description and Returns                                                                                                        |
| ----------------------------- | -------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
| `list_api_keys`               | `workspaceId`, `includeRevoked?`                         | Lists API keys for the Business Unit: secret keys (`ok_…` identifier, prefix only) and publishable keys (`opk_…`, full token). |
| `create_api_key`              | `workspaceId`, `label`, `expiresAt?`                     | Generates a new secret API key and returns its plaintext `secret` (`osk_…`) **once** in the response.                          |
| `create_publishable_key`      | `workspaceId`, `label`, `allowedOrigins[]`, `expiresAt?` | Generates a publishable key bound to explicit browser origins (`https://…` or `http://localhost…`).                            |
| `set_publishable_key_origins` | `workspaceId`, `apiKeyId`, `allowedOrigins[]`            | Updates the allowed origin list for an existing publishable key.                                                               |
| `revoke_api_key`              | `workspaceId`, `apiKeyId`                                | Revokes the specified API key. Revocation is immediate and irreversible.                                                       |

<Note>
  `apiKeyId` is the database row identifier returned in `list_api_keys`, distinct from the public key identifier (`ok_…` or `opk_…`). `expiresAt` requires an ISO 8601 timestamp string.
</Note>

## Webhooks

Configure and monitor webhook event subscriptions. Requires **Owner** or **Admin** role in the specified Business Unit.

| Tool                       | Parameters                                                                                                    | Description and Returns                                                                                                                                   |
| -------------------------- | ------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `list_webhook_event_types` | —                                                                                                             | Lists all subscribeable event types.                                                                                                                      |
| `list_webhook_endpoints`   | `workspaceId`                                                                                                 | Lists configured endpoints, including status, subscription filters, signing secret identifier, failure counts, and last delivery timestamp.               |
| `create_webhook_endpoint`  | `workspaceId`, `url`, `subscribedEvents[]`, `description?`                                                    | Creates an endpoint and returns its signing secret. `url` must use HTTPS (`http` permitted for `localhost`).                                              |
| `update_webhook_endpoint`  | `workspaceId`, `endpointId`, `url?`, `description?`, `subscribedEvents?`, `status?` (`enabled` \| `disabled`) | Updates endpoint configuration. Unspecified fields remain unchanged.                                                                                      |
| `ping_webhook_endpoint`    | `workspaceId`, `endpointId`                                                                                   | Dispatches a signed test event through the delivery pipeline. Endpoint must be `enabled`. Returns `{ sent: true }`.                                       |
| `list_webhook_deliveries`  | `workspaceId`, `endpointId`                                                                                   | Retrieves recent delivery logs for the endpoint in reverse chronological order: status, attempts, HTTP response code, response body, and `nextAttemptAt`. |
| `resend_webhook_delivery`  | `workspaceId`, `deliveryId`                                                                                   | Initiates a redelivery attempt preserving the original event identifier.                                                                                  |

## Request logs and metrics

Inspect API traffic and performance metrics. Requires **Owner** or **Admin** role in the specified Business Unit.

| Tool                    | Parameters                                                                                                       | Description and Returns                                                                                                                                             |
| ----------------------- | ---------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `list_api_request_logs` | `workspaceId`, `limit?` (1–200, default 50), `before?`, `method?`, `status?` (`2xx`…`5xx`), `path?`, `apiKeyId?` | Returns chronological API request logs for the Business Unit. Supports pagination via the `before` cursor (`createdAt` timestamp).                                  |
| `get_api_request_log`   | `workspaceId`, `logId`                                                                                           | Returns full request and response details: IP address, user agent, API version, and payload bodies (bodies over 16 KB are truncated; `/auth/` routes are redacted). |
| `get_api_metrics`       | `workspaceId`, `days?` (1, 7, or 30; default 7)                                                                  | Returns aggregated request volume, error counts, and latency percentiles across 48 time buckets, plus aggregate totals.                                             |

## Error handling

When an operation cannot be completed, the tool returns a structured error message indicating the underlying cause (for example, `Business unit not found.`, `Insufficient permissions for role (viewer).`, or `Origin must follow scheme://host[:port] format.`).

Parameter validation occurs prior to execution; missing or malformed inputs are rejected with the specific field name indicated.

## Event data operations

The MCP server provides management and developer platform tooling. To perform operations on event data—such as creating events, managing ticket types, approving registrations, or processing orders—generate a secret API key via `create_api_key` and call the [Developer API](/en/developers/overview).
