Skip to main content
Glama

SaaS Pro Max

Create api key

create_api_key
Destructive

Mint an ingest key for one environment and return its value exactly once. A public key (spm_pub_) is safe in a browser bundle and may only send events and evaluate flags; a secret key (spm_sec_) is server-only and may additionally send the visitor's IP and user agent. Requires the admin scope and keys.write.

Input Schema

NameRequiredDescriptionDefault
appYesApplication id, or orgSlug/appSlug as returned by list_apps
kindYespublic for browsers, secret for servers
labelYesWhat this key is for, e.g. 'marketing site'
environmentYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already flag destructive and non-idempotent, and the description adds context annotations cannot carry: the secret is shown only once and never again, the required authorization scopes, and the capability difference between public and secret keys (event sending/flag evaluation vs. visitor IP and user agent). That is exactly the information an agent needs before minting a credential.

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?

Two sentences, no filler, with the single-return-value warning placed before the key-type detail so the irreversible consequence is front-loaded.

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?

No output schema exists, and the description covers the return behavior ('return its value exactly once'), the inputs' implications, and the auth requirements. Nothing an agent needs in order to call this correctly is missing.

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 coverage is 75% and the enums are self-documenting, but the description still adds real meaning for 'kind' by explaining the consequence of each value rather than just 'public for browsers, secret for servers'. 'One environment' contextualizes the environment parameter; 'label' is not addressed.

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 and resource ('Mint an ingest key for one environment') plus a distinctive behavioral fact ('return its value exactly once'). It also enumerates the two key kinds with their prefixes, which separates it cleanly from list_api_keys and the rest of the siblings.

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?

Gives clear selection guidance between the two kinds ('public key is safe in a browser bundle', 'secret key is server-only') and states the prerequisites (admin scope and keys.write). It does not explicitly name an alternative tool or say when not to call this, so it stops short of the top score.

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