Skip to main content
Glama

create_api_key

Generate a new API key for a Hostkey account or a specific server, setting its name, activity, and login notifications. The key value appears once, so save it immediately.

Instructions

Create a new API key for the account or a specific server (api_keys/add). The key value is shown once in the response — save it.

Input Schema

NameRequiredDescriptionDefault
ipNoIP allowlist, e.g. 10.0.0.2, 10.4.6.3/24
nameYesKey name
activeYestrue — key is active
confirmYesMust be true to run the operation.
server_idNoServer ID; omit for an account-wide key
login_notify_methodYesLogin notifications for this key; use none for per-server keys
login_notify_addressNoEmail or webhook URL for notifications

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv1.0.3
    • changedInput schema / properties / active / description
      Previous value: -"true — ключ активен"New value: +"true — key is active"
    • changedInput schema / properties / ip / description
      Previous value: -"Белый список IP, например 10.0.0.2, 10.4.6.3/24"New value: +"IP allowlist, e.g. 10.0.0.2, 10.4.6.3/24"
    • changedInput schema / properties / login_notify_address / description
      Previous value: -"Email или webhook URL для уведомлений"New value: +"Email or webhook URL for notifications"
    • changedInput schema / properties / login_notify_method / description
      Previous value: -"Уведомления о входах по ключу; для per-server ключа используйте none"New value: +"Login notifications for this key; use none for per-server keys"
    • changedInput schema / properties / name / description
      Previous value: -"Имя ключа"New value: +"Key name"
    • changedInput schema / properties / server_id / description
      Previous value: -"ID сервера; если не указан — ключ на весь аккаунт"New value: +"Server ID; omit for an account-wide key"
  2. First observedv1.0.1

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, destructiveHint=false and openWorldHint=true, so the write/non-destructive profile is covered structurally. The description adds genuinely new behavioral context beyond annotations: the key value is returned only once and must be saved. It does not mention permission requirements or whether the operation is reversible.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two tight sentences with zero filler; the core action is front-loaded and the one critical caveat (save the key) follows immediately. Every clause earns its place.

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?

With no output schema, the description usefully covers the one non-obvious return detail (one-time key value). It is missing only peripheral context such as authentication/permission prerequisites for a mutating tool, but overall it is sufficient to invoke correctly.

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% (7 params, 4 required, enum documented), so the schema already carries parameter meaning and the baseline is 3. The description's scope statement loosely maps to the optional server_id but adds no syntax or formatting detail beyond what the schema provides.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Names a specific verb+resource ('Create a new API key') and adds scope disambiguation ('for the account or a specific server') plus the underlying endpoint (api_keys/add). It does not explicitly contrast with siblings like update_api_key or get_api_key, so it falls short of the top band, but an agent knows exactly what this does.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no explicit when-to-use or when-not-to-use guidance relative to alternatives (update_api_key, list_api_keys, list_server_api_keys). The account-vs-server scope is implied but the agent must infer when this tool is the right choice versus other key-management tools.

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

Deploy Server

Other Tools