Skip to main content
Glama

Get File Info

get_file_info

Retrieve file or directory metadata to inspect Linux paths before reading, editing, or processing them.

Instructions

Return file/directory metadata.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "path": "<path>"
    },
    "name": "get_file_info"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.1

TDQS

C2.4/5.0
Behavior2/5

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

With no annotations supplied, the description carries the full behavioral burden and discharges almost none of it. It does not say whether the call is read-only, what happens for a missing path, whether symlinks are followed, or whether directory paths are accepted alongside files.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The single sentence is front-loaded and wastes no words, so it is concise by construction. But the brevity is under-specification rather than efficiency: a phrase naming the returned fields would have cost little and removed most of the ambiguity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool is structurally simple (one required string, no nesting), which lowers the bar, but the absence of an output schema means the description must say what comes back and it does not. Combined with no annotations and no parameter documentation, an agent knows only the roughest outline of this call.

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% with one required parameter, and the description never mentions "path" at all. It gives no indication whether the path must be absolute, relative to a workspace root, or resolved against the server's cwd — information the schema does not supply.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

"Return file/directory metadata" gives a verb (return) and a resource (file/directory metadata), which does separate it from read_file (contents) and list_directory (entries). However, "metadata" is never unpacked, so the agent cannot tell whether this yields size, timestamps, permissions, mime type, or all of them.

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

Usage Guidelines2/5

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

There is no when-to-use guidance and no reference to any sibling such as read_file, list_directory, or search_files. The only hint that it is a stat-style lookup is the word "metadata", which the agent must infer.

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