Skip to main content
Glama
3230390742

local-agent-mcp

by 3230390742

Run OpenCode CLI

opencode_run

Run a locally installed CLI non-interactively in a sandboxed working directory. Supports auto-approve, session continuation, and agent/model selection.

Instructions

Run the locally installed, logged-in OpenCode CLI non-interactively in a sandboxed working directory. auto_approve enables side-effecting actions and requires server-side write permission. Supports session continuation and agent/model selection.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cwdYesAbsolute path to an allowed working directory.
agentNoNamed OpenCode agent.
modelNoprovider/model override.
promptYesInstructions for OpenCode.
session_idNoExisting session id (ses_...) to continue.
output_modeNofinal summary or full raw events.final
auto_approveNoAuto-approve actions (write). Requires AGENT_ALLOW_WRITE.
timeout_secondsNoTimeout in seconds (10-3600).
Behavior4/5

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

No annotations are provided, so the description carries full burden. It discloses sandboxed directory, non-interactive execution, side-effecting actions with auto_approve, and session continuation. However, it omits details like idempotency or error handling, which would be useful for risky operations.

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, no redundancy. The main action is front-loaded, followed by essential details. Every word earns its place.

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?

With 8 parameters (2 required) and no output schema, the description covers the core behavioral contracts and parameter meanings. It could mention what the tool returns (e.g., output of CLI) but is otherwise adequate for invocation.

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 100%, but the description adds value beyond schema by explaining that auto_approve enables side effects and requires server-side permission. It also contextualizes session_id as 'session continuation'. This reduces ambiguity for the agent.

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 specific verb-resource pairing ('Run the ... OpenCode CLI') with context ('non-interactively in a sandboxed working directory'). It clearly differentiates from siblings like 'agent_health' (health check) and 'codex_run' (likely another CLI runner) by specifying the exact CLI and mode.

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 explains when to use auto_approve and mentions session continuation, but does not explicitly state when to prefer this tool over siblings or when not to use it. Still, the context is clear for an experienced user.

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/3230390742/local-agent-mcp'

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