Skip to main content
Glama

manage_api_key

Register, revoke, or list API keys for multi-user access, with role-based permissions and optional expiry; admin only. Plaintext keys are hashed before storage.

Instructions

Manage API keys for multi-user access (admin only).

action: "register" | "revoke" | "list" raw_key: the plaintext API key (register/revoke). Never stored; only its SHA-256 hash is persisted. user_id: human-readable owner label (register/list filter). role: "reader" | "member" | "writer" | "admin" (register only, default "reader"). 'member' (lab-open plan) requires user_uuid — it is how the key's private 90-personal// area is derived (see visibility.py). user_uuid: canonical UUID from EP lab-access (register only). Required for role='member'; optional for other roles. expires_days: if > 0, the key expires that many days from now (register only). 0 (default) means no expiry, same as every key before this.

Returns a plain-text summary of the operation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
roleNoreader
actionYes
raw_keyNo
user_idNo
user_uuidNo
expires_daysNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/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 well: it discloses that raw_key is never stored (only its SHA-256 hash is persisted), that expires_days=0 means no expiry, and that role='member' requires user_uuid. It does not cover error behavior or permission failure modes, so it stops short of a 5.

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?

Front-loaded with the one-line purpose, then a compact per-parameter breakdown with no wasted prose. Slightly dense in the role/user_uuid explanation, but every line carries information the schema lacks.

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?

An output schema exists, so return values need no elaboration, though the description still notes a plain-text summary. For a 6-parameter admin mutation tool with zero schema documentation and no annotations, the description supplies all the per-parameter and behavioral detail an agent needs.

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

Parameters5/5

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

Schema description coverage is 0% and all 6 parameters are undocumented in the schema, so the description must compensate — and it does, documenting action values, raw_key handling and lifetime, user_id meaning, role enums and defaults, member/user_uuid coupling, and expires_days semantics.

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?

States a specific verb (manage) and resource (API keys) plus the scope constraint (multi-user access, admin only). No sibling tool overlaps with key management, so an agent can select it unambiguously.

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?

The description names the three actions and marks the tool admin-only, giving clear context for when it applies. It does not explicitly state when not to use it or point at an alternative, but no plausible sibling exists, so the gap is minor.

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