Skip to main content
Glama

Create a domain API client

create_domain_client
Destructive

Creates an API client on a domain. The reply's clientSecret is shown EXACTLY ONCE — surface it to the user immediately — with the token URL and a ready-to-run curl.

Instructions

Creates an API client on a domain. The reply's clientSecret is shown EXACTLY ONCE — surface it to the user immediately — with the token URL and a ready-to-run curl. A caller then POSTs grant_type=client_credentials to that URL and sends the token as Authorization: Bearer to an endpoint whose authMode is jwt or apiKeyOrJwt (update_endpoint). Requires confirm=true — call WITHOUT confirm first to preview.

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": {
      "domainId": "<domainId>"
    },
    "name": "create_domain_client"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameNoWhat the client is, e.g. "Billing worker".
scopesNoSpace-separated scopes it may be granted, e.g. "orders:read orders:write".
confirmNoMust be true to act. Omit/false returns a preview only.
domainIdYesThe domain's id — from list_domains.
rateLimitPerMinuteNoIts own gateway allowance in requests per minute (1-6000). Every client of a site calls as the site's owner and shares one platform limit, so this keeps one of them from spending the others' share; past it the client gets 429 CLIENT_RATE_LIMIT for the rest of the minute. Omit for none.
tokenLifetimeMinutesNoHow long its tokens last. Omit for the default.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.53.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only declare destructiveHint=true, and the description adds substantial context beyond that: the clientSecret is shown exactly once and must be surfaced immediately, a preview mode exists when confirm is omitted, and rate-limit overages return 429 CLIENT_RATE_LIMIT for the remainder of the minute. This is exactly the behavioral detail an agent needs before invoking a mutating tool.

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-loads the core action and the one-time secret warning, then the follow-up auth flow and the confirm requirement. Dense but every clause carries operational information; the middle sentence is long but not padded.

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?

No output schema exists, yet the description covers the return values that matter (clientSecret shown once, token URL, ready-to-run curl) and the full post-creation auth flow. For a six-parameter mutating tool, nothing essential is missing.

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 100%, so the baseline is 3, but the description adds meaning beyond the schema by explaining the confirm preview semantics and the end-to-end use of the returned token URL and scopes. It does not elaborate on tokenLifetimeMinutes or name beyond what the schema already says.

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 ("Creates an API client on a domain") and implicitly separates itself from siblings like create_domain_api_key and create_domain_client by naming the domain-scoped client artifact. An agent can identify the operation without opening the 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?

Gives a concrete workflow: call without confirm first to preview, then call with confirm=true to act, then POST grant_type=client_credentials to the token URL and use Bearer auth on endpoints whose authMode is jwt or apiKeyOrJwt (pointing to update_endpoint). It does not explicitly contrast with create_domain_api_key or list_domain_clients, so it stops short of full alternative routing.

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