Skip to main content
Glama

opencode_file

Check which files an OpenCode agent changed after a prompt, inspect file contents, and list directories to review generated code.

Instructions

Check what files the OpenCode agent changed. Use 'status' AFTER a prompt to see which files were created/modified (like git status). Use 'read' to inspect specific file contents. Use 'list' to browse directories. This is your primary review tool — always check status after the agent writes code.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "action": "<action>"
    },
    "name": "opencode_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathNoFile/directory path (required for read and list)
actionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It discloses that 'status' works like git status and that 'read'/'list' inspect and browse, which implies read-only behavior. But it never explicitly states that the tool is read-only or non-destructive, and it omits details like what status returns or whether path is required for status.

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?

The description is front-loaded and action-oriented. The final sentence repeats the 'check status after the agent writes code' guidance already implied, which is slightly redundant, but overall it is efficient and easy to scan.

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?

For a three-action file tool with no annotations and no output schema, the description covers action semantics and usage well. It leaves gaps around return values (what status output looks like, whether read returns raw content) and the path requirement for status, which an agent might need to call it correctly.

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 50%, and the description compensates well by explaining the meaning of each action enum value. The path parameter is already documented in the schema. The description could add more about path format or status not needing a path, but it adds substantial meaning beyond the raw schema.

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 states a specific verb and resource: checking files changed by the OpenCode agent, and it enumerates the three actions (status, read, list). It is clear enough to distinguish from generic file tools, though the opening sentence focuses on changed files while the tool also reads and lists directories, which slightly blurs the full scope.

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?

It gives explicit guidance for each action: use 'status' after a prompt to see created/modified files, use 'read' to inspect contents, and use 'list' to browse directories. It even says to always check status after the agent writes code. However, it does not state when not to use this tool or name alternative siblings like opencode_find.

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