Skip to main content
Glama

opencode_tool

Lists available OpenCode tool IDs or returns tools with JSON schemas for a chosen provider and model, so you can discover which tools an agent can use.

Instructions

Discover available tools in OpenCode. Actions: ids (list all tool IDs), list (get tools with JSON schema for a specific provider/model).

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": {
      "action": "<action>"
    },
    "name": "opencode_tool"
  }
}

Input Schema

NameRequiredDescriptionDefault
modelNoModel ID (required for list)
actionYes
providerNoProvider ID (required for list)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description carries the full disclosure burden. It usefully describes what each action returns (all tool IDs vs. tools with JSON schema), implying a read-only discovery operation, but does not state side effects, permissions, or pagination/size limits on the returned list.

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?

Two sentences, front-loaded with the primary purpose followed by action breakdowns. No wasted wording and the action semantics are compactly enumerated.

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?

No output schema exists, so the description must explain return values; it does so briefly (IDs, JSON schema). For a discovery tool this is adequate but leaves gaps on result shape, provider/model selection context, and relationship to sibling discovery tools.

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 67%, and the action enum itself has no schema description; the description compensates by explaining both 'ids' and 'list' action semantics and the provider/model requirement for 'list'. This adds real meaning beyond the schema for the central enum parameter.

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?

States a specific verb 'Discover' and resource 'tools in OpenCode', and distinguishes the two modes (ids vs list with JSON schema). Clear enough to tell apart from siblings like opencode_mcp_server, but it does not explicitly say how it differs from related discovery tools.

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 implies the conditions for each action (ids for bare IDs, list for full JSON schema per provider/model), which guides selection between the two modes. However, it offers no when-to-use guidance relative to sibling tools or exclusions.

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