Skip to main content
Glama

craftos_list_files

Read-only

Recursively list workspace files and folders to find project programs and tests before running them; returns workspace-relative paths, kinds, and sizes for reading files.

Instructions

List the files and folders under a workspace folder, recursively. Returns {path, kind, size} entries with workspace-relative paths, ready for craftos_read_file. Use it to find a project's programs and tests before running them. Paths that leave the workspace are refused.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "craftos_list_files"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathNoFolder to list, workspace-relative (default "." lists everything)..

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.7.1
    • addedInput schema / properties / path / description
      Added value: +"Folder to list, workspace-relative (default \".\" lists everything)."
  2. First observedv0.7.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations only declare readOnlyHint=true; the description adds recursion behavior, the returned entry shape ({path, kind, size}), path relativity, and a security constraint that out-of-workspace paths are refused. It does not address very deep trees, symlink handling, empty results, or result volume, but the added context is substantial for a read-only listing tool.

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?

Three short sentences, front-loaded with the core action, then the return contract, then the use case, then the safety constraint. Nothing is redundant and every clause carries information an agent would act on.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a one-parameter, read-only listing tool with no output schema, the description covers action, scope, return shape, follow-on tool, and the workspace boundary. Nothing material needed to call it correctly is missing.

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 coverage is 100% and already documents the single path parameter including the default '.'. The description reinforces that the folder is workspace-relative but adds no syntax, format, or edge-case detail beyond the schema, so the baseline of 3 applies.

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?

States a specific verb and resource ('List the files and folders'), adds scope ('under a workspace folder, recursively'), and clarifies the boundary against the sibling read tool by noting paths are ready for craftos_read_file. An agent can tell immediately this is enumeration, not content retrieval.

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?

Gives an explicit use case ('find a project's programs and tests before running them') and implicitly positions craftos_read_file as the follow-up step. There is no explicit when-not or statement about what to use instead for non-filesystem discovery, so it stops short of full alternative routing.

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