Skip to main content
Glama
Dheerax

opencode-mcp-bridge

by Dheerax

opencode_set_model

Change the AI model used by an active or idle OpenCode session. Specify a new model to apply it to subsequent prompts, optionally targeting a specific session instead of the default active one.

Instructions

Dynamically switches the AI model on an active or idle session for subsequent prompts.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelYesNew model to use (e.g. 'google/antigravity-gemini-3.1-pro', 'opencode/deepseek-v4-flash-free', etc.).
session_idNoSession ID (defaults to active session).
Behavior3/5

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

No annotations are provided, so the description carries the behavioral disclosure burden. 'Dynamically switches... for subsequent prompts' conveys that changes apply going forward (not retroactively) and can apply to idle sessions. However, it doesn't disclose whether the change is persisted across restarts, requires authorization, or affects the session's existing state/context.

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 a single, efficient sentence with zero waste. It conveys purpose, target context, and scope in about 15 words. This is appropriately concise and front-loaded with the key verb and resource.

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 simple 2-parameter tool with 100% schema coverage and no output schema, the description is fairly complete. It could benefit from noting what happens to the current session context or what response to expect, but given the tool's simplicity and thorough schema, the description covers the essentials well.

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%, with both parameters (model, session_id) documented in the schema. The description itself doesn't add parameter-level detail beyond the schema, so the baseline of 3 applies. The schema already provides examples of valid model values which is helpful.

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 uses a specific verb ('switches') with a clear resource ('the AI model') and scopes it to a session ('active or idle') for subsequent prompts. It clearly states what the tool does. However, it doesn't explicitly distinguish it from siblings like opencode_switch or opencode_mode, which might also relate to session/model changes.

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 clear context that it applies to 'an active or idle session for subsequent prompts', implying it should be used when you want to change the model without restarting. The session_id param description notes 'defaults to active session', providing some usage context. However, it doesn't explicitly state when NOT to use it or name alternatives from the sibling list.

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/Dheerax/opencode_mcp'

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