Skip to main content
Glama

get_file_metadata

Retrieve metadata for a repository file without loading its full contents, enabling codebase inspection and context generation without file reads.

Instructions

Return metadata for one repository file without reading its full contents.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
workspaceYes
relative_pathYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
suffixYes
workspaceYes
size_bytesYes
is_directoryYes
relative_pathYes
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It only states the purpose and hints at performance ('without reading full contents') but does not specify what metadata fields are returned, error handling for missing files, or permission requirements. This is insufficient for a tool with no annotation safety profile.

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, well-structured sentence that front-loads the action and scope. It contains no redundant information and is efficiently concise.

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

Completeness3/5

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

The tool has a simple interface and an output schema, which covers return values. However, the description lacks parameter semantics and explicit usage context, and with no annotations, it leaves gaps around error behavior and when to prefer this over get_repository_tree. It is slightly below the minimum viable completeness for a standalone tool.

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%, so the description must compensate by explaining the parameters. It does not clarify the format of 'relative_path' or what 'workspace' refers to exactly. The parameter names are somewhat self-explanatory but lack necessary detail about path conventions and options.

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 ('Return') and clearly identifies the resource ('metadata for one repository file'). It distinguishes itself from sibling tools like read_file and read_file_range by explicitly stating 'without reading its full 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 phrase 'without reading its full contents' implies a lightweight metadata use case, but it does not explicitly name alternatives or state when not to use this tool. Sibling tools like read_file are mentioned indirectly but not directly contrasted, making the usage guidance implied rather than explicit.

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/negativexq/repo-context-forge'

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