Skip to main content
Glama

opencode_file_list

Read-onlyIdempotent

List files and directories within a project to browse its structure, allowing AI agents to inspect codebases and locate relevant files for coding tasks.

Instructions

List files and directories at a path

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNoPath to list (defaults to project root)
directoryNoAbsolute path to the project directory. When provided, the request targets that project. If omitted, the OpenCode server uses its own working directory.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataNo
textYes
isErrorYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.0.0

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, so the safety profile is covered. The description adds no meaningful behavioral context beyond what 'List files and directories' implies, such as recursion, hidden files, or scope limits. It does not contradict the annotations.

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?

The description is a single sentence with no wasted words. It is appropriately concise for a simple tool whose parameter details and output structure are already provided elsewhere.

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?

For a low-complexity list tool with strong annotations, full schema coverage, and an output schema, the description is nearly sufficient. The only gap is the lack of any sibling differentiation or usage context, which is accounted for in other dimensions rather than making the tool description incomplete for invocation.

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 parameters are already fully documented in the input schema. The description adds no additional semantic detail about path interpretation, default behavior, or the directory/project parameter distinction.

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 uses a specific verb ('List') and resource ('files and directories at a path'), making the basic purpose clear. However, it does not differentiate this from similar file-related siblings like opencode_find_file or opencode_file_status, which could cause some ambiguity for an agent selecting among them.

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?

No guidance is given about when to use this tool versus alternatives such as opencode_find_file, opencode_file_read, or opencode_file_status. The only contextual hint is the path default, which appears in the schema; the description itself provides no usage direction or exclusions.

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

Deploy Server

Other Tools