Skip to main content
Glama

get_file_info

Read-only

Retrieve metadata for one file or folder by node ID or absolute path, including size, MIME type, SHA-256, path, and folder subtree counts. Read-only and cheap; use it before reading or downloading files.

Instructions

Get metadata for one file or folder, identified by node_id or absolute path: id, parent_id, name, kind, size, MIME type, SHA-256, path and updated_at. Folders also report subtree_bytes and subtree_count (stats_stale is true while they are being recalculated). Read-only and cheap. To read contents use read_text_file or read_document_text; to download use prepare_download. Requires files:read.

Input Schema

NameRequiredDescriptionDefault
pathNoabsolute node path instead of node_id
node_idNoGopan node UUID

Output Schema

NameRequiredDescriptionDefault
idYes
kindYes
mimeNo
nameYes
pathNo
sizeNo
sha256No
parent_idNo
updated_atYes
stats_staleNo
subtree_bytesNo
subtree_countNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/5

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

The description adds useful context beyond readOnlyHint=true: it says the operation is cheap, requires files:read, and explains folder-specific fields including the stats_stale recalculation state. It does not describe pagination or error behavior, but those are not central for this simple metadata lookup.

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 operation and then supplies the return fields, folder caveat, alternatives, and permission requirement in compact order. The field list is dense but each item helps the agent recognize the metadata response.

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 two-parameter metadata lookup with an output schema, this covers the necessary selection guidance, permission requirement, and sibling alternatives. The output schema carries return structure, and the description still surfaces the most important fields and a folder-specific staleness caveat.

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?

Schema coverage is 100%, so both path and node_id are already documented in the input schema. The description reinforces that either identifier can be used but adds no syntax or format details beyond the schema.

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 uses a specific verb and resource ('Get metadata for one file or folder'), states the identifying inputs (node_id or absolute path), and enumerates the returned fields. It clearly distinguishes itself from content-reading and download siblings.

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

Usage Guidelines5/5

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

It explicitly routes the agent to alternatives: read_text_file or read_document_text for contents, and prepare_download for downloading. This leaves little ambiguity about when to use get_file_info versus its siblings.

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