Skip to main content
Glama

create_app_api_key

Generate an API key for an app to enable authenticated server-side access. Store the key only on the server and include the X-App-User header for per-user endpoints.

Instructions

Create an API key for an app. SECURITY: the key must live server-side only (env var, Next.js API routes) — never in browser code. If the app has its own users, the server also sends X-App-User: <user id> with the key so per-user endpoints know who is acting.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNoHuman-readable name
appIdYesApp id or slug (from list_apps / create_app)
scopesNoPermissions recorded on the key: ["read"] or ["read","write"]. Omit to match the app: write when any endpoint accepts POST, PATCH or DELETE.
organizationIdNoOrganization id; defaults to the credential organization when omitted

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv0.13.0
    • addedInput schema / properties / appId / description
      Added value: +"App id or slug (from list_apps / create_app)"
    • addedInput schema / properties / name / description
      Added value: +"Human-readable name"
    • addedInput schema / properties / organizationId / description
      Added value: +"Organization id; defaults to the credential organization when omitted"
    • addedInput schema / properties / scopes
      Added value: +{
      +  "description": "Permissions recorded on the key: [\"read\"] or [\"read\",\"write\"]. Omit to match the app: write when any endpoint accepts POST, PATCH or DELETE.",
      +  "items": {
      +    "enum": [
      +      "read",
      +      "write"
      +    ],
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
  2. First observedv0.7.0

TDQS

A4.2/5.0
Behavior4/5

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

Beyond the annotations (readOnlyHint=false, destructiveHint=false), the description discloses expected behavior (server-side key usage) and a conditional behavior (X-App-User header for apps with their own users). This adds meaningful operational detail not covered by annotations.

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 concise and well-structured: a single-purpose statement followed by two brief security/usage notes. No redundant or extraneous content.

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 simple creation tool, the description provides adequate context including security and conditional header usage. It does not mention the return value (e.g., the API key itself), but since there is no output schema and the purpose is clear, this is not a critical omission.

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?

The input schema already describes all four parameters with 100% coverage. The tool description adds no significant parameter-specific detail; it focuses on usage and security, so it does not enrich parameter semantics beyond what the schema provides.

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 clearly states the action ('Create an API key') and the resource ('for an app'), with no ambiguity. It also includes a security note that differentiates it from other app-related tools like create_app or create_app_endpoint.

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 provides clear usage context by explaining secure server-side storage and the conditional X-App-User header behavior. It does not explicitly mention when to choose this tool over sibling alternatives, but the purpose is self-explanatory enough that alternatives are not necessary.

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