Skip to main content
Glama

agent_key_create

Creates a key for one agent, with its own scopes, an optional spend cap and an optional expiry. The key can never exceed the scopes of the member minting it, and a key holding may_administer cannot mint another key holding may_administer, which is what makes revoking one mean something. The secret is shown once and never again.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "name": "<name>"
    },
    "name": "agent_key_create"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYesWhat this agent is for. Shown in the audit trail.
scopesNoIntersected with your own scopes. Asking for more than you hold narrows rather than fails.
confirmNoRequired for destructive operations. Without it a destructive call returns its plan and refuses, exactly as dry_run would.
dry_runNoReturn the plan without applying it: the resources it would create, change or destroy, and an estimated monthly cost. Free, and has no side effects. Call this before any change you have not made before.
budget_usdNoHard monthly cap. Cost-impacting calls are refused once reached, with code budget_exceeded.
product_idNoConfine the key to one Product. Omit for the whole organisation. A key cannot choose its own Product at call time, by design.
capabilitiesNo
idempotency_keyNoReplaying the same key returns the original result instead of acting twice. Strongly recommended for anything that creates a resource or spends money.
expires_in_hoursNoKey stops working after this. Prefer a short life and re-mint.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.9/5.0
Behavior4/5

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

Annotations only declare it is a non-read-only, non-idempotent, non-destructive write. The description adds genuinely non-obvious behavior: the requested scopes are intersected with the caller's, a may_administer key cannot mint another may_administer key, and the secret is revealed exactly once. It stops short of stating the calling permissions or what the audit/response shape looks like.

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?

It is front-loaded with the core action and the constraints follow in descending importance. The clause 'which is what makes revoking one mean something' is rationale rather than mechanism and could be trimmed, but the rest is dense and earns its space.

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

Completeness4/5

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

For a nine-parameter credential-minting mutation with no output schema, the description covers the two things an agent most needs: the scope-intersection ceiling and the fact that the secret is returned once and never again. It could go further on auth prerequisites and the confirm/dry_run pattern, but nothing critical 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 description coverage is 89%, so the schema already carries most parameter meaning and the baseline of 3 applies. The description does add real semantics for 'scopes' (narrowing rather than failing) and frames budget/expiry as optional, but leaves name, product_id, capabilities and expiry units entirely to 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 first sentence gives a specific verb and resource ('Creates a key for one agent') plus the configurable facets (scopes, spend cap, expiry), which is enough to separate it from agent_key_list and agent_key_revoke without opening a schema.

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 only implied: it is obviously the minting step of a key lifecycle, and the description states the scope-inheritance rule that governs what you may ask for. It never says when to prefer this over another path, nor does it surface the prominent dry_run/confirm workflow that the schema itself recommends before mutations.

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.

Resources