Skip to main content
Glama

create_api_key

Mint a run or sub API key from the calling account tp_ key. Requires kind=account on the caller and an active plan. Writes a key row and returns the secret once, plus id, name, prefix, namespaces, tools, expiresAt, opBudgetTotal, and wipeOnExpire. No quota spend and no email. Run keys default to a 24 hour TTL, wipeOnExpire true, and one auto-generated namespace. Use finish_run to wipe a run key early. The tools array is the stored ACL allow-list of per-operation names, not these merged MCP names. manage_kv action=put is allowed only when the list includes kvp_put (or the list is omitted, which allows every operation). Unknown names are dropped. Former name: keys_create.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
kindYesrun: temporary job key with its own namespace. sub: longer-lived scoped key. Required. Account keys cannot be minted here.
nameNoDisplay name. Default run-key or sub-key when omitted.
toolsNoACL allow-list of per-operation names stored on the key. These are the names REST and metering already use. Examples: usage_get, usage_periods_list, budget_get, budget_estimate, billing_machine_pay, kvp_put, kvp_get, kvp_delete, kvp_list, memory_put, memory_get, memory_search, file_upload, files_list, files_types, file_get, file_delete, rag_note, rag_search, inspect_storage, run_finish, keys_create, keys_list, keys_revoke, support_contact, inbox_create, inbox_list, inbox_get, inbox_delete, inbox_messages_list, inbox_message_get, inbox_message_raw, inbox_attachment_get, inbox_webhook_create, inbox_webhook_list, inbox_webhook_delete, inbox_webhook_deliveries_list, inbox_audit_list, inbox_blocklist_list, inbox_blocklist_add, inbox_blocklist_delete, schedule_create, schedule_list, schedule_get, schedule_delete, schedule_runs_list. Merged MCP tools check the matching name per action (manage_kv action=put checks kvp_put, search_documents source=documents checks rag_search, search_documents source=memory checks memory_search, index_document kind=file checks file_upload, index_document kind=note checks rag_note). Omit to allow every operation. Names outside this list are dropped.
opBudgetNoMaximum metered operations this key may spend. Omit for no per-key cap. Values of 0 or less mean no cap.
namespacesNoNamespace allow-list. Omit on a run key to bind one generated run_ namespace. Omit on a sub key to allow every namespace.
ttlSecondsNoLifetime in seconds. Omit for the default: 24 hours on a run key, no expiry on a sub key.
wipeOnExpireNoWhen true, namespaces bound to the key are wiped at expiry. Default true for run keys and false for sub keys.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations, the description carries the full behavioral burden and does so well. It discloses that the tool writes a key row, returns the secret once, returns specific metadata fields, spends no quota, sends no email, applies run-key TTL and wipe defaults, and enforces ACL allow-list rules.

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

Conciseness5/5

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

The description is dense but front-loaded and every sentence carries operational value: prerequisites, return values, side effects, defaults, ACL rules, and the former name. There is no filler.

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 7-parameter, mutation-like tool with no annotations and no output schema, the description is complete enough. It covers authorization, side effects, return behavior, key defaults, and the non-obvious ACL semantics that an agent would otherwise miss.

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

Parameters4/5

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

Schema description coverage is 100%, so the baseline is 3. The description adds meaningful semantics beyond the schema, especially that tools is an ACL allow-list of per-operation names, not merged MCP tool names, and that manage_kv action=put requires kvp_put or an omitted list.

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 states a precise verb and resource: minting run or sub API keys from the calling account tp_ key. It distinguishes the two key kinds and notes that account keys cannot be minted here, giving an agent enough to separate it from unrelated sibling tools.

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

Usage Guidelines4/5

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

It gives clear prerequisites: the caller must have kind=account and an active plan. It also mentions the related cleanup tool finish_run for wiping a run key early, but it does not explicitly contrast create_api_key with alternate creation paths or state when not to use it.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.