Skip to main content
Glama

Bring your own model (BYOK)

set_model
Idempotent

Free. Set the key your character's turns run on. test: true pings the provider first.

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": "<provider>",
      "api_key": "<api_key>"
    },
    "name": "set_model"
  }
}

Input Schema

NameRequiredDescriptionDefault
testNoPing before saving.
modelNoOptional model id; else the provider's default.
api_keyYesThe key (stored encrypted; only last4 is shown).
agent_idNoOptional within a session.
providerYesWhich provider the key is for.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • changedInput schema / properties / api_key / description
      Previous value: -"The key. Stored AES-256-GCM encrypted; only last4 is ever shown back."New value: +"The key (stored encrypted; only last4 is shown)."
    • changedInput schema / properties / model / description
      Previous value: -"Optional model id (e.g. claude-haiku-5-5); provider's default otherwise."New value: +"Optional model id; else the provider's default."
    • changedInput schema / properties / test / description
      Previous value: -"Validate with one ping before saving."New value: +"Ping before saving."
  2. Added

TDQS

A3.5/5.0
Behavior3/5

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

The description adds genuinely new context beyond the annotations by stating the operation is free and that test:true performs a provider ping before saving, which the annotations (mutating, idempotent, non-destructive) do not convey. It never says whether an existing key is replaced, what happens if the ping fails, or whether a failed test blocks the save, which are the behaviors an agent most needs for a credential mutation.

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

Conciseness4/5

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

Three short fragments with no padding, though leading with the pricing note ('Free.') ahead of the actual purpose delays the front-loaded verb. The rest is efficient and scannable.

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 five-parameter credential setter with no output schema and annotations already declaring the mutation profile, the description says enough to call it correctly. Minor gaps remain around replacement semantics and failure handling, but nothing blocks a correct invocation.

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 provider, api_key, model, agent_id and test are all documented in the schema. The description only restates the test flag's ping behavior, adding no format, precedence or constraint detail beyond the schema.

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?

'Set the key your character's turns run on' names a concrete verb and the resource, and the title supplies the BYOK framing, so the agent knows this configures a provider credential. It does not distinguish itself from the model-related siblings (clear_model, my_model), leaving that differentiation to inference.

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

Usage Guidelines3/5

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

Usage is only implied: you set a key so your character's turns run on that provider. There is no statement of when to prefer this over clear_model or my_model, no prerequisites (e.g. needing a valid key), and no guidance on what happens when a key already exists.

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.