Skip to main content
Glama

opencode

Execute full-stack development tasks using AI agents for rapid prototyping, code generation, and multi-framework project work with file-based collaboration.

Instructions

Run OpenCode CLI agent (full-stack development).

NO SHARED MEMORY:

  • Cannot see messages/outputs from codex/gemini/claude.

  • Only sees: (1) this prompt, (2) files in context_paths, (3) its own history via continuation_id.

CROSS-AGENT HANDOFF:

  • Small data: paste into prompt.

  • Large data: save_file -> context_paths -> prompt says "Read ".

CAPABILITIES:

  • Excellent at rapid prototyping and development tasks

  • Good at working with multiple frameworks and tools

  • Supports multiple AI providers (Anthropic, OpenAI, Google, etc.)

BEST PRACTICES:

  • Specify agent type for specialized tasks (e.g., --agent build)

  • Use file attachments for context-heavy tasks

Supports: file attachments, multiple agents (build, plan, etc.).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
promptYesDetailed instructions for the agent. IMPORTANT: If 'continuation_id' is NOT set, you MUST include ALL context (background, file contents, errors, constraints), as the agent has no memory. If 'continuation_id' IS set, you may be brief and reference previous context.
workspaceYesProject root directory. Boundary for 'workspace-write'. Use absolute paths or relative paths.
continuation_idNoResume session WITHIN THIS TOOL ONLY. Use only the <continuation_id> returned by this same tool. IDs are agent-specific: codex ID won't work with gemini/claude/opencode. Switching agents does NOT sync info; pass updates via prompt or context_paths.
permissionNoSecurity level: 'read-only' (analyze files), 'workspace-write' (modify inside workspace), 'unlimited' (full system access). Default: 'read-only'.read-only
modelNoOptional model override (e.g., 'gemini-2.5-pro'). Use only if specifically requested.
save_fileNoPREFERRED when agent needs to write files or produce lengthy output. Output is written directly to this path, avoiding context overflow. This write is permitted even in read-only mode (server-handled). Essential for: code generation, detailed reports, documentation.
save_file_with_wrapperNoWhen true AND save_file is set, wrap output in <agent-output> XML tags with metadata (agent name, continuation_id). For multi-agent assembly.
save_file_with_append_modeNoWhen true AND save_file is set, append instead of overwrite. For multi-agent collaboration on same document.
report_modeNoGenerate a standalone, document-style report (no chat filler) suitable for sharing.
context_pathsNoList of relevant files/dirs to preload as context hints.
fileNoAbsolute paths to files to attach to the message. Use for: Source code files, configuration files, documentation. Example: ['/path/to/main.py', '/path/to/config.json']
agentNoAgent type to use for the task. Common agents: 'build' (default, general development), 'plan' (planning). Example: 'build'build
task_noteNoREQUIRED user-facing label. Summarize action in < 60 chars (e.g., '[Fix] Auth logic' or '[Read] config.py'). Shown in GUI progress bar to inform user.
debugNoEnable execution stats (tokens, duration) for this call.
Behavior5/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure and does so comprehensively. It details critical behavioral traits: memory limitations ('NO SHARED MEMORY'), what the agent can see, cross-agent handoff procedures, capabilities, best practices, and supported features. This goes well beyond basic functionality to explain how the tool behaves in practice.

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

Conciseness3/5

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

The description is well-structured with clear sections (NO SHARED MEMORY, CROSS-AGENT HANDOFF, etc.), but it's quite lengthy at 12 sentences. While most content is valuable given the tool's complexity, some sentences could be more concise (e.g., the capabilities section lists three bullet points that could be condensed). It's front-loaded with critical information but could be tighter overall.

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?

Given the tool's high complexity (14 parameters, no annotations, no output schema), the description provides substantial context about behavioral characteristics, usage patterns, and limitations. It covers memory constraints, handoff procedures, capabilities, and best practices. The main gap is lack of output format information, but otherwise it's quite complete for helping an agent understand when and how to use this tool.

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%, so the schema already documents all 14 parameters thoroughly. The description doesn't add significant parameter-specific information beyond what's in the schema. It mentions concepts like 'context_paths' and 'file attachments' generally but doesn't explain individual parameters. The baseline of 3 is appropriate when the schema does the heavy lifting.

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 clearly states the tool's purpose: 'Run OpenCode CLI agent (full-stack development).' It specifies the verb ('Run') and resource ('OpenCode CLI agent') with additional context about its domain ('full-stack development'). However, it doesn't explicitly differentiate from sibling tools like 'codex' or 'gemini' beyond mentioning OpenCode supports multiple AI providers.

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

Usage Guidelines5/5

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

The description provides excellent usage guidelines. It explicitly states when to use this tool: 'Excellent at rapid prototyping and development tasks' and 'Good at working with multiple frameworks and tools.' It offers best practices like 'Specify agent type for specialized tasks' and 'Use file attachments for context-heavy tasks.' It also details cross-agent handoff procedures for small vs. large data, giving clear operational guidance.

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/shiharuharu/cli-agent-mcp'

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