Skip to main content
Glama

Get File Info

get_file_info
Read-only

Retrieve file or directory metadata—size, type, permissions, creation and modification times—without reading content. Use it to inspect file characteristics within allowed directories.

Instructions

Retrieve detailed metadata about a file or directory. Returns comprehensive information including size, creation time, last modified time, permissions, and type. This tool is perfect for understanding file characteristics without reading the actual content. Only works within allowed directories.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
contentYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so the safety profile is covered. The description adds a real behavioral constraint ('only works within allowed directories') and notes the non-destructive nature of not reading content. It omits error behavior (missing file, symlinks), which keeps it from a 5.

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?

Purpose is front-loaded in the first sentence and the detail list is useful. The sentence 'This tool is perfect for...' is mild promotional filler, but overall the text is tight and earns most of its length.

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?

With an output schema present, the description needn't explain return values, yet it does so helpfully. Combined with read-only annotations and the allowed-directory constraint, an agent has enough to call it correctly; only the undocumented path parameter leaves a gap.

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

Parameters2/5

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

Schema description coverage is 0% and the single 'path' parameter is undocumented in both schema and description. The description never clarifies path syntax, whether relative paths are accepted, or how directory vs file paths behave, so it does not compensate for the coverage gap.

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 and resource ('Retrieve detailed metadata about a file or directory') and even enumerates what metadata (size, timestamps, permissions, type). The phrase 'without reading the actual content' implicitly separates it from read_file, though no sibling is named 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 line 'perfect for understanding file characteristics without reading the actual content' implies when to use it, and 'Only works within allowed directories' gives a precondition. But there is no explicit routing to or away from siblings like list_directory_with_sizes or read_file, so usage is only implied.

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