api_keys
Manage portal-issued access keys by listing, creating, or revoking credentials for WAJ AI Engine; creation returns the new key once with scopes and optional expiry.
Instructions
Portal-issued API keys (api_keys table; mirrors Settings > API keys,
via admin.services.api_keys). A key is sent as Authorization: Bearer wae_... to POST /v1/agents/{slug}/chat (scope chat or admin) or to this
MCP server (scope admin only).
action: list (name, key_prefix, scopes, created_at, last_used_at,
expires_at, status = active|expired|revoked; never the key) | create
(name, scopes, expires_in_days) | revoke (key_id; confirm required, takes
effect on the key's next request and cannot be undone).
create returns the key ONCE, in `key`. Only a SHA-256 digest is stored, so
it can never be read again: hand it to the user straight away, and do not
write it to a file, a log or a commit. Keys are per engine instance, not
per environment, so there is no `env`. Creating an `admin` key hands out
full control of this engine. Both writes are audited under the caller.Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "api_keys"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | create: what will use the key (shown in lists, 1-120 characters). | |
| action | No | list | create | revoke. | list |
| key_id | No | revoke: the key's id (from list). | |
| scopes | No | create: `chat` (call agents over the chat API) and/or `admin` (chat plus this MCP server: full control). Default ["chat"]. | |
| confirm | No | false (default) = dry run: report what WOULD change and change nothing. true = execute. | |
| expires_in_days | No | create: days until the key stops working (1-3650). 0 = never expires. | |
| include_revoked | No | list: also return revoked keys (default true). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |