Skip to main content
Glama
OpenCode V2 MCP Bridge
by ddarkwing

List OpenCode agents

oc_agents

Lists available OpenCode project agents with their modes and assigned models, returning IDs to pass as the agent argument when running tasks.

Instructions

List agents available in an OpenCode project, including each agent's mode and assigned model. Use the returned id as the agent argument of oc_task.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "oc_agents"
  }
}

Input Schema

NameRequiredDescriptionDefault
directoryNoAbsolute project directory (defaults to the bridge's configured directory)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.8/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full burden. "List" implies a non-mutating read, and the return contents (id, mode, model) are disclosed, but nothing is said about permissions, empty-project behavior, or whether results are scoped to the configured directory. Adequate but thin for an unannotated tool.

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, zero filler: purpose and return shape first, the consuming call second. Nothing could be removed without losing information.

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 one-optional-parameter read tool this covers what it does, what it returns, and how the output is consumed downstream. Without an output schema the field list in prose does useful work; only edge-case behavior (no agents found, directory errors) is left unstated.

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% and the single `directory` parameter is already documented in the schema, including its default. The description adds no further meaning about how directory affects which agents are returned, so baseline 3 applies.

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?

"List agents available in an OpenCode project" names a specific verb and resource, and the clause about mode and assigned model tells the agent what each entry contains. It is clearly distinguishable from oc_task/oc_models by resource, though it never names a sibling explicitly.

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 second sentence gives concrete downstream usage: feed the returned id into oc_task's `agent` argument. That is a real when-to-use signal, but there is no explicit exclusion or statement of when another listing tool (e.g. oc_models) is the better choice.

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