Skip to main content
Glama

Mint a dfm_ API key

create_api_key

Mint a dfm_ API key for the agent owner via SIWS login to grant scoped, read-only API access; the key is saved locally and never exposed in chat.

Instructions

Mint a dfm_ API key for this agent's owner (SIWS session only). READ-ONLY: write keys and write caps are refused unless the operator set DFM_ALLOW_WRITE_KEY_MINT=1. Expires in 30 days by default (max 90). The key is written to ~/.config/dfm/api-keys/-.key (0600) and NEVER returned to the chat; only its prefix and path are. Optional last step of: create_identity_wallet → SIWS login (automatic) → set_profile {displayName} (avatar: operator image or a generated default) → create_app_wallet → app_wallet_fund {usdc, sol} → create_api_key (optional).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
readOnlyNodefault true
expiresAtNoISO-8601, in the future
allowedOpsNo
allowedProgramsNo
dailyNotionalUsdcNo
perOpNotionalUsdcNo
destinationWhitelistNo
allowArbitraryProgramsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.1967

TDQS

A4.3/5.0
Behavior5/5

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

Goes well beyond the annotations: default 30-day expiry with 90-day max, the operator override flag DFM_ALLOW_WRITE_KEY_MINT=1, the file path and 0600 permissions, and the critical fact that the key value is NEVER returned to chat (only prefix and path). This is exactly the behavioral context 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?

Front-loads the action and its safety constraint in the first two sentences. The trailing pipeline chain is long but earns its place by orienting the caller within the onboarding sequence. Dense but not wasteful.

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 9-param mutation tool with no output schema, the description is unusually complete, covering auth requirements, lifetime, storage, and the fact that it returns only a prefix and path. Minor gap: several numeric/whitelist parameters remain undocumented.

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 only 22%, so the description should carry more of the burden. It clarifies readOnly (default true via "READ-ONLY") and expiresAt (30 default / 90 max), but leaves name, dailyNotionalUsdc, perOpNotionalUsdc, destinationWhitelist, and allowArbitraryPrograms unexplained. Partial compensation only.

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 ("Mint") and resource (a dfm_ API key) and scopes it to "this agent's owner". It is immediately distinguishable from siblings like create_app_wallet or set_profile, which are named in the pipeline context.

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 strong context: "SIWS session only" prerequisite, and the explicit chain showing it is the "Optional last step of" the onboarding flow. It does not name a competing alternative or a when-not condition, so it falls just 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.