Skip to main content
Glama

Create API Token

create_token

Create a new API token with optional scoped permissions and spend caps. The full key is returned only once - save it immediately. A token can only grant scopes it already has (scope attenuation) and spend caps at or below its own. Scopes: domains:read (GET /api/domains, GET /api/domains/{domain}, GET /api/domains/{domain}/dns, /dnssec, /status, /email/check, /auth-code, /transfer-away, /transfer-status, /analytics), domains:write (PUT /api/domains/{domain}/dns, POST/DELETE /api/domains/{domain}/dnssec, POST /connect, POST /verify, PUT /settings, PUT /parking, PUT/DELETE /api/domains/{domain}/for-sale, POST /api/domains/import, POST /import/verify), domains:transfer (POST /api/domains/buy, POST /transfer, POST /renew (involves payment, includes marketplace purchases)), tokens:read (GET /api/tokens), tokens:write (POST /api/tokens, DELETE /api/tokens/{id}), webhooks:read (GET /api/webhooks, GET /api/webhooks/{id}/deliveries), webhooks:write (POST /api/webhooks, PATCH /api/webhooks/{id}, DELETE /api/webhooks/{id}), email:read (GET /api/emails, /api/emails/{address}, /api/emails/{address}/messages, /api/emails/{address}/aliases, /api/email/changes, /api/domains/{domain}/email/status, /api/domains/{domain}/email/deliverability, /api/suppressions), email:write (POST /api/emails, POST /api/emails/{address}/send, POST /api/domains/{domain}/email/setup, aliases + catch-all, POST/DELETE /api/suppressions), email:delete (Permanently delete messages already in Trash. Moving messages to Trash only requires email:write. Grant this scope only to agents allowed to irreversibly erase email content), email:auth_secrets (Read messages classified as authentication mail (OTP / verification codes, password resets, magic links). Without it, email:read still lists them but subject and body come back redacted - so a stolen agent token can't harvest 2FA codes. Grant it only to agents that genuinely need to complete logins), account:read (GET /api/me, GET /api/agents/identity), account:write (DELETE /api/me, POST /api/billing/setup, POST /api/billing/subscribe, POST /api/billing/cancel, POST /api/me/resend-verification, POST/PATCH/DELETE /api/agents/identity), billing:read (GET /api/billing/invoices), search (GET /api/domains/search, /suggest, /whois, /dns-check, GET /api/tlds), deals:read (GET /api/deals, GET /api/deals/{id}), deals:write (POST /api/domains/sell, PATCH /api/deals/{id}), notifications:read (GET /api/notifications, GET /api/notifications/count), backorders:read (GET /api/backorders, GET /api/backorders/{id}), backorders:write (POST /api/backorders, DELETE /api/backorders/{id}). Use ['*'] for full access (default). When minting a token for a sub-agent that can buy, ALWAYS set max_per_tx/max_per_month.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNoHuman-readable label, e.g. 'CI/CD', 'Sub-Agent'. Defaults to 'CLI'
scopesNoPermission scopes for this token. Defaults to parent token's scopes. Use ['*'] for full access
expires_atNoAbsolute expiration date (ISO 8601). Alternative to expires_in
expires_inNoToken lifetime in seconds (min 3600 = 1h, max 31536000 = 1y). Omit for no expiration
max_per_txNoPer-transaction spend cap in USD - any single charge above it is rejected server-side (SPEND_CAP_EXCEEDED)
max_per_monthNoRolling calendar-month spend cap in USD for all paid operations with this token
agent_identity_idNoOptional owned AgentIdentity id. Mail actions made with this token are attributed to that agent

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed1 schema field changed
    • addedInput schema / properties / agent_identity_id
      Added value: +{
      +  "description": "Optional owned AgentIdentity id. Mail actions made with this token are attributed to that agent",
      +  "type": "string"
      +}
  2. Changed2 schema fields changed
    • addedInput schema / properties / max_per_month
      Added value: +{
      +  "description": "Rolling calendar-month spend cap in USD for all paid operations with this token",
      +  "exclusiveMinimum": 0,
      +  "type": "number"
      +}
    • addedInput schema / properties / max_per_tx
      Added value: +{
      +  "description": "Per-transaction spend cap in USD - any single charge above it is rejected server-side (SPEND_CAP_EXCEEDED)",
      +  "exclusiveMinimum": 0,
      +  "type": "number"
      +}
  3. First observed

TDQS

A4.6/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and excels. It discloses critical behavioral traits: the key is returned only once ('save it immediately'), scope attenuation limits what can be granted, and spend caps are enforced server-side. It also details the implications of each scope, including irreversible actions like email:delete and the redaction of auth secrets without email:auth_secrets.

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 description is long due to the exhaustive scope enumeration, but it is well-structured as a scoped list with parenthetical endpoint details and warnings. Key behavioral notes are front-loaded, and the imperative final sentence adds actionable guidance. It earns its length by providing essential reference material for an AI agent, though it could be trimmed by referencing external docs for the full scope list.

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?

Given the complexity of 7 optional parameters and no output schema, the description covers the critical aspects: key delivery, scope restrictions, spend caps, and dangerous permission warnings. It does not explicitly outline the response structure beyond the key, but the warning to save it immediately implies the response contains it. Overall, it is sufficiently complete for an agent to use the tool correctly, with minor gaps around exact response fields.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

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

Although schema coverage is 100% (baseline 3), the description significantly enriches parameter understanding. It expands the scopes parameter with a comprehensive list of valid values and their endpoints, explains the semantics of spend caps, and adds imperative usage guidance for max_per_tx/max_per_month. This goes well beyond the schema's brief descriptions.

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 opens with 'Create a new API token with optional scoped permissions and spend caps,' clearly stating the specific verb (create), resource (API token), and key features. It distinguishes itself from sibling tools like list_tokens and revoke_token by focusing on creation and its associated options.

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 strong contextual guidance, such as 'When minting a token for a sub-agent that can buy, ALWAYS set max_per_tx/max_per_month.' It also explains scope attenuation and warns about dangerous scopes like email:delete. However, it does not explicitly name alternatives or state when-not-to-use, so it falls short of a 5.

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.

TDQS

A3.5/5.0
Disambiguation3/5

While most tools have distinct purposes, several clusters overlap significantly (e.g., check_email, check_email_deliverability, get_email_deliverability, get_domain_email_status; buy_domain, buy_aftermarket, acquire_domain). The descriptions are detailed and help differentiate, but the sheer number of tools makes it challenging for an agent to select the correct one without careful reading.

Naming Consistency3/5

The dominant pattern is verb_noun with underscores (e.g., create_mailbox, list_domains), but there are notable inconsistencies: destructive actions mix delete/remove/cancel/revoke/unsell, and a few names deviate entirely (search, dns_check, domain_status). The pattern is recognizable but not uniformly applied.

Tool Count1/5

With 122 tools, this vastly exceeds the 50+ threshold for extreme mismatch. Even for a comprehensive domain and email platform, the tool count is overwhelming and will likely hinder agent performance through excessive choice and context bloat.

Completeness4/5

The server covers a wide range of domains, DNS, email, marketplace, negotiations, transfers, webhooks, tokens, and billing. Minor gaps exist, such as no update operation for mail rules, no direct domain deletion, and limited mailbox configuration beyond forwarding and credentials, but most lifecycle workflows are supported.