Skip to main content
Glama

list_workspace_files

Discover readable workspace files and folders before reading or editing, including optional glob and subdirectory filters; results stay confined to allowed read paths.

Instructions

List files the server is allowed to read.

Use this to discover what is available before reading or editing. Results are confined to the read allowlist (the workspace folder plus any additional read-only folders). Paths returned here can be passed directly to the other tools.

Returns a dictionary with:

  • files: list of {path, size_bytes} (absolute paths, sorted)

  • total: number of files returned

  • truncated: true if more files exist than were returned (capped)

  • read_dirs: the read folders that were searched

Input Schema

NameRequiredDescriptionDefault
patternNoOptional glob filter on file names, e.g. '*.pdf' or '*.docx'. Default: all files.
recursiveNoRecurse into subdirectories. Default: true.
subdirectoryNoOptional workspace-relative subdirectory to list. If omitted, all read folders are listed.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.19.0

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses the read-allowlist confinement, that results are absolute and sorted, and that output can be capped via a truncation flag. It omits whether hidden files are included and says nothing about permissions or performance on large trees, so it is strong but not exhaustive.

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?

Front-loaded with the scope constraint, then a usage sentence, then a bulleted return shape — clean and skimmable with no filler. The return-value block is duplicated by the existing output schema, so a chunk of the text is redundant rather than earning its place.

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 zero-required-parameter listing tool this covers the essentials: scope, purpose, allowed follow-up use, and truncation behavior. Since an output schema already exists, the enumerated return fields are surplus, and the description never explains how narrowing by subdirectory or pattern changes the result set.

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 pattern, recursive, and subdirectory are already fully documented with defaults and examples. The description adds no meaning beyond the schema for any of the three parameters, which is the baseline case rather than a value-add.

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?

The first sentence states a specific verb and resource (list files) plus the governing scope (the read allowlist), and the follow-up frames it as the discovery step preceding reading/editing. That framing makes it immediately distinguishable from read_document_as_markdown and search_documents without opening any schema.

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?

"Use this to discover what is available before reading or editing" gives clear sequencing guidance, and "Paths returned here can be passed directly to the other tools" tells the agent how output feeds siblings. It does not explicitly say when to prefer search_documents over listing (e.g., known filename vs known content), so a small gap remains.

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