Skip to main content
Glama

Set LLM key

set_llm_key
Idempotent

Set (or clear, with key=null) the LLM provider API key an instance uses to answer. Required before a freshly created instance can actually respond.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesInstance (agent) id, as returned by create_instance or list_instances.
keyYesThe provider API key. Stored encrypted, never echoed back.
modelNoModel id to use with this provider (e.g. gpt-4o-mini). Optional; the engine defaults if omitted.
providerYesLLM provider id, e.g. openai, anthropic, deepseek.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesInstance (agent) id.
nameYesDisplay name.
tierYesHosting plan id.
a2aUrlYesA2A JSON-RPC endpoint for the instance, or null if A2A is not enabled.
domainYesCustomer-owned domain serving the instance, or null.
engineYesRuntime engine id (e.g. hermes).
statusYesLifecycle status (e.g. running, stopped).
createdAtYesISO timestamp when the instance was created.
endpointUrlYesPublic HTTPS endpoint for the instance, or null if not yet assigned.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / properties / id / description
      Added value: +"Instance (agent) id, as returned by create_instance or list_instances."
    • addedInput schema / properties / model / description
      Added value: +"Model id to use with this provider (e.g. gpt-4o-mini). Optional; the engine defaults if omitted."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "a2aUrl": {
      +      "description": "A2A JSON-RPC endpoint for the instance, or null if A2A is not enabled.",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "createdAt": {
      +      "description": "ISO timestamp when the instance was created.",
      +      "type": "string"
      +    },
      +    "domain": {
      +      "description": "Customer-owned domain serving the instance, or null.",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "endpointUrl": {
      +      "description": "Public HTTPS endpoint for the instance, or null if not yet assigned.",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "engine": {
      +      "description": "Runtime engine id (e.g. hermes).",
      +      "type": "string"
      +    },
      +    "id": {
      +      "description": "Instance (agent) id.",
      +      "type": "string"
      +    },
      +    "name": {
      +      "description": "Display name.",
      +      "type": "string"
      +    },
      +    "status": {
      +      "description": "Lifecycle status (e.g. running, stopped).",
      +      "type": "string"
      +    },
      +    "tier": {
      +      "description": "Hosting plan id.",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "id",
      +    "name",
      +    "engine",
      +    "tier",
      +    "status",
      +    "endpointUrl",
      +    "a2aUrl",
      +    "domain",
      +    "createdAt"
      +  ],
      +  "type": "object"
      +}
  2. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Beyond the openWorld and idempotent hints, the description explains that passing key=null clears the key and that this setup is a prerequisite for responses. No destructive side effects are hidden and nothing contradicts the annotations.

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 short sentences front-load the core behavior and add the key prerequisite. There is no filler or 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?

With a fully documented schema, an output schema, and annotations, the description covers the central purpose and timing. It would be more complete if the clearing behavior were expressed in a way consistent with the schema, but nothing essential is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/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 only parameter-level behavior the description adds—'clear, with key=null'—contradicts the schema, where key is required, type string, and minLength 1. The guidance is therefore unreliable and could lead to an invalid call.

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?

The description names a precise verb and resource: 'Set (or clear...) the LLM provider API key an instance uses to answer.' It is clearly distinct from the sibling instance-management tools, but it does not explicitly name or contrast any sibling, so it stops short of a 5.

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?

'Required before a freshly created instance can actually respond' gives the agent a concrete trigger for using this tool: after creation and before the instance is expected to answer. It does not spell out alternatives or when-not conditions, but the context is clear.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.