Skip to main content
Glama

file_stat

Retrieve detailed file or directory information including size, permissions, modification time, and type to inform filesystem management.

Instructions

Get detailed information about a file or directory, including size, permissions, modification time, and type (file/directory/symlink). / 获取文件或目录的详细信息,包括大小、权限、修改时间和类型(文件/目录/符号链接)。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesThe path of the file or directory to get information about.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeYes
nameYes
pathYes
sizeYes
is_dirYes
mod_timeYes
Behavior3/5

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

No annotations are provided, so the description carries the burden. It clearly discloses what information is returned (size, permissions, modification time, type), which is useful. However, it does not mention error behavior (e.g., what happens if the path does not exist), access permission requirements, or symlink handling details. The read-only nature is implied by 'Get detailed information' but not explicitly stated.

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 a single, compact sentence that front-loads the core purpose. Even with the bilingual repetition, there is no wasted verbiage. Every part contributes to understanding the tool.

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?

Given the tool's low complexity (one parameter) and the presence of an output schema, the description is mostly complete. It even previews the return fields. It could be improved by mentioning potential errors or confirming it follows symlinks, but this is not essential given the output schema and simple nature.

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?

The schema has 100% coverage for the single path parameter, including a clear description and examples. The tool description adds context about the kind of information returned, but it does not add additional meaning to the parameter itself. The baseline of 3 applies because 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?

The description is specific and clear: it states the tool gets detailed information about a file or directory, listing the exact fields (size, permissions, modification time, type). It distinguishes from siblings like file_exists (which only checks existence) and list_directory (which lists contents).

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 description implies usage: when you need detailed metadata for a file/directory, use file_stat. However, it does not explicitly mention alternatives or when not to use it. No exclusions are given, so it is implied rather than stated.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/shibingli/mcp-toolkit'

If you have feedback or need assistance with the MCP directory API, please join our Discord server