Skip to main content
Glama

Add an API key

add_byok_key

Add a BYOK API key for supported providers and validate it instantly, with the key encrypted in storage and failed keys quarantined.

Instructions

Add and immediately validate a BYOK API key for anthropic | openai | firecrawl | browserbase | cursor. The raw key is stored encrypted in Supabase Vault and never returned; failed probes remain quarantined. Optional baseUrl is accepted only for allow-listed OpenAI-compatible HTTPS providers. Write; NOT idempotent.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYesThe API key value to add
labelNoHuman-readable label for this key
baseUrlNoAllow-listed OpenAI-compatible HTTPS base URL
priorityNoPriority for ordering (lower = higher priority)
providerYesProvider slug
projectIdYesProject id (`project_id` is accepted too.)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.1.12
    • changedInput schema / properties / projectId / description
      Previous value: -"Project id"New value: +"Project id (`project_id` is accepted too.)"
  2. Changed1 schema field changedv0.1.10
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  3. Addedv0.1.8
  4. Removedv0.1.2
  5. First observedv0.1.0

TDQS

A4.4/5.0
Behavior5/5

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

The description adds significant behavioral detail beyond annotations: the key is stored encrypted in Supabase Vault and never returned, failed probes remain quarantined, and baseUrl is accepted only for allow-listed OpenAI-compatible HTTPS providers. These are not present in the annotations and give the agent critical knowledge about side effects and constraints.

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?

The description is three sentences with no filler. The primary action is front-loaded ('Add and immediately validate'), followed by critical storage/security details and a non-idempotency warning. Each sentence provides necessary information without redundancy.

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 mutation tool with no output schema, the description covers storage, validation, quarantine behavior, and baseUrl constraints. It doesn't explain what the response contains, but that is arguably not needed for an add operation. It might benefit from mentioning prerequisites like projectId existence, but the core calling context is well covered.

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 100%, so the schema already describes all six parameters. The description adds marginal extra meaning by clarifying the baseUrl restriction ('only for allow-listed OpenAI-compatible HTTPS providers'), which slightly reinforces the schema's phrasing. It does not meaningfully explain label, priority, or projectId beyond what the schema does, so a baseline 3 is appropriate.

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 starts with a specific verb and resource: 'Add and immediately validate a BYOK API key', followed by the exact list of supported providers (anthropic, openai, firecrawl, browserbase, cursor). This clearly distinguishes it from sibling tools like test_byok_key (which tests existing keys) and remove_byok_key (which deletes them).

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 implies when to use this tool (adding a new BYOK key with immediate validation) but does not explicitly name alternatives or when-not-to-use conditions. It provides clear context by mentioning the immediate validation step, which indirectly suggests test_byok_key for testing without adding, but lacks an explicit routing statement.

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