Skip to main content
Glama

code_folder_files

Read-onlyIdempotent

Lists a workspace folder's direct files—sorted, paged, and filterable by name—with paths, sizes, and line counts, so you can inspect one folder without subfolders.

Instructions

Lists the files directly inside one folder of a workspace (not its subfolders), sorted by name and paged, each with its path, size and line count. Each file is marked small (read it with code_read) or large (use code_outline + code_method). Optionally only names that contain some text. Files tools may not open (build output, .git, secrets, keys, the workspace's access rules) are not listed. A folder that does not exist is an error. Reads only. WHEN TO USE: code_skeleton showed a folder as collapsed or too big to list, or you need every file of one folder, e.g. all 'Transaction' files in Entities/Exchange. For the folder tree use code_skeleton; to find a type or member anywhere use code_search; for text inside files use code_grep. RETURNS: 'Showing N of M file(s) - page p/q', the files, and the call for the next page.

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": {
      "workspace": "<workspace>",
      "folderPath": "<folderPath>"
    },
    "name": "code_folder_files"
  }
}

Input Schema

NameRequiredDescriptionDefault
pageNoOptional: page number, starting at 1 (default 1)
guideNotrue: put the code guide first in the result. Use on your first code call, or when told it changed.
pageSizeNoOptional: files per page (default 50, at most 200)
workspaceYesWorkspace name as shown in Waymark (a single workspace; '*' is not accepted)
folderPathYesFolder path relative to the workspace root (e.g. 'Entities/Exchange', 'Controllers'). '.' is the root.
searchPatternNoOptional: text the file NAME must contain, any letter case, e.g. 'Company' or '.cs'. Plain text, not a glob ('*' is not a wildcard). Leave empty to list all.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.2.2
    • changedInput schema / properties / searchPattern / description
      Previous value: -"Optional: part of the file name to filter by (case-insensitive, e.g. 'Company'). Leave empty to list all."New value: +"Optional: text the file NAME must contain, any letter case, e.g. 'Company' or '.cs'. Plain text, not a glob ('*' is not a wildcard). Leave empty to list all."
  2. First observedv0.2.0

TDQS

A4.7/5.0
Behavior5/5

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

Beyond readOnly/idempotent/non-destructive annotations, it discloses exclusion rules (build output, .git, secrets, keys, workspace access rules), the error behavior for a nonexistent folder, and the RETURNS shape including the 'Showing N of M' header and next-page call. That is substantially more than the annotations carry.

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?

Front-loaded with the core behavior, then clearly sectioned into WHEN TO USE and RETURNS, and every sentence carries information (scope, exclusions, error case, routing, return format). No filler or restated title text.

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 6-parameter read tool with no output schema, the definition covers the exclusion list, error condition, result header format, pagination continuation, and where to go next for file contents. Nothing an agent needs to call it correctly or interpret its output 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%, so workspace, folderPath, page, pageSize, guide, and searchPattern are already fully documented. The description adds only marginal semantics — sorted-by-name ordering and that searchPattern matches names rather than paths — without covering paging limits or the guide flag. Baseline 3 applies 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.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource — 'Lists the files directly inside one folder of a workspace (not its subfolders)' — and adds sorting, paging, and per-item fields (path, size, line count). The explicit non-subfolder scoping plus the small/large classification makes it unmistakable versus code_skeleton or code_search.

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 WHEN TO USE block gives concrete triggers ('code_skeleton showed a folder as collapsed or too big to list', 'all *Transaction* files in Entities/Exchange') and explicitly routes three alternatives: code_skeleton for the tree, code_search for a type/member, code_grep for text inside files. The description also routes per-file follow-ups to code_read vs code_outline + code_method.

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