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

# MCP tool reference

> Every tool and operation on the AI Reserve MCP server — who can call it, the copy-paste request, and the plain-English ask that does the same thing.

This page is the complete capability catalog of the [hosted MCP server](/connect/mcp): all
**22 tools** and **90+ operations** an enterprise admin can drive, each with a runnable
request. It is generated against the same operation registry the portal's sidebar assistant
uses, so the two surfaces cannot drift.

Two ways to use everything below:

* **Ask your agent.** With the server connected (Claude Code, Codex, Cursor, a Claude
  custom connector, …), say the thing — *"revoke the CI key that hasn't been used in 30
  days"* — and the agent picks the operation, resolves the ids, and walks the consent flow.
  Every section lists example asks.
* **Call it yourself.** Every operation is one JSON-RPC `tools/call` POST. Copy any snippet
  below.

## The call, once

All snippets share this exact shape — only the JSON body changes:

```shell theme={"dark"}
curl https://api.aireserve.com/mcp \
  -H "Authorization: Bearer $AIRESERVE_MCP_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"<tool>","arguments":{…}}}'
```

Reads go through a domain's `*-query` tool as `{"query": {"action": …, "input": {…}}}`;
writes go through `*-action` as `{"proposal": {"action": …, "input": {…}}}`. Replace
`<…-uuid>` placeholders with real ids — always resolved from a query tool first, never
guessed.

**How each operation runs** (the *Runs* column below):

| Runs          | Meaning                                                                                                                                                                              |
| ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| immediately   | Executes on the call and returns `{"status": "executed", "ok": …, "message": …}` (queries return `{"ok", "message", "data"}`)                                                        |
| after confirm | Returns `needs_confirmation` with a 10-minute `confirmToken`; show the summary to a human, then repeat the call with `"confirmToken"` added to the arguments                         |
| portal link   | Returns `portal_redemption` with a 15-minute link; the secret renders once in the signed-in portal, never over the API — see [consent and secrets](/connect/mcp#consent-and-secrets) |

**Who sees what.** The tool list is computed per request from the connected user's live role:
members get the fixed tools plus `personal-*`; team leads add their subtree's membership and
budget actions; enterprise admins get everything on this page. Ids in parentheses after each
heading are the exact tool names (they surface in Claude Code as `mcp__aireserve__<tool>`).

## Identity & catalog (`whoami`, `list-models`, `get-model`, `get-connection-guide`)

Fixed read tools, available to every role with `mcp:read`.

> *"Who is this connection signed in as?"* · *"Which models can we use right now, and what
> do they cost?"* · *"Is deepseek-v3.2 blocked for our org?"* · *"Give me the base URLs and
> rate limits for pointing our SDK at the gateway."*

| Tool                   | What it returns                                                                                                                                       | Runs        |
| ---------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------- |
| `whoami`               | Acting account, organization, role, authority level, token scopes and expiry                                                                          | immediately |
| `list-models`          | Every gateway chat model with live pricing (USD per 1M tokens), latency/reasoning traits, org blocklist status, and the org default                   | immediately |
| `get-model`            | One model by id: pricing, traits, reasoning notes, org availability                                                                                   | immediately |
| `get-connection-guide` | Gateway base URLs, wire-compatible endpoints (OpenAI, Anthropic, Bedrock), env-var conventions, the org's effective rate limits, guided connect pages | immediately |

<CodeGroup>
  ```shell whoami theme={"dark"}
  curl https://api.aireserve.com/mcp \
    -H "Authorization: Bearer $AIRESERVE_MCP_TOKEN" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json, text/event-stream" \
    -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"whoami","arguments":{}}}'
  ```

  ```shell list-models theme={"dark"}
  curl https://api.aireserve.com/mcp \
    -H "Authorization: Bearer $AIRESERVE_MCP_TOKEN" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json, text/event-stream" \
    -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"list-models","arguments":{}}}'
  ```

  ```shell get-model theme={"dark"}
  curl https://api.aireserve.com/mcp \
    -H "Authorization: Bearer $AIRESERVE_MCP_TOKEN" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json, text/event-stream" \
    -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"get-model","arguments":{"modelId":"claude-sonnet-4-6"}}}'
  ```

  ```shell get-connection-guide theme={"dark"}
  curl https://api.aireserve.com/mcp \
    -H "Authorization: Bearer $AIRESERVE_MCP_TOKEN" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json, text/event-stream" \
    -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"get-connection-guide","arguments":{}}}'
  ```
</CodeGroup>

Each `list-models` entry looks like:

```json theme={"dark"}
{
  "id": "claude-sonnet-4-6",
  "name": "Claude Sonnet 4.6",
  "provider": "Anthropic",
  "latency": "medium",
  "reasoning": "advanced",
  "blocked": false,
  "pricing": { "inputPer1mTokens": 3, "outputPer1mTokens": 15 }
}
```

## One-shot inference (`send-message`)

Requires the `mcp:messages` scope. Sends one prompt through the gateway **as the connected
user** — billed, rate-limited, and visible in usage analytics exactly like their own
traffic. Respects the org's model policy (blocked models are refused; omitted `modelId`
uses the org default).

> *"Ask kimi-k2 to summarize this changelog."* · *"Run this prompt against the org default
> model."*

| Input             | Type             | Notes                                                 |
| ----------------- | ---------------- | ----------------------------------------------------- |
| `prompt`          | string, required | Up to 32,000 characters                               |
| `modelId`         | string           | From `list-models`; defaults to the org default model |
| `system`          | string           | Optional system prompt, up to 8,000 characters        |
| `maxOutputTokens` | int              | 1–8,192; default 1,024                                |

```shell send-message theme={"dark"}
curl https://api.aireserve.com/mcp \
  -H "Authorization: Bearer $AIRESERVE_MCP_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"send-message","arguments":{"prompt":"One sentence: what is an LLM gateway?","modelId":"claude-sonnet-4-6","maxOutputTokens":200}}}'
```

Returns `{ "model", "text", "finishReason", "usage": { "inputTokens", "outputTokens" } }`.
Budget refusals are relayed in plain language (spend cap reached, wallet balance too low).

## Personal (`personal-query`, `personal-action`)

Every role. The caller's own usage, budget, keys, and preferences.

> *"How much have I spent this week, and on which models?"* · *"List my API keys with
> 30-day usage and revoke the one I stopped using."* · *"Make gemini-3-flash my default
> model."*

| Operation              | What it does                                                                                                                                                                           | Runs          |
| ---------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------- |
| `get_my_usage_summary` | Usage for your visible scope (self / team / org by role): totals, top models, active users, spend leaderboard; 1, 7, or 30 days; admins and team leads can drill into a team or member | immediately   |
| `get_my_budget_status` | Your spend cap and team budget with remaining headroom                                                                                                                                 | immediately   |
| `list_my_api_keys`     | Your API keys, masked, with ids and optional 30-day request counts                                                                                                                     | immediately   |
| `create_api_key`       | Mint a personal inference key                                                                                                                                                          | portal link   |
| `revoke_api_key`       | Revoke one of your own keys (irreversible)                                                                                                                                             | after confirm |
| `set_default_model`    | Set or clear (`null`) your personal default chat model                                                                                                                                 | immediately   |

<CodeGroup>
  ```shell get_my_usage_summary theme={"dark"}
  curl https://api.aireserve.com/mcp \
    -H "Authorization: Bearer $AIRESERVE_MCP_TOKEN" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json, text/event-stream" \
    -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"personal-query","arguments":{"query":{"action":"get_my_usage_summary","input":{"days":7}}}}}'
  ```

  ```shell get_my_budget_status theme={"dark"}
  curl https://api.aireserve.com/mcp \
    -H "Authorization: Bearer $AIRESERVE_MCP_TOKEN" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json, text/event-stream" \
    -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"personal-query","arguments":{"query":{"action":"get_my_budget_status","input":{}}}}}'
  ```

  ```shell list_my_api_keys theme={"dark"}
  curl https://api.aireserve.com/mcp \
    -H "Authorization: Bearer $AIRESERVE_MCP_TOKEN" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json, text/event-stream" \
    -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"personal-query","arguments":{"query":{"action":"list_my_api_keys","input":{"includeUsage":true}}}}}'
  ```

  ```shell create_api_key theme={"dark"}
  curl https://api.aireserve.com/mcp \
    -H "Authorization: Bearer $AIRESERVE_MCP_TOKEN" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json, text/event-stream" \
    -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"personal-action","arguments":{"proposal":{"action":"create_api_key","input":{"name":"CI pipeline"}}}}}'
  ```

  ```shell revoke_api_key theme={"dark"}
  curl https://api.aireserve.com/mcp \
    -H "Authorization: Bearer $AIRESERVE_MCP_TOKEN" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json, text/event-stream" \
    -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"personal-action","arguments":{"proposal":{"action":"revoke_api_key","input":{"keyId":"<key-uuid>"}}}}}'
  ```

  ```shell set_default_model theme={"dark"}
  curl https://api.aireserve.com/mcp \
    -H "Authorization: Bearer $AIRESERVE_MCP_TOKEN" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json, text/event-stream" \
    -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"personal-action","arguments":{"proposal":{"action":"set_default_model","input":{"modelId":"claude-sonnet-4-6"}}}}}'
  ```
</CodeGroup>

## Organization API keys (`api-keys-query`, `api-keys-action`)

Enterprise admins. The org's gateway credentials: listing, usage, minting, revocation,
compaction, and live self-tests.

> *"List all our API keys and flag the ones idle for 30 days."* · *"Mint an org key named
> 'ETL prod' bound to Priya for attribution."* · *"Revoke key 4354cccc — verify the id
> against the list first."* · *"Run a test ping through the new key."*

| Operation                   | What it does                                                                                          | Runs          |
| --------------------------- | ----------------------------------------------------------------------------------------------------- | ------------- |
| `list_client_api_keys`      | Every org key — id, masked key, binding (user / team / organization), status, last use                | immediately   |
| `get_client_api_key_usage`  | Per-key request/token/cost totals, optional `startDate`/`endDate`                                     | immediately   |
| `get_client_api_key_trends` | 30-day request count and last-use per key — idle-key detection                                        | immediately   |
| `check_copilot_key_traffic` | Whether a Copilot connect key has served traffic beyond its self-test                                 | immediately   |
| `create_client_api_key`     | Mint an org key, optionally bound to a member (`userId`) for attribution and user-scope quota         | portal link   |
| `create_team_api_key`       | Mint a team-scoped key                                                                                | portal link   |
| `revoke_client_api_key`     | Revoke any org key (irreversible)                                                                     | after confirm |
| `set_api_key_compaction`    | Toggle always-on context compaction for one key                                                       | immediately   |
| `test_api_key`              | One-token live ping through a key — verifies auth, model policy, caps, provider (a real metered call) | immediately   |

<CodeGroup>
  ```shell list_client_api_keys theme={"dark"}
  curl https://api.aireserve.com/mcp \
    -H "Authorization: Bearer $AIRESERVE_MCP_TOKEN" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json, text/event-stream" \
    -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"api-keys-query","arguments":{"query":{"action":"list_client_api_keys","input":{}}}}}'
  ```

  ```shell get_client_api_key_usage theme={"dark"}
  curl https://api.aireserve.com/mcp \
    -H "Authorization: Bearer $AIRESERVE_MCP_TOKEN" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json, text/event-stream" \
    -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"api-keys-query","arguments":{"query":{"action":"get_client_api_key_usage","input":{"startDate":"2026-08-01","endDate":"2026-08-19"}}}}}'
  ```

  ```shell get_client_api_key_trends theme={"dark"}
  curl https://api.aireserve.com/mcp \
    -H "Authorization: Bearer $AIRESERVE_MCP_TOKEN" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json, text/event-stream" \
    -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"api-keys-query","arguments":{"query":{"action":"get_client_api_key_trends","input":{}}}}}'
  ```

  ```shell check_copilot_key_traffic theme={"dark"}
  curl https://api.aireserve.com/mcp \
    -H "Authorization: Bearer $AIRESERVE_MCP_TOKEN" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json, text/event-stream" \
    -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"api-keys-query","arguments":{"query":{"action":"check_copilot_key_traffic","input":{"keyId":"<key-uuid>"}}}}}'
  ```

  ```shell create_client_api_key theme={"dark"}
  curl https://api.aireserve.com/mcp \
    -H "Authorization: Bearer $AIRESERVE_MCP_TOKEN" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json, text/event-stream" \
    -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"api-keys-action","arguments":{"proposal":{"action":"create_client_api_key","input":{"name":"ETL prod","userId":"<user-uuid>"}}}}}'
  ```

  ```shell create_team_api_key theme={"dark"}
  curl https://api.aireserve.com/mcp \
    -H "Authorization: Bearer $AIRESERVE_MCP_TOKEN" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json, text/event-stream" \
    -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"api-keys-action","arguments":{"proposal":{"action":"create_team_api_key","input":{"teamId":"<team-uuid>","name":"Data science shared"}}}}}'
  ```

  ```shell revoke_client_api_key theme={"dark"}
  curl https://api.aireserve.com/mcp \
    -H "Authorization: Bearer $AIRESERVE_MCP_TOKEN" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json, text/event-stream" \
    -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"api-keys-action","arguments":{"proposal":{"action":"revoke_client_api_key","input":{"keyId":"<key-uuid>"}}}}}'
  ```

  ```shell set_api_key_compaction theme={"dark"}
  curl https://api.aireserve.com/mcp \
    -H "Authorization: Bearer $AIRESERVE_MCP_TOKEN" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json, text/event-stream" \
    -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"api-keys-action","arguments":{"proposal":{"action":"set_api_key_compaction","input":{"keyId":"<key-uuid>","enabled":true}}}}}'
  ```

  ```shell test_api_key theme={"dark"}
  curl https://api.aireserve.com/mcp \
    -H "Authorization: Bearer $AIRESERVE_MCP_TOKEN" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json, text/event-stream" \
    -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"api-keys-action","arguments":{"proposal":{"action":"test_api_key","input":{"keyId":"<key-uuid>"}}}}}'
  ```
</CodeGroup>

<Note>
  Key minting is always a **portal link** — the fresh secret renders once in the signed-in
  portal and never crosses the API. The two-step flow exists so an LLM-driven channel can
  never exfiltrate a live credential.
</Note>

## Members (`members-query`, `members-action`)

Enterprise admins (`invite_user` also team leads, restricted to regular users on a team in
their subtree). Account directory, per-member usage, invitations, roles, lifecycle.

> *"Invite [ada@acme.com](mailto:ada@acme.com) to the Data team and send her the onboarding email."* · *"Who are
> our top spenders this month, by model?"* · *"Deactivate Sam's account."* · *"Promote
> Priya to enterprise admin."* · *"Send Marco a password reset."*

| Operation                       | What it does                                                                                               | Runs          |
| ------------------------------- | ---------------------------------------------------------------------------------------------------------- | ------------- |
| `list_org_users`                | Search accounts (email/name), filter by role, include inactive and soft-deleted, paged                     | immediately   |
| `get_member_usage_totals`       | Token and spend totals for up to 25 members by id                                                          | immediately   |
| `get_member_usage_by_model`     | One member's usage broken down by model                                                                    | immediately   |
| `get_shared_key_usage`          | Usage from shared org/team keys attributed to no user                                                      | immediately   |
| `get_shared_key_usage_by_model` | The same, broken down by model                                                                             | immediately   |
| `invite_user`                   | Create an account (role `user` or `enterprise_admin`, optional team) and optionally email the sign-in link | after confirm |
| `update_member_profile`         | Edit name, phone, address, contact notes                                                                   | immediately   |
| `assign_member_team`            | Move a member onto a team, or `null` for Unassigned                                                        | immediately   |
| `set_member_active`             | Activate or deactivate an account (deactivation locks out every session)                                   | after confirm |
| `set_user_org_role`             | Promote/demote between `user` and `enterprise_admin` (forces re-sign-in)                                   | after confirm |
| `delete_user`                   | Soft-delete the account and permanently purge their stored conversations                                   | after confirm |
| `restore_user`                  | Restore a soft-deleted account and email a fresh sign-in link                                              | after confirm |
| `send_password_reset`           | Email a live password-reset link                                                                           | after confirm |
| `send_onboarding_email`         | Send or resend the onboarding email                                                                        | after confirm |

Guard rails the server enforces on every transport: you cannot deactivate or delete
yourself, you cannot change your own role, and the last enterprise admin can never be
demoted or locked out.

<CodeGroup>
  ```shell list_org_users theme={"dark"}
  curl https://api.aireserve.com/mcp \
    -H "Authorization: Bearer $AIRESERVE_MCP_TOKEN" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json, text/event-stream" \
    -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"members-query","arguments":{"query":{"action":"list_org_users","input":{"search":"ada"}}}}}'
  ```

  ```shell get_member_usage_totals theme={"dark"}
  curl https://api.aireserve.com/mcp \
    -H "Authorization: Bearer $AIRESERVE_MCP_TOKEN" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json, text/event-stream" \
    -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"members-query","arguments":{"query":{"action":"get_member_usage_totals","input":{"userIds":["<user-uuid>"],"startDate":"2026-08-01","endDate":"2026-08-19"}}}}}'
  ```

  ```shell get_member_usage_by_model theme={"dark"}
  curl https://api.aireserve.com/mcp \
    -H "Authorization: Bearer $AIRESERVE_MCP_TOKEN" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json, text/event-stream" \
    -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"members-query","arguments":{"query":{"action":"get_member_usage_by_model","input":{"userId":"<user-uuid>"}}}}}'
  ```

  ```shell get_shared_key_usage theme={"dark"}
  curl https://api.aireserve.com/mcp \
    -H "Authorization: Bearer $AIRESERVE_MCP_TOKEN" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json, text/event-stream" \
    -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"members-query","arguments":{"query":{"action":"get_shared_key_usage","input":{}}}}}'
  ```

  ```shell get_shared_key_usage_by_model theme={"dark"}
  curl https://api.aireserve.com/mcp \
    -H "Authorization: Bearer $AIRESERVE_MCP_TOKEN" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json, text/event-stream" \
    -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"members-query","arguments":{"query":{"action":"get_shared_key_usage_by_model","input":{"teamId":"<team-uuid>"}}}}}'
  ```

  ```shell invite_user theme={"dark"}
  curl https://api.aireserve.com/mcp \
    -H "Authorization: Bearer $AIRESERVE_MCP_TOKEN" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json, text/event-stream" \
    -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"members-action","arguments":{"proposal":{"action":"invite_user","input":{"email":"ada@acme.com","name":"Ada Park","role":"user","teamId":"<team-uuid>","sendOnboardingEmail":true}}}}}'
  ```

  ```shell update_member_profile theme={"dark"}
  curl https://api.aireserve.com/mcp \
    -H "Authorization: Bearer $AIRESERVE_MCP_TOKEN" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json, text/event-stream" \
    -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"members-action","arguments":{"proposal":{"action":"update_member_profile","input":{"userId":"<user-uuid>","name":"Ada Park-Reyes"}}}}}'
  ```

  ```shell assign_member_team theme={"dark"}
  curl https://api.aireserve.com/mcp \
    -H "Authorization: Bearer $AIRESERVE_MCP_TOKEN" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json, text/event-stream" \
    -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"members-action","arguments":{"proposal":{"action":"assign_member_team","input":{"userId":"<user-uuid>","teamId":"<team-uuid>"}}}}}'
  ```

  ```shell set_member_active theme={"dark"}
  curl https://api.aireserve.com/mcp \
    -H "Authorization: Bearer $AIRESERVE_MCP_TOKEN" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json, text/event-stream" \
    -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"members-action","arguments":{"proposal":{"action":"set_member_active","input":{"userId":"<user-uuid>","active":false}}}}}'
  ```

  ```shell set_user_org_role theme={"dark"}
  curl https://api.aireserve.com/mcp \
    -H "Authorization: Bearer $AIRESERVE_MCP_TOKEN" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json, text/event-stream" \
    -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"members-action","arguments":{"proposal":{"action":"set_user_org_role","input":{"userId":"<user-uuid>","role":"enterprise_admin"}}}}}'
  ```

  ```shell delete_user theme={"dark"}
  curl https://api.aireserve.com/mcp \
    -H "Authorization: Bearer $AIRESERVE_MCP_TOKEN" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json, text/event-stream" \
    -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"members-action","arguments":{"proposal":{"action":"delete_user","input":{"userId":"<user-uuid>"}}}}}'
  ```

  ```shell restore_user theme={"dark"}
  curl https://api.aireserve.com/mcp \
    -H "Authorization: Bearer $AIRESERVE_MCP_TOKEN" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json, text/event-stream" \
    -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"members-action","arguments":{"proposal":{"action":"restore_user","input":{"userId":"<user-uuid>"}}}}}'
  ```

  ```shell send_password_reset theme={"dark"}
  curl https://api.aireserve.com/mcp \
    -H "Authorization: Bearer $AIRESERVE_MCP_TOKEN" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json, text/event-stream" \
    -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"members-action","arguments":{"proposal":{"action":"send_password_reset","input":{"userId":"<user-uuid>"}}}}}'
  ```

  ```shell send_onboarding_email theme={"dark"}
  curl https://api.aireserve.com/mcp \
    -H "Authorization: Bearer $AIRESERVE_MCP_TOKEN" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json, text/event-stream" \
    -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"members-action","arguments":{"proposal":{"action":"send_onboarding_email","input":{"userId":"<user-uuid>"}}}}}'
  ```
</CodeGroup>

## Teams & budgets (`teams-budgets-query`, `teams-budgets-action`)

Enterprise admins; team leads can move members within their own subtree, allocate budget to
teams strictly below their own node, and grant/revoke manager status inside their org.
The envelope model: **org cap → team allocations → Unassigned pool → per-user caps**.

> *"Create a Research sub-team under Engineering and give it $2,000."* · *"Show the
> allocation table — who has headroom?"* · *"Cap Anna at $150 with 60 requests a minute."*
> · *"Move these five people to Platform."* · *"Make Jordan a manager."*

| Operation                    | What it does                                                                              | Runs          |
| ---------------------------- | ----------------------------------------------------------------------------------------- | ------------- |
| `get_team_allocations`       | The full budget table: org cap, per-team allocations and spend, Unassigned pool, headroom | immediately   |
| `list_user_spend_caps`       | Per-user caps with lifetime spend (only capped users appear)                              | immediately   |
| `get_client_spend_summary`   | Org-wide cap, current spend, budget period                                                | immediately   |
| `create_team`                | New team, optionally under `parentTeamId`                                                 | immediately   |
| `rename_team`                | Rename a team                                                                             | immediately   |
| `delete_team`                | Delete an **empty** team (refused while it has members or sub-teams)                      | after confirm |
| `assign_user_to_team`        | Move one member to a team or Unassigned (`null`; admins only for Unassigned)              | immediately   |
| `bulk_assign_users_to_team`  | Move up to 25 members atomically                                                          | after confirm |
| `set_team_cap`               | Set a team's total (subtree) allocation in USD                                            | immediately   |
| `remove_team_cap`            | Remove a team's explicit allocation                                                       | immediately   |
| `set_unassigned_pool_cap`    | Cap the Unassigned pool                                                                   | immediately   |
| `remove_unassigned_pool_cap` | Team-less users fall back to the org cap                                                  | immediately   |
| `set_user_boss_status`       | Grant or dissolve a member's manager role (their own org node)                            | after confirm |
| `set_user_spend_cap`         | Personal spend cap in USD, optional requests/minute and requests/day                      | immediately   |
| `remove_user_spend_cap`      | Back to team/org limits                                                                   | immediately   |
| `set_client_spend_cap`       | Set or clear (`null`) the org-wide ceiling — all traffic stops when reached               | after confirm |

<CodeGroup>
  ```shell get_team_allocations theme={"dark"}
  curl https://api.aireserve.com/mcp \
    -H "Authorization: Bearer $AIRESERVE_MCP_TOKEN" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json, text/event-stream" \
    -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"teams-budgets-query","arguments":{"query":{"action":"get_team_allocations","input":{}}}}}'
  ```

  ```shell list_user_spend_caps theme={"dark"}
  curl https://api.aireserve.com/mcp \
    -H "Authorization: Bearer $AIRESERVE_MCP_TOKEN" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json, text/event-stream" \
    -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"teams-budgets-query","arguments":{"query":{"action":"list_user_spend_caps","input":{}}}}}'
  ```

  ```shell get_client_spend_summary theme={"dark"}
  curl https://api.aireserve.com/mcp \
    -H "Authorization: Bearer $AIRESERVE_MCP_TOKEN" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json, text/event-stream" \
    -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"teams-budgets-query","arguments":{"query":{"action":"get_client_spend_summary","input":{}}}}}'
  ```

  ```shell create_team theme={"dark"}
  curl https://api.aireserve.com/mcp \
    -H "Authorization: Bearer $AIRESERVE_MCP_TOKEN" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json, text/event-stream" \
    -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"teams-budgets-action","arguments":{"proposal":{"action":"create_team","input":{"name":"Research","parentTeamId":"<team-uuid>"}}}}}'
  ```

  ```shell rename_team theme={"dark"}
  curl https://api.aireserve.com/mcp \
    -H "Authorization: Bearer $AIRESERVE_MCP_TOKEN" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json, text/event-stream" \
    -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"teams-budgets-action","arguments":{"proposal":{"action":"rename_team","input":{"teamId":"<team-uuid>","name":"Applied Research"}}}}}'
  ```

  ```shell delete_team theme={"dark"}
  curl https://api.aireserve.com/mcp \
    -H "Authorization: Bearer $AIRESERVE_MCP_TOKEN" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json, text/event-stream" \
    -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"teams-budgets-action","arguments":{"proposal":{"action":"delete_team","input":{"teamId":"<team-uuid>"}}}}}'
  ```

  ```shell assign_user_to_team theme={"dark"}
  curl https://api.aireserve.com/mcp \
    -H "Authorization: Bearer $AIRESERVE_MCP_TOKEN" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json, text/event-stream" \
    -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"teams-budgets-action","arguments":{"proposal":{"action":"assign_user_to_team","input":{"userId":"<user-uuid>","teamId":"<team-uuid>"}}}}}'
  ```

  ```shell bulk_assign_users_to_team theme={"dark"}
  curl https://api.aireserve.com/mcp \
    -H "Authorization: Bearer $AIRESERVE_MCP_TOKEN" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json, text/event-stream" \
    -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"teams-budgets-action","arguments":{"proposal":{"action":"bulk_assign_users_to_team","input":{"userIds":["<user-uuid>","<user-uuid>"],"teamId":"<team-uuid>"}}}}}'
  ```

  ```shell set_team_cap theme={"dark"}
  curl https://api.aireserve.com/mcp \
    -H "Authorization: Bearer $AIRESERVE_MCP_TOKEN" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json, text/event-stream" \
    -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"teams-budgets-action","arguments":{"proposal":{"action":"set_team_cap","input":{"teamId":"<team-uuid>","budgetLimitUsd":2000}}}}}'
  ```

  ```shell remove_team_cap theme={"dark"}
  curl https://api.aireserve.com/mcp \
    -H "Authorization: Bearer $AIRESERVE_MCP_TOKEN" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json, text/event-stream" \
    -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"teams-budgets-action","arguments":{"proposal":{"action":"remove_team_cap","input":{"teamId":"<team-uuid>"}}}}}'
  ```

  ```shell set_unassigned_pool_cap theme={"dark"}
  curl https://api.aireserve.com/mcp \
    -H "Authorization: Bearer $AIRESERVE_MCP_TOKEN" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json, text/event-stream" \
    -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"teams-budgets-action","arguments":{"proposal":{"action":"set_unassigned_pool_cap","input":{"budgetLimitUsd":500}}}}}'
  ```

  ```shell remove_unassigned_pool_cap theme={"dark"}
  curl https://api.aireserve.com/mcp \
    -H "Authorization: Bearer $AIRESERVE_MCP_TOKEN" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json, text/event-stream" \
    -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"teams-budgets-action","arguments":{"proposal":{"action":"remove_unassigned_pool_cap","input":{}}}}}'
  ```

  ```shell set_user_boss_status theme={"dark"}
  curl https://api.aireserve.com/mcp \
    -H "Authorization: Bearer $AIRESERVE_MCP_TOKEN" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json, text/event-stream" \
    -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"teams-budgets-action","arguments":{"proposal":{"action":"set_user_boss_status","input":{"userId":"<user-uuid>","makeBoss":true}}}}}'
  ```

  ```shell set_user_spend_cap theme={"dark"}
  curl https://api.aireserve.com/mcp \
    -H "Authorization: Bearer $AIRESERVE_MCP_TOKEN" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json, text/event-stream" \
    -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"teams-budgets-action","arguments":{"proposal":{"action":"set_user_spend_cap","input":{"userId":"<user-uuid>","budgetLimitUsd":150,"requestsPerMinute":60}}}}}'
  ```

  ```shell remove_user_spend_cap theme={"dark"}
  curl https://api.aireserve.com/mcp \
    -H "Authorization: Bearer $AIRESERVE_MCP_TOKEN" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json, text/event-stream" \
    -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"teams-budgets-action","arguments":{"proposal":{"action":"remove_user_spend_cap","input":{"userId":"<user-uuid>"}}}}}'
  ```

  ```shell set_client_spend_cap theme={"dark"}
  curl https://api.aireserve.com/mcp \
    -H "Authorization: Bearer $AIRESERVE_MCP_TOKEN" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json, text/event-stream" \
    -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"teams-budgets-action","arguments":{"proposal":{"action":"set_client_spend_cap","input":{"capUsd":10000}}}}}'
  ```
</CodeGroup>

## Analytics (`analytics-query`)

Enterprise admins, read-only (there is no `analytics-action`). Compact aggregates by
design — top-5 lists, one 20-row log page, capped vocabularies — with request **metadata
only**: prompt and response content never crosses this surface.

> *"What did we spend last month, split input/output/cached?"* · *"Show failed gateway
> requests from yesterday."* · *"Which business functions drive our AI spend?"* · *"Give me
> a usage summary for June 1 to June 30."*

| Operation                     | What it does                                                                                                             | Runs        |
| ----------------------------- | ------------------------------------------------------------------------------------------------------------------------ | ----------- |
| `get_spend_breakdown`         | 30-day USD split: input / output / cached, plus request count                                                            | immediately |
| `get_gateway_usage_stats`     | Aggregate totals (requests, tokens, spend, latency, errors) filtered by date / model / provider / status / user          | immediately |
| `get_gateway_request_log`     | One page (≤20 rows) of the request log: who called which model, when, cost, status; cursor-paged over a stable snapshot  | immediately |
| `get_business_function_usage` | Usage grouped by business function and team, top 25 by cost                                                              | immediately |
| `get_gateway_filter_options`  | The legal filter values for the two ops above                                                                            | immediately |
| `get_analytics_dashboard`     | Analytics summary for a preset (1/7/30 days) or custom range (≤366 days), scoped to org, a team subtree, or a member set | immediately |
| `get_model_usage_year`        | Trailing-365-day model rollup, top 5 by spend                                                                            | immediately |

<CodeGroup>
  ```shell get_spend_breakdown theme={"dark"}
  curl https://api.aireserve.com/mcp \
    -H "Authorization: Bearer $AIRESERVE_MCP_TOKEN" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json, text/event-stream" \
    -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"analytics-query","arguments":{"query":{"action":"get_spend_breakdown","input":{}}}}}'
  ```

  ```shell get_gateway_usage_stats theme={"dark"}
  curl https://api.aireserve.com/mcp \
    -H "Authorization: Bearer $AIRESERVE_MCP_TOKEN" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json, text/event-stream" \
    -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"analytics-query","arguments":{"query":{"action":"get_gateway_usage_stats","input":{"startDate":"2026-08-01","endDate":"2026-08-19","model":"claude-sonnet-4-6"}}}}}'
  ```

  ```shell get_gateway_request_log theme={"dark"}
  curl https://api.aireserve.com/mcp \
    -H "Authorization: Bearer $AIRESERVE_MCP_TOKEN" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json, text/event-stream" \
    -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"analytics-query","arguments":{"query":{"action":"get_gateway_request_log","input":{"startDate":"2026-08-18","status":"failure","limit":20}}}}}'
  ```

  ```shell get_business_function_usage theme={"dark"}
  curl https://api.aireserve.com/mcp \
    -H "Authorization: Bearer $AIRESERVE_MCP_TOKEN" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json, text/event-stream" \
    -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"analytics-query","arguments":{"query":{"action":"get_business_function_usage","input":{"startDate":"2026-08-01"}}}}}'
  ```

  ```shell get_gateway_filter_options theme={"dark"}
  curl https://api.aireserve.com/mcp \
    -H "Authorization: Bearer $AIRESERVE_MCP_TOKEN" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json, text/event-stream" \
    -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"analytics-query","arguments":{"query":{"action":"get_gateway_filter_options","input":{}}}}}'
  ```

  ```shell get_analytics_dashboard theme={"dark"}
  curl https://api.aireserve.com/mcp \
    -H "Authorization: Bearer $AIRESERVE_MCP_TOKEN" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json, text/event-stream" \
    -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"analytics-query","arguments":{"query":{"action":"get_analytics_dashboard","input":{"from":"2026-06-01","to":"2026-06-30"}}}}}'
  ```

  ```shell get_model_usage_year theme={"dark"}
  curl https://api.aireserve.com/mcp \
    -H "Authorization: Bearer $AIRESERVE_MCP_TOKEN" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json, text/event-stream" \
    -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"analytics-query","arguments":{"query":{"action":"get_model_usage_year","input":{}}}}}'
  ```
</CodeGroup>

## Models & routing (`models-routing-query`, `models-routing-action`)

Enterprise admins. The org's model policy (default model, selection lock, blocklist) and the
Auto-router (enrollment, tuning, bring-your-own endpoint).

> *"Set the org default to Auto routing."* · *"Block the models that train on inputs."* ·
> *"Rebalance the router 60% smarter / 30% cheaper / 10% faster."* · *"Which providers
> serve Kimi K2 right now, and at what price and uptime?"*

| Operation                      | What it does                                                                                               | Runs          |
| ------------------------------ | ---------------------------------------------------------------------------------------------------------- | ------------- |
| `get_model_provider_endpoints` | Live per-provider pricing, uptime, and throughput for one catalog model                                    | immediately   |
| `set_org_default_model`        | Set the org default chat model — a model id, `"auto"` for Auto Routing, or `null` for the platform default | immediately   |
| `set_model_governance`         | Lock model selection to the default and/or replace the org blocklist (full replacement; `[]` clears)       | immediately   |
| `update_router_selections`     | Replace Auto-router enrollment and/or its blocklist (full replacement; `[]` clears)                        | immediately   |
| `update_router_tuning`         | Rebalance smarter/cheaper/faster (must sum to 100) and/or replace the plain-language routing rules         | after confirm |
| `set_router_endpoint`          | Live-test a bring-your-own router URL and save it only if the test passes                                  | after confirm |
| `clear_router_endpoint`        | Back to the built-in Auto router                                                                           | after confirm |

<CodeGroup>
  ```shell get_model_provider_endpoints theme={"dark"}
  curl https://api.aireserve.com/mcp \
    -H "Authorization: Bearer $AIRESERVE_MCP_TOKEN" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json, text/event-stream" \
    -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"models-routing-query","arguments":{"query":{"action":"get_model_provider_endpoints","input":{"modelId":"anthropic/claude-sonnet-4.6"}}}}}'
  ```

  ```shell set_org_default_model theme={"dark"}
  curl https://api.aireserve.com/mcp \
    -H "Authorization: Bearer $AIRESERVE_MCP_TOKEN" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json, text/event-stream" \
    -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"models-routing-action","arguments":{"proposal":{"action":"set_org_default_model","input":{"modelId":"auto"}}}}}'
  ```

  ```shell set_model_governance theme={"dark"}
  curl https://api.aireserve.com/mcp \
    -H "Authorization: Bearer $AIRESERVE_MCP_TOKEN" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json, text/event-stream" \
    -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"models-routing-action","arguments":{"proposal":{"action":"set_model_governance","input":{"modelSelectionLocked":false,"blockedModelIds":["deepseek-chat"]}}}}}'
  ```

  ```shell update_router_selections theme={"dark"}
  curl https://api.aireserve.com/mcp \
    -H "Authorization: Bearer $AIRESERVE_MCP_TOKEN" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json, text/event-stream" \
    -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"models-routing-action","arguments":{"proposal":{"action":"update_router_selections","input":{"routerModelIds":["anthropic/claude-sonnet-4.6","openai/gpt-5.5"]}}}}}'
  ```

  ```shell update_router_tuning theme={"dark"}
  curl https://api.aireserve.com/mcp \
    -H "Authorization: Bearer $AIRESERVE_MCP_TOKEN" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json, text/event-stream" \
    -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"models-routing-action","arguments":{"proposal":{"action":"update_router_tuning","input":{"tuning":{"smarter":60,"cheaper":30,"faster":10}}}}}}'
  ```

  ```shell set_router_endpoint theme={"dark"}
  curl https://api.aireserve.com/mcp \
    -H "Authorization: Bearer $AIRESERVE_MCP_TOKEN" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json, text/event-stream" \
    -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"models-routing-action","arguments":{"proposal":{"action":"set_router_endpoint","input":{"endpointUrl":"https://router.acme.com/route","method":"POST"}}}}}'
  ```

  ```shell clear_router_endpoint theme={"dark"}
  curl https://api.aireserve.com/mcp \
    -H "Authorization: Bearer $AIRESERVE_MCP_TOKEN" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json, text/event-stream" \
    -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"models-routing-action","arguments":{"proposal":{"action":"clear_router_endpoint","input":{}}}}}'
  ```
</CodeGroup>

## Org settings (`org-settings-query`, `org-settings-action`)

Enterprise admins. Org-wide chat text, privacy controls, branding, sign-in access, and
business-function classification review.

> *"Turn off storage of prompt and response text."* · *"Set content retention to 30 days."*
> · *"Open self-serve sign-up for acme.com."* · *"What classification questions are waiting
> on me?"* · *"What needs my attention today?"*

| Operation                          | What it does                                                                | Runs          |
| ---------------------------------- | --------------------------------------------------------------------------- | ------------- |
| `get_stored_content_count`         | How many conversation rows a purge would delete                             | immediately   |
| `get_org_branding`                 | Whitelabeling flag, window title, logo presence                             | immediately   |
| `list_signin_domains`              | Verified sign-in email domains and their self-serve status                  | immediately   |
| `list_needs_input_classifications` | Keys/teams/users whose classification awaits an admin answer                | immediately   |
| `list_classification_records`      | Classification records with date/category/state filters, cursor-paged       | immediately   |
| `get_classification_summary`       | Labeled-coverage totals                                                     | immediately   |
| `get_classification_provenance`    | Why one usage row carries its label                                         | immediately   |
| `get_needs_attention`              | Today's admin to-dos: budget alerts, stale keys, spend spikes               | immediately   |
| `update_org_instructions`          | Replace/toggle the org-wide chat instructions                               | after confirm |
| `update_org_context`               | Replace/toggle the org context text shared with every chat                  | after confirm |
| `set_content_logging`              | Turn storage of prompt/response text on or off                              | immediately   |
| `set_content_retention`            | Days before the scheduled purge deletes stored chat content (`null` = keep) | after confirm |
| `purge_stored_content`             | Permanently delete ALL stored conversation content                          | after confirm |
| `set_whitelabeling`                | Toggle whitelabeled branding                                                | immediately   |
| `set_window_title`                 | Set or clear (`""`) the custom browser title                                | immediately   |
| `remove_org_logo`                  | Remove the logo (also disables whitelabeling)                               | after confirm |
| `set_domain_auto_provision`        | Open or close self-serve sign-up for a verified domain                      | after confirm |
| `set_classification_enabled`       | Toggle business-function classification of new usage                        | immediately   |
| `answer_classification_question`   | Answer an open question — re-buckets all usage under that key/team/user     | immediately   |
| `confirm_classification`           | Confirm or correct one usage row's label                                    | immediately   |
| `clear_classification`             | Clear one usage row's label                                                 | immediately   |
| `dismiss_attention_items`          | Dismiss the current needs-attention items                                   | immediately   |

<CodeGroup>
  ```shell get_needs_attention theme={"dark"}
  curl https://api.aireserve.com/mcp \
    -H "Authorization: Bearer $AIRESERVE_MCP_TOKEN" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json, text/event-stream" \
    -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"org-settings-query","arguments":{"query":{"action":"get_needs_attention","input":{}}}}}'
  ```

  ```shell get_stored_content_count theme={"dark"}
  curl https://api.aireserve.com/mcp \
    -H "Authorization: Bearer $AIRESERVE_MCP_TOKEN" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json, text/event-stream" \
    -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"org-settings-query","arguments":{"query":{"action":"get_stored_content_count","input":{}}}}}'
  ```

  ```shell get_org_branding theme={"dark"}
  curl https://api.aireserve.com/mcp \
    -H "Authorization: Bearer $AIRESERVE_MCP_TOKEN" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json, text/event-stream" \
    -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"org-settings-query","arguments":{"query":{"action":"get_org_branding","input":{}}}}}'
  ```

  ```shell list_signin_domains theme={"dark"}
  curl https://api.aireserve.com/mcp \
    -H "Authorization: Bearer $AIRESERVE_MCP_TOKEN" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json, text/event-stream" \
    -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"org-settings-query","arguments":{"query":{"action":"list_signin_domains","input":{}}}}}'
  ```

  ```shell list_needs_input_classifications theme={"dark"}
  curl https://api.aireserve.com/mcp \
    -H "Authorization: Bearer $AIRESERVE_MCP_TOKEN" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json, text/event-stream" \
    -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"org-settings-query","arguments":{"query":{"action":"list_needs_input_classifications","input":{"limit":10}}}}}'
  ```

  ```shell list_classification_records theme={"dark"}
  curl https://api.aireserve.com/mcp \
    -H "Authorization: Bearer $AIRESERVE_MCP_TOKEN" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json, text/event-stream" \
    -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"org-settings-query","arguments":{"query":{"action":"list_classification_records","input":{"state":"needs_input","pageSize":10}}}}}'
  ```

  ```shell get_classification_summary theme={"dark"}
  curl https://api.aireserve.com/mcp \
    -H "Authorization: Bearer $AIRESERVE_MCP_TOKEN" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json, text/event-stream" \
    -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"org-settings-query","arguments":{"query":{"action":"get_classification_summary","input":{"startDate":"2026-08-01"}}}}}'
  ```

  ```shell get_classification_provenance theme={"dark"}
  curl https://api.aireserve.com/mcp \
    -H "Authorization: Bearer $AIRESERVE_MCP_TOKEN" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json, text/event-stream" \
    -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"org-settings-query","arguments":{"query":{"action":"get_classification_provenance","input":{"usageLogId":"<usage-row-uuid>"}}}}}'
  ```

  ```shell update_org_instructions theme={"dark"}
  curl https://api.aireserve.com/mcp \
    -H "Authorization: Bearer $AIRESERVE_MCP_TOKEN" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json, text/event-stream" \
    -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"org-settings-action","arguments":{"proposal":{"action":"update_org_instructions","input":{"text":"Answer in the metric system. Cite internal wiki pages where relevant.","enabled":true}}}}}'
  ```

  ```shell update_org_context theme={"dark"}
  curl https://api.aireserve.com/mcp \
    -H "Authorization: Bearer $AIRESERVE_MCP_TOKEN" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json, text/event-stream" \
    -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"org-settings-action","arguments":{"proposal":{"action":"update_org_context","input":{"text":"Acme builds industrial robotics. Fiscal year starts in February.","enabled":true}}}}}'
  ```

  ```shell set_content_logging theme={"dark"}
  curl https://api.aireserve.com/mcp \
    -H "Authorization: Bearer $AIRESERVE_MCP_TOKEN" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json, text/event-stream" \
    -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"org-settings-action","arguments":{"proposal":{"action":"set_content_logging","input":{"enabled":false}}}}}'
  ```

  ```shell set_content_retention theme={"dark"}
  curl https://api.aireserve.com/mcp \
    -H "Authorization: Bearer $AIRESERVE_MCP_TOKEN" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json, text/event-stream" \
    -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"org-settings-action","arguments":{"proposal":{"action":"set_content_retention","input":{"days":30}}}}}'
  ```

  ```shell purge_stored_content theme={"dark"}
  curl https://api.aireserve.com/mcp \
    -H "Authorization: Bearer $AIRESERVE_MCP_TOKEN" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json, text/event-stream" \
    -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"org-settings-action","arguments":{"proposal":{"action":"purge_stored_content","input":{}}}}}'
  ```

  ```shell set_whitelabeling theme={"dark"}
  curl https://api.aireserve.com/mcp \
    -H "Authorization: Bearer $AIRESERVE_MCP_TOKEN" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json, text/event-stream" \
    -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"org-settings-action","arguments":{"proposal":{"action":"set_whitelabeling","input":{"enabled":true}}}}}'
  ```

  ```shell set_window_title theme={"dark"}
  curl https://api.aireserve.com/mcp \
    -H "Authorization: Bearer $AIRESERVE_MCP_TOKEN" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json, text/event-stream" \
    -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"org-settings-action","arguments":{"proposal":{"action":"set_window_title","input":{"title":"Acme AI"}}}}}'
  ```

  ```shell remove_org_logo theme={"dark"}
  curl https://api.aireserve.com/mcp \
    -H "Authorization: Bearer $AIRESERVE_MCP_TOKEN" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json, text/event-stream" \
    -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"org-settings-action","arguments":{"proposal":{"action":"remove_org_logo","input":{}}}}}'
  ```

  ```shell set_domain_auto_provision theme={"dark"}
  curl https://api.aireserve.com/mcp \
    -H "Authorization: Bearer $AIRESERVE_MCP_TOKEN" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json, text/event-stream" \
    -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"org-settings-action","arguments":{"proposal":{"action":"set_domain_auto_provision","input":{"domainId":"<domain-uuid>","enabled":true}}}}}'
  ```

  ```shell set_classification_enabled theme={"dark"}
  curl https://api.aireserve.com/mcp \
    -H "Authorization: Bearer $AIRESERVE_MCP_TOKEN" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json, text/event-stream" \
    -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"org-settings-action","arguments":{"proposal":{"action":"set_classification_enabled","input":{"enabled":true}}}}}'
  ```

  ```shell answer_classification_question theme={"dark"}
  curl https://api.aireserve.com/mcp \
    -H "Authorization: Bearer $AIRESERVE_MCP_TOKEN" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json, text/event-stream" \
    -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"org-settings-action","arguments":{"proposal":{"action":"answer_classification_question","input":{"assignmentId":"<assignment-uuid>","category":"engineering"}}}}}'
  ```

  ```shell confirm_classification theme={"dark"}
  curl https://api.aireserve.com/mcp \
    -H "Authorization: Bearer $AIRESERVE_MCP_TOKEN" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json, text/event-stream" \
    -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"org-settings-action","arguments":{"proposal":{"action":"confirm_classification","input":{"usageLogId":"<usage-row-uuid>","category":"sales"}}}}}'
  ```

  ```shell clear_classification theme={"dark"}
  curl https://api.aireserve.com/mcp \
    -H "Authorization: Bearer $AIRESERVE_MCP_TOKEN" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json, text/event-stream" \
    -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"org-settings-action","arguments":{"proposal":{"action":"clear_classification","input":{"usageLogId":"<usage-row-uuid>"}}}}}'
  ```

  ```shell dismiss_attention_items theme={"dark"}
  curl https://api.aireserve.com/mcp \
    -H "Authorization: Bearer $AIRESERVE_MCP_TOKEN" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json, text/event-stream" \
    -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"org-settings-action","arguments":{"proposal":{"action":"dismiss_attention_items","input":{}}}}}'
  ```
</CodeGroup>

## Files (`files-query`, `files-action`)

Enterprise admins. The organization's stored files. Uploads stay in the portal (an API
can't supply file bytes through a consent card); everything else is here.

> *"List our shared files — anything named 'onboarding'?"* · *"Get me a download link for
> the Q2 board deck."* · *"Delete the stale export from May."*

| Operation                | What it does                                                                                | Runs          |
| ------------------------ | ------------------------------------------------------------------------------------------- | ------------- |
| `list_org_files`         | Shared files with name, type, size, upload date; searchable, paged                          | immediately   |
| `get_file_download_link` | Mint a one-hour signed download URL (a bearer capability, so it renders in the portal only) | portal link   |
| `delete_org_file`        | Delete a stored file (irreversible)                                                         | after confirm |

<CodeGroup>
  ```shell list_org_files theme={"dark"}
  curl https://api.aireserve.com/mcp \
    -H "Authorization: Bearer $AIRESERVE_MCP_TOKEN" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json, text/event-stream" \
    -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"files-query","arguments":{"query":{"action":"list_org_files","input":{"search":"onboarding"}}}}}'
  ```

  ```shell get_file_download_link theme={"dark"}
  curl https://api.aireserve.com/mcp \
    -H "Authorization: Bearer $AIRESERVE_MCP_TOKEN" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json, text/event-stream" \
    -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"files-action","arguments":{"proposal":{"action":"get_file_download_link","input":{"documentId":"<document-uuid>"}}}}}'
  ```

  ```shell delete_org_file theme={"dark"}
  curl https://api.aireserve.com/mcp \
    -H "Authorization: Bearer $AIRESERVE_MCP_TOKEN" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json, text/event-stream" \
    -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"files-action","arguments":{"proposal":{"action":"delete_org_file","input":{"documentId":"<document-uuid>"}}}}}'
  ```
</CodeGroup>

## Billing (`billing-query`, `billing-action`)

Enterprise admins. The yield-to-compute wallet, the immutable ledger mirror, and CARR
reporting. Money movements are the most conservative operations on the surface — every one
confirms, and none can be undone.

> *"What's our wallet balance and last epoch's yield?"* · *"List the credits into the
> wallet this quarter."* · *"Close the July ledger period and generate the CARR summary."*

| Operation               | What it does                                                                                                                                              | Runs          |
| ----------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------- |
| `get_wallet_summary`    | Current wallet balance and last-epoch yield                                                                                                               | immediately   |
| `list_wallet_credits`   | Credits into the wallet — funding, sweeps, transfers in                                                                                                   | immediately   |
| `get_ledger_balance`    | Ledger rollup: opening/closing balance, additions, consumption, recent events                                                                             | immediately   |
| `list_ledger_periods`   | Closed-and-hashed periods with record counts and hashes                                                                                                   | immediately   |
| `generate_carr_report`  | CARR summary figures for a period (file exports stay on `/admin/carr`)                                                                                    | immediately   |
| `transfer_client_funds` | Move USD from your wallet to another client's — requires a caller-minted `idempotencyKey` (reuse the same key on retry; a fresh key is a second transfer) | after confirm |
| `close_ledger_period`   | Close a usage period and anchor it into the immutable hash chain — can never be reopened                                                                  | after confirm |

<CodeGroup>
  ```shell get_wallet_summary theme={"dark"}
  curl https://api.aireserve.com/mcp \
    -H "Authorization: Bearer $AIRESERVE_MCP_TOKEN" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json, text/event-stream" \
    -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"billing-query","arguments":{"query":{"action":"get_wallet_summary","input":{}}}}}'
  ```

  ```shell list_wallet_credits theme={"dark"}
  curl https://api.aireserve.com/mcp \
    -H "Authorization: Bearer $AIRESERVE_MCP_TOKEN" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json, text/event-stream" \
    -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"billing-query","arguments":{"query":{"action":"list_wallet_credits","input":{}}}}}'
  ```

  ```shell get_ledger_balance theme={"dark"}
  curl https://api.aireserve.com/mcp \
    -H "Authorization: Bearer $AIRESERVE_MCP_TOKEN" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json, text/event-stream" \
    -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"billing-query","arguments":{"query":{"action":"get_ledger_balance","input":{}}}}}'
  ```

  ```shell list_ledger_periods theme={"dark"}
  curl https://api.aireserve.com/mcp \
    -H "Authorization: Bearer $AIRESERVE_MCP_TOKEN" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json, text/event-stream" \
    -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"billing-query","arguments":{"query":{"action":"list_ledger_periods","input":{}}}}}'
  ```

  ```shell generate_carr_report theme={"dark"}
  curl https://api.aireserve.com/mcp \
    -H "Authorization: Bearer $AIRESERVE_MCP_TOKEN" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json, text/event-stream" \
    -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"billing-query","arguments":{"query":{"action":"generate_carr_report","input":{"periodStart":"2026-07-01T00:00:00Z","periodEnd":"2026-07-31T23:59:59Z"}}}}}'
  ```

  ```shell transfer_client_funds theme={"dark"}
  curl https://api.aireserve.com/mcp \
    -H "Authorization: Bearer $AIRESERVE_MCP_TOKEN" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json, text/event-stream" \
    -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"billing-action","arguments":{"proposal":{"action":"transfer_client_funds","input":{"toClientId":"<client-uuid>","amountUsd":250,"idempotencyKey":"<mint-one-uuid-per-transfer>"}}}}}'
  ```

  ```shell close_ledger_period theme={"dark"}
  curl https://api.aireserve.com/mcp \
    -H "Authorization: Bearer $AIRESERVE_MCP_TOKEN" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json, text/event-stream" \
    -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"billing-action","arguments":{"proposal":{"action":"close_ledger_period","input":{"periodStart":"2026-07-01T00:00:00Z","periodEnd":"2026-07-31T23:59:59Z"}}}}}'
  ```
</CodeGroup>

## Completing a confirmation

Any operation marked *after confirm* returns a `confirmToken` on the first call. After a
human approves the returned `summary`, repeat the identical call with the token added
alongside the proposal:

```shell confirm-retry theme={"dark"}
curl https://api.aireserve.com/mcp \
  -H "Authorization: Bearer $AIRESERVE_MCP_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"members-action","arguments":{"proposal":{"action":"set_member_active","input":{"userId":"<user-uuid>","active":false}},"confirmToken":"<confirmToken-from-step-1>"}}}'
```

The token binds the exact operation, input, and caller the human saw; it expires after 10
minutes, and if the target row changed in between, execution refuses with a fresh summary
to re-approve.

## Not on this surface

By design, the MCP server never exposes:

* **Platform (cross-tenant) operations** — funding client wallets, wallet enforcement
  toggles, ledger syncs, sign-in-domain registration, cross-org lookups. Super admins are
  de-escalated to their own tenant here; platform work stays in the portal.
* **Secrets in responses** — key material and signed download URLs only ever render in the
  signed-in portal via [redemption links](/connect/mcp#consent-and-secrets).
* **Impersonation** and **file-byte uploads** — both remain portal page flows.
* **Prompt/response content** — analytics reads return request metadata only.
