Skip to main content
Glama

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

NameRequiredDescriptionDefault
nameNocreate: what will use the key (shown in lists, 1-120 characters).
actionNolist | create | revoke.list
key_idNorevoke: the key's id (from list).
scopesNocreate: `chat` (call agents over the chat API) and/or `admin` (chat plus this MCP server: full control). Default ["chat"].
confirmNofalse (default) = dry run: report what WOULD change and change nothing. true = execute.
expires_in_daysNocreate: days until the key stops working (1-3650). 0 = never expires.
include_revokedNolist: also return revoked keys (default true).

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations supplied, the description carries the full behavioral burden and does so thoroughly: revoke takes effect on the key's next request and cannot be undone, create returns the secret exactly once (only a SHA-256 digest is stored), the key must not be written to files/logs/commits, an admin key grants full engine control, both writes are audited under the caller, and keys are per engine instance so there is no `env`. That is precisely the beyond-schema context an agent needs before a destructive or secret-exposing call.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three short paragraphs with the resource definition front-loaded, then per-action arguments, then the security constraints that matter most. The `Authorization: Bearer wae_...` detail is slightly tangential but justifies its place by clarifying where keys are accepted; otherwise there is little waste.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a seven-parameter, multi-action tool with no annotations, the definition covers irreversibility, audit trail, secret-once semantics, scope blast radius, and the absent `env` parameter. An output schema exists and the description still names the list fields, so nothing an agent needs to call this safely is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so both the action-specific parameters and the scopes/expiry semantics are already documented in the schema, making 3 the baseline. The description adds marginal value by mapping which parameters belong to which action and noting that list never returns the key itself, but it does not add syntax or format detail beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names the resource concretely (portal-issued API keys in the `api_keys` table, mirroring Settings > API keys) and enumerates the three operations with their arguments. An agent can tell this apart from a provider-key concept without opening the schema, and the auth-transport sentence anchors what the resource is for.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied rather than stated: the action list (list/create/revoke) makes the selection obvious, and the scope note clarifies which scope a key needs to reach the chat API versus this MCP server. However, there is no explicit when-to-use versus siblings guidance (e.g. when to reach for `provider_keys` instead), so an agent must infer the boundary.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.