Skip to main content
Glama

Set the default model and behaviour

opencode_set_model

Set the default model, agent, and permission mode for future opencode tasks. Pass only the fields you want to change; all values persist for subsequent runs.

Instructions

Persists which model, agent and permission mode future opencode tasks use. Every field is optional; only the fields you pass are changed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
agentNoopencode agent, e.g. 'build' or 'plan'.
modelNoModel as 'provider/model', e.g. 'opencode/big-pickle'. An empty string resets to the opencode default.
variantNoReasoning variant, e.g. 'high' or 'max' (provider dependent).
serverUrlNoAttach to an existing opencode server instead of spawning one. Empty string = spawn again.
keepSessionsNoDo not delete the temporary session after a run (debugging).
permissionModeNoauto = may edit files and run commands; readonly = no changes; strict = deny everything.
defaultDirectoryNoDefault working directory for tasks that do not name one.
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses persistence and partial-update semantics ('only the fields you pass are changed'), which is valuable. But it omits return values, reset behavior, or side effects like overwriting existing configuration, leaving some behavioral gaps.

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 exactly two sentences, with the core purpose front-loaded and no redundancy. Every word earns its place, making it highly concise and well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The core purpose and partial-update behavior are clear, and the schema covers all parameters. However, with no output schema and no annotations, the description is minimal: it does not explain return values, reset behavior (beyond the model empty-string hint in schema), or how the persisted settings affect sibling tools. Adequate but with clear gaps.

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?

The input schema already provides 100% coverage with descriptions and examples for all 7 parameters. The description adds the crucial semantic that every field is optional and only provided fields are updated, which clarifies partial updates beyond what the schema states. This is a meaningful addition.

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 uses a specific verb ('persists') and clearly scopes what the tool does: it sets the model, agent, and permission mode for future opencode tasks. This distinguishes it from siblings like opencode_models or opencode_agents, which likely list or query available options.

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?

The description states that the tool affects future tasks, giving implied usage context ('use this to set persistent defaults'). However, it does not mention when not to use it, such as for per-run overrides (e.g., opencode_dispatch), or name any alternatives, so the guidance is limited.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/teodorgross/opencode-mcp-bridge'

If you have feedback or need assistance with the MCP directory API, please join our Discord server