Skip to main content
Glama

Replace an AI provider's key

colliedesk_ai_provider_key_set

Replace a provider's key. The key is checked with one small billed request to the first model and saved only when it works; it is sealed on the server and never shown again. It passes through this conversation, so use a key you can revoke at the provider. When the check fails nothing changes and the old key keeps working.

Needs: ai_settings:manage_credentials.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "provider_id": "<provider_id>",
      "api_key": "<api_key>"
    },
    "name": "colliedesk_ai_provider_key_set"
  }
}

Input Schema

NameRequiredDescriptionDefault
api_keyYes
provider_idYesFrom colliedesk_ai_settings_get.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedOutput schema / description
      Added value: +"Same shape as colliedesk_ai_provider_add's output."
    • removedOutput schema / properties
      Removed value: -{
      -  "provider": {
      -    "properties": {
      -      "auth_kind": {
      -        "enum": [
      -          "api_key",
      -          "none"
      -        ],
      -        "type": "string"
      -      },
      -      "base_url": {
      -        "type": [
      -          "string",
      -          "null"
      -        ]
      -      },
      -      "check_error_code": {
      -        "type": [
      -          "string",
      -          "null"
      -        ]
      -      },
      -      "check_status": {
      -        "enum": [
      -          "ok",
      -          "failing"
      -        ],
      -        "type": "string"
      -      },
      -      "checked_at": {
      -        "type": "string"
      -      },
      -      "created_at": {
      -        "type": "string"
      -      },
      -      "created_by": {
      -        "type": [
      -          "string",
      -          "null"
      -        ]
      -      },
      -      "id": {
      -        "type": "string"
      -      },
      -      "key_hint": {
      -        "description": "The key's last four characters; the key is never shown.",
      -        "type": [
      -          "string",
      -          "null"
      -        ]
      -      },
      -      "kind": {
      -        "enum": [
      -          "anthropic",
      -          "openai_compatible"
      -        ],
      -        "type": "string"
      -      },
      -      "label": {
      -        "type": "string"
      -      },
      -      "models": {
      -        "description": "The first is the one a check uses.",
      -        "items": {
      -          "type": "string"
      -        },
      -        "type": "array"
      -      },
      -      "routing": {
      -        "anyOf": [
      -          {
      -            "additionalProperties": false,
      -            "properties": {
      -              "data_collection": {
      -                "description": "deny: only providers that do not store or train on what they are sent.",
      -                "enum": [
      -                  "allow",
      -                  "deny"
      -                ],
      -                "type": "string"
      -              },
      -              "zdr": {
      -                "description": "true: only providers with zero data retention.",
      -                "type": "boolean"
      -              }
      -            },
      -            "required": [
      -              "data_collection",
      -              "zdr"
      -            ],
      -            "type": "object"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "description": "OpenRouter's routing by data policy; null on another server."
      -      },
      -      "updated_at": {
      -        "type": "string"
      -      },
      -      "used_by": {
      -        "items": {
      -          "enum": [
      -            "triage",
      -            "draft",
      -            "chat",
      -            "intake"
      -          ],
      -          "type": "string"
      -        },
      -        "type": "array"
      -      }
      -    },
      -    "required": [
      -      "id",
      -      "kind",
      -      "label",
      -      "models",
      -      "check_status",
      -      "used_by"
      -    ],
      -    "type": "object"
      -  }
      -}
    • removedOutput schema / required
      Removed value: -[
      -  "provider"
      -]
  2. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Beyond the annotations, the description discloses the cost model (one small billed request to the first model), the atomicity guarantee (saved only when the check works; on failure nothing changes), the storage behavior (sealed server-side, never shown again), and the required permission ai_settings:manage_credentials. This is exactly the context annotations cannot carry, and it is consistent with readOnlyHint=false and destructiveHint=false.

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 core action is front-loaded in the first clause, followed by consequences and then a clearly separated "Needs:" permission line. Every sentence carries distinct information — cost, atomicity, secrecy, revocation advice — with no restatement of the name or schema.

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?

For a two-parameter mutation with an output schema already defined, the description covers the gaps that matter: authorization requirement, side-effect cost, failure semantics, and key visibility after the call. An agent has everything needed to call it correctly and to warn the user about the billed request.

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

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is only 50%: provider_id is documented in the schema as coming from colliedesk_ai_settings_get, while api_key has no schema description. The description compensates by explaining that api_key is sent through the conversation, sealed on write, never re-displayed, and should be revocable — meaningful semantics beyond the bare string constraint.

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?

"Replace a provider's key" states a specific verb and resource, and the follow-up sentences make clear this is the credential-replacement operation rather than provider creation or validation. It does not explicitly distinguish itself from siblings like colliedesk_ai_provider_update or colliedesk_ai_provider_add, so an agent must infer that boundary, but the operation itself is unambiguous.

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 gives real operational context for when this applies: the key is validated by a billed request and should be revocable because it transits the conversation. It also states the failure outcome (nothing changes, old key keeps working), which informs when it is safe to call. It stops short of naming an explicit alternative tool for adding a provider versus replacing its key.

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.

Resources