Skip to main content
Glama

create_api_key

Create a new posterly API key for the authenticated user. SECRET-CREATING WRITE: only use after explicit user confirmation. The new key can only request scopes already present on the calling dashboard-created API key; OAuth and managed assistant tokens cannot mint keys. Team management (members:read, members:write) and client portal sign-in link permissions are never copied or granted here: a person turns them on in /dashboard/api. Optional workspace_client_id limits the new key to one brand in the workspace. Omit it for a workspace-wide key. A key that is already limited to one brand cannot create keys.

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": {
      "confirm": "<confirm>"
    },
    "name": "create_api_key"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameNoHuman-readable key name.
scopesNoScopes for the new key. Omit to copy the calling key scopes. Cannot exceed the calling key scopes. billing:read and billing:write allow managing the posterly subscription (cancel/pause/resume/downgrade).
confirmYesMust be true after the user explicitly confirms that a new secret API key should be created.
workspace_idNoOptional workspace restriction. Workspace-scoped calling keys cannot create keys outside their workspace.
expires_in_daysNoOptional expiry from now, up to 365 days. Never later than the calling key: omitted, the new key inherits the calling key's expiry (none if the calling key does not expire).
workspace_client_idNoOptional brand (workspace client id) in that workspace. Omit for a key that can see every brand. A key limited to one brand cannot create keys.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / expires_in_days / description
      Previous value: -"Optional expiry from now, up to 365 days. Omit for no expiry."New value: +"Optional expiry from now, up to 365 days. Never later than the calling key: omitted, the new key inherits the calling key's expiry (none if the calling key does not expire)."
  2. Changed1 schema field changed
    • addedInput schema / properties / workspace_client_id
      Added value: +{
      +  "description": "Optional brand (workspace client id) in that workspace. Omit for a key that can see every brand. A key limited to one brand cannot create keys.",
      +  "type": "string"
      +}
  3. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Annotations only say readOnly=false and non-idempotent; the description adds far more: it is a secret-creating write requiring confirmation, the new key's scopes are capped by the calling key's scopes, brand-limited keys cannot mint keys, and certain permissions are never copied. These are exactly the behavioral constraints an agent cannot infer from structured fields.

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 critical warning and confirmation requirement are front-loaded, which is the right structure for a secret-creating write. It is dense but mostly earns its space, though the workspace_client_id restriction is repeated from the schema and could be trimmed.

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 mutation tool with no output schema, the description covers preconditions, permission inheritance, and scoping limits well. The one gap is that it never states that the response contains the one-time secret value the caller must surface, which is material for this class of tool.

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 coverage is 100%, so name, scopes, confirm, workspace_id, expires_in_days, and workspace_client_id are already documented in the schema. The description restates the workspace_client_id brand restriction and the brand-limited-key caveat rather than expanding on parameter syntax. Baseline 3 applies, with marginal added value around brand scoping.

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 ('Create a new posterly API key') and scopes it to 'the authenticated user'. It is clearly distinguishable from the sibling delete_api_key, list_oauth_clients, and manage_oauth_client 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?

Gives an explicit precondition ('only use after explicit user confirmation'), names the caller classes that cannot use it (OAuth and managed assistant tokens), and directs the agent to /dashboard/api for team-management and client-portal permissions. It also states the rule for omitting workspace_client_id versus restricting to one brand.

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