Skip to main content
Glama

Create a read-only API key

create_api_key

Generate a read-only API key so a website can read a project's published content. The key is returned once, so store it immediately.

Instructions

Mints the credential a website reads this project with. IMPORTANT: the response carries the whole key exactly once. Show it to the person and tell them to put it in their environment — it cannot be retrieved afterwards. The key is read-only and returns published content only, so it is safe in a server environment; it is NOT safe in browser code unless the project has an allowed-origins list configured. Prefer this over handing a site the agent token, which can write and delete. Requires the apikey.write grant.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesWhat this key is for, so a list of them is readable a year later.
projectIdYesThe project id, as `prj_...`.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.6

TDQS

A4.7/5.0
Behavior5/5

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

Goes well beyond the annotations (readOnlyHint=false, destructiveHint=false) by disclosing that the full key is returned exactly once and cannot be retrieved afterwards, that it is read-only with published-content-only access, the browser-exposure caveat, and the required apikey.write grant. This is exactly the kind of one-time-secret and auth context an agent must surface.

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?

Purpose is front-loaded in the first clause, followed by the one-time-secret warning, the safety scoping, the alternative, and the grant requirement. Every sentence carries operational information; nothing is filler.

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?

With no output schema, the description correctly compensates by explaining the return value (the full key, shown once). Combined with the permission requirement and safety constraints, an agent has everything needed to call this correctly and instruct the user.

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% and only two parameters exist, both documented in-schema (projectId as `prj_...`, name as a human-readable purpose label). The description adds no parameter-level syntax or format detail, so the 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?

States a specific verb and resource with scope: 'Mints the credential a website reads this project with', then narrows it to a read-only key returning published content only. This clearly distinguishes it from siblings like list_api_keys and from the agent token mentioned in the description.

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

Usage Guidelines5/5

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

Gives explicit routing guidance: prefer this over handing a site the agent token (which can write and delete), safe in a server environment, and NOT safe in browser code unless an allowed-origins list is configured. The when-to-use condition and the alternative are both named.

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