Skip to main content
Glama
leolulu

siyuan-mcp-server

by leolulu

list_files

Explore a SiYuan workspace directory by listing its files and folders at a specified path. Read-only operation helps inspect structures like snapshot history.

Instructions

列出指定路径下的文件和文件夹(只读)。

常用于探索 '/data' 目录结构,例如查看 '/data/history' 下的快照。

注意事项: - 该工具仅读取目录,不会修改任何文件。 - 返回结果依赖思源工作空间内的实际路径权限。

Args: path: 路径,例如 '/data' 或 '/data/history'。

Returns: list: 包含文件和文件夹信息的字典列表。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.31.0

TDQS

A4.4/5.0
Behavior4/5

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

No annotations are provided, so the description carries the full burden. It explicitly discloses read-only behavior ('不会修改任何文件' – will not modify any files) and a permission dependency ('返回结果依赖思源工作空间内的实际路径权限'). This goes beyond a minimal listing description and helps the agent set expectations.

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 front-loaded with the core purpose, followed by concise bullet notes and clearly separated Args/Returns sections. Every sentence adds functional information, and there is no redundant or filler content.

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 one-parameter read-only tool, it covers purpose, usage context, parameter semantics, return shape, and permission behavior. The output schema covers detailed return structure, so the description doesn't need to. Minor gaps such as error handling or recursion behavior prevent a perfect score.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema provides no parameter description (0% coverage), so the description must compensate. It defines 'path' with examples ('/data' or '/data/history'), giving concrete format guidance. It does not cover absolute vs. relative paths or validation rules, but the examples are sufficient for normal use.

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 description states a specific verb and resource: '列出指定路径下的文件和文件夹(只读)' (list files and folders under the specified path, read-only). This clearly differentiates it from sibling tools like get_file or get_history_file, which retrieve file content or history rather than directory listings.

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?

It provides concrete usage context: '常用于探索 /data 目录结构,例如查看 /data/history 下的快照' (commonly used to explore the /data directory structure, e.g., view snapshots under /data/history). It does not explicitly contrast with alternatives or state when not to use the tool, so it stops short of a 5.

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