Skip to main content
Glama

get_file_metadata

Retrieve file or directory metadata (size, type, modification time, permissions) to investigate file properties and check access rights.

Instructions

Returns metadata about a file or directory: path, size, type, modification
time, and permissions. Path must be within allowed roots.

Use this when investigating file properties, checking permissions, or
assessing file sizes. Does not modify system state.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations provided, the description carries the full burden. It discloses that the tool does not modify system state and that the path must be within allowed roots, which are important behavioral facts. It doesn't cover error responses or symlink behavior, but for a read-only metadata tool this is adequate.

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?

Two sentences with zero redundancy. The first states the purpose and outputs; the second gives usage guidance and a safety note. Every word earns its place, and the key information is front-loaded.

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 simple one-parameter, read-only tool with an output schema, the description fully covers purpose, usage, constraints, and behavior. The output schema handles return values, so nothing essential is missing.

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?

Schema coverage is 0%, so the description must compensate. It provides meaning for the 'path' parameter by stating it 'must be within allowed roots', implying a validated path. This is additional context beyond the schema's mere type definition and is sufficient for a single required string parameter.

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 clearly states the verb 'Returns' with a specific resource 'metadata about a file or directory' and lists the exact fields (path, size, type, modification time, permissions). This distinguishes it from sibling tools like list_directory (which lists entries) and read_file (which reads contents).

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 explicit when-to-use guidance ('investigating file properties, checking permissions, or assessing file sizes') and implicitly signals non-modification ('Does not modify system state'). However, it does not name alternatives or exclude specific cases, but the context is clear enough for an agent to choose this over content-reading tools.

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/Ronit-k/MCPilot'

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