Skip to main content
Glama

get_file_context

Retrieve a file's exports, signatures, imports, and reverse importers—plus optional snippets or recent diffs—to understand its role in a JS/TS codebase.

Instructions

What does this file export (signatures, lines), what does it import, and who imports it?

Input Schema

NameRequiredDescriptionDefault
pathYesRepo-relative or absolute file path
snippetNoAdd each export's source
change_limitNoMax diffs (default 3)
absolute_pathsNoPrint absolute paths
include_changesNoAdd recent diffs

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.0.1

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full behavioral burden, yet it only implies read-only by phrasing. It never mentions the optional diff-gathering behavior (include_changes, change_limit default 3), the source-snippet expansion, or anything about response shape or cost for large files.

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?

A single front-loaded sentence with zero filler. It is arguably under-specified rather than verbose, but nothing in it wastes space.

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?

Five parameters, no annotations, and no output schema mean the description should explain the optional swings (diffs, snippets, absolute paths) and roughly what comes back. It covers only the core retrieval and leaves the agent to discover the mutation-free but potentially expensive diff path on its own.

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 description coverage is 100%, so all five parameters are documented in the schema itself; that sets the baseline at 3. The description adds nothing about snippet, change_limit, absolute_paths, or include_changes, so no credit above baseline.

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?

The question enumerates concrete return content (exports with signatures and line numbers, imports, importers), so an agent can tell it is a file-level dependency overview rather than a symbol search. It never names its siblings, though — who_imports and exports_in appear to be subsets of this tool, and the description does not say so.

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 or when-not-to-use guidance and no mention of alternatives. An agent must infer from the phrasing whether this is a bundle of who_imports + exports_in or a distinct operation.

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