Skip to main content
Glama

列项目文件

piweb_list_files
Read-only

Lists files in a project directory, preferring git ls-files and skipping .gitignore entries. Use the filter option to locate readable files by fuzzy name match.

Instructions

列出某个项目目录下的文件(优先 git ls-files,跳过 .gitignore)。可带 filter 做模糊匹配。用来定位某个项目里有哪些文件可读。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cwdYes项目目录的绝对路径
limitNo最多列出多少,默认 100
filterNo文件名模糊匹配(如 mcp、route.ts)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint and openWorldHint, so safety is covered. The description adds real behavioral context beyond that: it prefers git ls-files and skips .gitignore, which directly affects which files appear in the result. It stops short of saying what happens outside a git repository or what the returned entries look like.

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?

Three short clauses, well front-loaded: what it lists, how it lists, then why you'd use it. Nearly every clause earns its place; only the filter sentence is mildly redundant with the schema.

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 simple read-only list tool with no output schema, the description conveys the resource and the mechanism sufficiently. It could be stronger by stating the return shape (a path list) or the non-git-repo fallback, but nothing critical for invocation 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 description coverage is 100%, so all three parameters (cwd, limit, filter) are already documented in the schema. The description's '可带 filter 做模糊匹配' merely restates the schema's filter definition and adds no format or matching-rule detail beyond it. Baseline 3 applies.

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?

States a specific verb+resource (list files under a project directory) and even the mechanism (git ls-files, .gitignore skipped). It is distinguishable from piweb_read_file by framing itself as the discovery step ('用来定位某个项目里有哪些文件可读'), though it never names that sibling explicitly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The closing clause implies intended usage – locate which files exist/are readable before reading them – but gives no explicit when-to-use/when-not guidance and never names piweb_read_file as the follow-up alternative. Usage is inferred rather than stated.

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