Skip to main content
Glama

CreateApiKey

Create an API key for an organization. The response contains the new key's value in token. It is a live credential, so give it to the user to store in a secret manager, and do not repeat it, log it, or pass it to another tool. Which key types you can create depends on how you authenticate. With the GraphOS sign-in (OAuth), you can create OPERATOR, SCIM, and GATEWAY keys. SUBGRAPH and VARIANT keys need a personal API key in the x-api-key header. With an operator key in x-api-key, you can create only GATEWAY keys, and a graph key can create none. No credential can create ROUTER keys. OPERATOR, SCIM, and GATEWAY keys also require the Org Admin role. GATEWAY keys are used by Apollo Gateway instances. Choose the narrowest type that does the job, and confirm the type and its resources with the user before you call this tool. Provide the organization ID, the key name, and the type. For a SUBGRAPH key, list each graphId, variantName, and subgraphName in resources.subgraphs. For a VARIANT key, list each graphId and variantName in resources.variants.

Input Schema

NameRequiredDescriptionDefault
nameYes
typeYes
resourcesNo
organizationIdYes

Output Schema

NameRequiredDescriptionDefault
dataNo
errorsNo
extensionsNo

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?

Beyond the annotations (readOnlyHint=false, destructiveHint=false) it discloses the critical behavior that the response carries a live credential in `token` and instructs not to repeat, log, or pass it to another tool. It also layers in auth-mode constraints and role requirements, which annotations cannot express.

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?

The purpose and the credential-handling warning are front-loaded, and nearly every sentence adds decision-relevant information (credential hygiene, type/auth matrix, role requirement, resource layout). It is long but dense; some of the auth matrix could be tightened into a list without loss.

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?

An output schema exists and the description still usefully flags the `token` field's sensitivity. Auth, role, resource-identification, and confirmation-before-calling requirements are all covered; the notable omission is gateway resource parameters.

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 reported as 0%, so the description carries the burden and largely does: it names organizationId, name, and type as required, and spells out the exact resource shapes for SUBGRAPH keys (graphId, variantName, subgraphName) and VARIANT keys (graphId, variantName). It never mentions `resources.gateways` / GatewayIdentifierInput, so gateway key resource wiring remains undocumented.

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?

"Create an API key for an organization" gives a specific verb plus resource, and the surrounding text makes clear it is the creation member of the GetApiKeys / RenameApiKey / DeleteApiKey family. An agent can select it without opening any schema.

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

Usage Guidelines5/5

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

It states exactly which key types each authentication mode permits (OAuth → OPERATOR/SCIM/GATEWAY; personal API key → SUBGRAPH/VARIANT; operator key → GATEWAY only; graph key → none; nothing → ROUTER) and who needs Org Admin. It also gives prescriptive guidance: pick the narrowest type and confirm type plus resources with the user before calling.

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