Skip to main content
Glama

Create API key for a workspace

create_workspace_api_key

Mints a new API key bound to a workspace the calling key already owns: its own workspace, or one of its sub-workspaces when called with the main workspace's key. This is how a workspace whose key was lost gets a new one without a UI step. fullKey is returned exactly ONCE and cannot be retrieved again, so hand it to the user straight away. The new key authorizes the named workspace only and never outlives the calling key. Keys can be revoked in the app under API & MCP.

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": {
      "id": "<id>"
    },
    "name": "create_workspace_api_key"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesThe numeric workspace ID (from list_workspaces)
nameNoName shown in the app's API key list. Defaults to "<workspace name> key"
readOnlyNoMint a read-only key. It can use the read (list and get) tools plus confirm_connection, get_audience_size and search_lead_finder, so it can read, size audiences and browse Lead Finder (which still uses the account's daily browsing allowance), but it cannot spend credits or change anything else. Defaults to false, a read & write key

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  2. Changed1 schema field changed
    • changedInput schema / properties / readOnly / description
      Previous value: -"Mint a read-only key (list/get tools plus get_audience_size, nothing else). Defaults to false, a read & write key"New value: +"Mint a read-only key. It can use the read (list and get) tools plus confirm_connection, get_audience_size and search_lead_finder, so it can read, size audiences and browse Lead Finder (which still uses the account's daily browsing allowance), but it cannot spend credits or change anything else. Defaults to false, a read & write key"
  3. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Annotations only declare the safety profile (readOnlyHint=false, destructiveHint=false, idempotentHint=false, openWorldHint=false); the description adds genuinely new behavior: fullKey is returned exactly once and is unrecoverable, the new key is scoped to the named workspace only, it never outlives the calling key, and revocation happens in the app under API & MCP. The one-time-secret warning is exactly the operational context an agent needs before invoking.

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?

Front-loaded with the action and its ownership constraint, then the one-time key warning, then scope and revocation. Every sentence carries operational content, though the density is high and the revocation note is the least essential line.

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?

For a three-parameter mutation with no output schema, the description covers the critical return-value contract (fullKey shown once, hand it to the user immediately), the lifetime and scope of the minted credential, and the recovery use case. 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.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with id, name, and readOnly each documented in detail, including readOnly's allowed tool set and credit implications. The description adds no parameter-level meaning beyond that, so the schema does the heavy lifting and a baseline 3 applies.

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?

"Mints a new API key bound to a workspace" gives a specific verb and resource, and the following clause scopes it to workspaces the calling key already owns (its own or a sub-workspace). That scope statement is what separates it from sibling creation tools such as create_workspace, which the agent can rule out without opening either schema.

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?

It states the operative condition (calling key must own the target workspace, including sub-workspace access via the main workspace key) and a concrete motivating scenario: recovering a workspace whose key was lost without a UI step. It does not name an alternative tool to use instead when the ownership precondition fails, so it stops short of explicit when-not/alternative routing.

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