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.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed15 schema fields changedv1.0.0
    • addedInput schema / properties / context_paths
      Added value: +{
      +  "default": [],
      +  "description": "List of relevant files/dirs to preload as context hints.",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • addedInput schema / properties / continuation_id
      Added value: +{
      +  "default": "",
      +  "description": "Resume 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.",
      +  "type": "string"
      +}
    • changedInput schema / properties / debug / description
      Previous value: -"Override global debug setting for this call. When true, response includes execution stats (model, duration, tokens). When omitted, uses global CAM_DEBUG setting."New value: +"Enable execution stats (tokens, duration) for this call."
    • removedInput schema / properties / full_output
      Removed value: -{
      -  "default": false,
      -  "description": "Return detailed output including reasoning and tool calls. Recommended for Gemini research/analysis tasks. Default: false (concise output)",
      -  "type": "boolean"
      -}
    • changedInput schema / properties / model / description
      Previous value: -"Model override. Only specify if user explicitly requests a specific model."New value: +"Optional model override (e.g., 'gemini-2.5-pro'). Use only if specifically requested."
    • changedInput schema / properties / permission / description
      Previous value: -"File system permission level:\n- 'read-only': Can only read files, safe for analysis tasks\n- 'workspace-write': Can modify files within workspace only (recommended for most tasks)\n- 'unlimited': (DANGER) Full system access, use only when explicitly needed"New value: +"Security level: 'read-only' (analyze files), 'workspace-write' (modify inside workspace), 'unlimited' (full system access). Default: 'read-only'."
    • changedInput schema / properties / prompt / description
      Previous value: -"Detailed task instruction for the agent. Include specific file paths, function names, or error messages when available. Be explicit about scope and constraints to avoid over-engineering. Example: 'Fix the TypeError in utils.py:42, only modify that function'"New value: +"Detailed 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."
    • addedInput schema / properties / report_mode
      Added value: +{
      +  "default": false,
      +  "description": "Generate a standalone, document-style report (no chat filler) suitable for sharing.",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / save_file / description
      Previous value: -"Save agent output to a file at the specified path. The file will contain the agent's response without debug info. This saves the orchestrator from having to write files separately. Example: '/path/to/output.md'\n\nNOTE: This is intentionally exempt from permission restrictions. It serves as a convenience for persisting analysis results, not as a general file-write capability. The CLI agent's actual file operations are still governed by the 'permission' parameter."New value: +"PREFERRED 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."
    • addedInput schema / properties / save_file_with_append_mode
      Added value: +{
      +  "default": false,
      +  "description": "When true AND save_file is set, append instead of overwrite. For multi-agent collaboration on same document.",
      +  "type": "boolean"
      +}
    • removedInput schema / properties / save_file_with_prompt
      Removed value: -{
      -  "default": false,
      -  "description": "When true AND save_file is set, injects a note into the prompt asking the model to verbalize its analysis and insights. The model's detailed reasoning will be automatically saved to the file. Useful for generating comprehensive analysis reports.",
      -  "type": "boolean"
      -}
    • addedInput schema / properties / save_file_with_wrapper
      Added value: +{
      +  "default": false,
      +  "description": "When true AND save_file is set, wrap output in <agent-output> XML tags with metadata (agent name, continuation_id). For multi-agent assembly.",
      +  "type": "boolean"
      +}
    • removedInput schema / properties / session_id
      Removed value: -{
      -  "default": "",
      -  "description": "Session ID to continue a previous conversation. Reuse the ID from prior tool calls to maintain context. Leave empty for new conversations.",
      -  "type": "string"
      -}
    • changedInput schema / properties / task_note / description
      Previous value: -"Display label for GUI, e.g., '[Review] PR #123'"New value: +"REQUIRED 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."
    • changedInput schema / properties / workspace / description
      Previous value: -"Absolute path to the project directory. Use the path mentioned in conversation, or the current project root. Supports relative paths (resolved against server CWD). Example: '/Users/dev/my-project' or './src'"New value: +"Project root directory. Boundary for 'workspace-write'. Use absolute paths or relative paths."
  2. First observed

TDQS

A4.2/5.0
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.

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