Tools
The twelve tools of the Fleeex MCP server: what each does, its arguments, its result, and the error shape.
At a glance
| Tool | What it does | Kind |
|---|---|---|
list_apps | Lists the apps you own. | Read only |
create_app | Registers a new app and returns its first live API key. | Write |
list_api_keys | Lists an app's API keys, never the keys themselves. | Read only |
create_api_key | Issues a new live or sandbox key for an app. | Write |
revoke_api_key | Revokes a key at once. Cannot be undone. | Destructive |
get_app_usage | One month of an app's usage by its end users. | Read only |
get_webhook | Reads an app's webhook subscription. | Read only |
set_webhook | Creates or replaces an app's webhook subscription. | Write |
rotate_webhook_secret | Replaces the webhook signing secret. The old one stops at once. | Destructive |
get_wallet_balance | Your wallet balance. | Read only |
get_wallet_usage | Your month-to-date spend, last month, and a daily series. | Read only |
list_wallet_apps | The apps authorized to spend your wallet, with spend and cap. | Read only |
The kind is sent to the client as an MCP annotation (readOnlyHint, destructiveHint),
so a client can, for example, ask you before it runs a destructive tool.
revoke_api_key and set_webhook are also marked idempotent: running them twice with
the same arguments leaves the same state.
Amounts are in EUR micro-units: 1 EUR = 1,000,000. Ids are the ones the other tools
return: appId from list_apps or create_app, keyId from list_api_keys.
Apps and API keys
list_apps
No arguments. Returns the apps you own, each with appId, name, and createdAt.
create_app
| Argument | Type | Required | Rules |
|---|---|---|---|
name | string | yes | 1 to 100 characters. A human-readable app name. |
redirectUris | string[] | no | Up to 10 absolute http(s) URLs Fleeex may send your users back to after onboarding (exact match). |
Returns appId, name, keyId, and apiKey: the app's first live key, shown
once. For a test key, call create_api_key with mode: "sandbox" next.
list_api_keys
| Argument | Type | Required | Rules |
|---|---|---|---|
appId | string | yes | An app id you own. |
Returns each key's keyId, mode (live or sandbox), status (active or
revoked), createdAt, and revokedAt once revoked. Never the key itself.
create_api_key
| Argument | Type | Required | Rules |
|---|---|---|---|
appId | string | yes | An app id you own. |
mode | "live" | "sandbox" | no | "live" by default. |
Existing keys stay valid until you revoke them, so you can rotate without downtime. A
live key spends real wallet money on real models. A sandbox key (flx_test_…) calls
no model and spends a fake balance: see Sandbox. Returns appId,
keyId, apiKey (shown once), and mode.
revoke_api_key
| Argument | Type | Required | Rules |
|---|---|---|---|
appId | string | yes | An app id you own. |
keyId | string | yes | The key id from list_api_keys, not the key. |
Every call made with the key is refused from then on. Returns
{ "revoked": true, "appId": "…", "keyId": "…" }.
get_app_usage
| Argument | Type | Required | Rules |
|---|---|---|---|
appId | string | yes | An app id you own. |
period | string | no | A month, "yyyy-mm". The current UTC month by default. |
Returns the app's totals for the month, its active users, a daily series, and its top users by spend.
Webhook
See Webhooks for the events and how to verify a delivery.
get_webhook
| Argument | Type | Required | Rules |
|---|---|---|---|
appId | string | yes | An app id you own. |
Returns endpointUrl, events, lowBalanceThresholdMicros when set, status
(enabled or disabled), secretFingerprint, and timestamps. Never the signing
secret. An app with no subscription answers NOT_FOUND.
set_webhook
| Argument | Type | Required | Rules |
|---|---|---|---|
appId | string | yes | An app id you own. |
endpointUrl | string | yes | A public https URL, up to 2,048 characters. Fleeex POSTs events to it. |
events | string[] | yes | At least one of balance.low, topup.completed, connection.created. |
lowBalanceThresholdMicros | integer | no | 1 to 1,000,000,000. Required with balance.low, refused without it. |
The arguments are the complete desired state: a field you leave out is cleared. Returns the subscription as get_webhook
does, plus signingSecret only when this call created it. Store it right away.
rotate_webhook_secret
| Argument | Type | Required | Rules |
|---|---|---|---|
appId | string | yes | An app id you own. |
Returns appId, the new signingSecret (shown once), secretFingerprint, and
secretCreatedAt. The previous secret stops verifying at once, so update your receiver.
Wallet (read only)
None of these tools takes an argument. Funding, caps, and disconnecting an app happen in the Fleeex dashboard.
get_wallet_balance
Your wallet balance, in EUR micro-units.
get_wallet_usage
Your month-to-date AI spend across every app billed to your wallet, the previous month, and a daily series.
list_wallet_apps
The apps authorized to spend your wallet, each with its month-to-date spend and its
cap. These are the apps connected to your wallet, not the apps you own: for those, use
list_apps.
Results
A successful call returns one text content holding the result as indented JSON:
{
"revoked": true,
"appId": "3f6c…",
"keyId": "9a21…"
}Errors
A failed call is an MCP tool result with isError: true and one text content holding:
{
"error": {
"code": "NOT_FOUND",
"message": "…",
"status": 404
}
}code | When |
|---|---|
VALIDATION_FAILED | An argument broke a rule. message lists the failed constraints. |
NOT_FOUND | The app (or its webhook subscription) doesn't exist. |
FORBIDDEN | The app exists but isn't yours. |
BAD_REQUEST, CONFLICT, … | Any other refusal, named after its HTTP status. |
A specific code (ACTIVE_KEY_LIMIT_REACHED, APP_SUSPENDED, ACCOUNT_UNAVAILABLE, …) | The same refusal the dashboard would get for that action. |
UNAUTHORIZED | The call reached the tool without an identity. Reconnect the client. |
INTERNAL_ERROR | Something failed on the Fleeex side. The error also carries a correlationId: quote it to support. |
Before any of that, the server checks the arguments against the tool's declared schema,
the one the client sees. A call that doesn't match it (a missing appId, a mode that
isn't live or sandbox) comes back as an error result with the schema message, and
nothing runs. Unknown arguments are dropped.
A webhook endpointUrl pointing at a non-public address is refused with BAD_REQUEST.