Skip to main content
Glama
Claude Code × OpenCode

Claude Code × OpenCode

by AXLdev123

Call any OpenCode operation

oc_api

Call any OpenCode API endpoint by operationId or HTTP method and path, filling path parameters from params and sending remaining values as query parameters.

Instructions

Raw access to the whole OpenCode API (worktrees, MCP, credentials, integrations, web search, files, terminals, config…). Give an operationId (see oc_api_ops) or method+path. Path parameters are filled from params, the rest goes to the query string.

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_api"
  }
}

Input Schema

NameRequiredDescriptionDefault
bodyNo
pathNo
methodNo
paramsNoPath and query parameters. Objects are sent as deepObject (e.g. location: {directory: "/my/project"}).
directoryNoShortcut for params.location = {directory}.
operationNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

C2.9/5.0
Behavior2/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, yet it says nothing about permissions, side effects, or that DELETE/PATCH on credentials, config, or worktrees is irreversible. It only explains parameter routing ('path parameters are filled from params, the rest to the query string'), which is mechanics rather than behavioral context.

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

Conciseness4/5

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

Two front-loaded sentences with no filler; the parenthetical domain list earns its place by conveying the breadth of the API surface. Slightly dense but 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?

A six-parameter, mutation-capable passthrough with no annotations and no output schema needs more: the `body` parameter is undocumented and there is no warning about destructive operations or auth requirements. What is present is accurate but insufficient for the tool's risk profile.

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?

Adds real meaning for params by explaining path-vs-query routing and the deepObject encoding, and ties `operation` to oc_api_ops. However, `body` (a listed property) is never mentioned, and with only 33% schema coverage the description leaves that request-body parameter unexplained.

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+resource ('raw access to the whole OpenCode API') and enumerates the covered domains (worktrees, MCP, credentials, files, terminals). It partly differentiates by pointing to oc_api_ops for operationIds, but never explains how it differs from higher-level siblings like oc_send or oc_session.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives invocation mechanics (operationId or method+path) but no when-to-use or when-not-to-use guidance. For a generic escape hatch that duplicates functionality of dedicated sibling tools, the absence of an explicit 'prefer the dedicated tool unless X' rule leaves the agent guessing.

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