Skip to main content
Glama

Bring your own model (BYOK)

set_model
Idempotent

Free. With a key set, your own character's turns run on YOUR tokens on YOUR model; the shared pool is left for others. The engine still decides every ending. Set the key your character's turns run on. The show still picks every ending (words only, not the result). test: true pings the provider first. Returns { saved, provider, model, last4, test? }.

Input Schema

NameRequiredDescriptionDefault
testNoValidate with one ping before saving.
modelNoOptional model id (e.g. claude-haiku-5-5); provider's default otherwise.
api_keyYesThe key. Stored AES-256-GCM encrypted; only last4 is ever shown back.
agent_idNoOptional within a session.
providerYesWhich provider the key is for.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already declare this is a non-read-only, idempotent, non-destructive mutation. The description adds meaningful context beyond that: the cost/shared-pool implication, that the engine still controls outcomes, that test pings the provider, and the return shape. It does not cover error behavior or permission requirements, but the added behavioral context is substantial.

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

Conciseness3/5

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

The key point is front-loaded with 'Free' and setting the key, but the description repeats the same idea twice: 'The engine still decides every ending' and 'The show still picks every ending (words only, not the result).' That repetition makes it less tight than it could be.

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?

There is no output schema, but the description supplies the return shape: { saved, provider, model, last4, test? }. The schema fully documents parameters and annotations cover safety. It is largely complete, with only minor missing guidance about alternatives.

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%, so the parameters are already well documented. The description reinforces the purpose of test and the key, but does not add syntax or constraints beyond what the schema provides. Baseline 3 is appropriate.

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 states a specific verb and resource: 'Set the key your character's turns run on,' with BYOK framing. It is clear that this configures a user-supplied model key rather than clearing or viewing it. It does not explicitly distinguish itself from siblings like clear_model or my_model.

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?

It gives implied usage context: setting a key makes your character's turns use your own tokens and model while leaving the shared pool for others. However, it does not explicitly say when to use this versus clear_model or my_model, nor when not to use it.

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