Skip to main content
Glama

get_file_map

Get a quick structural overview of a source file by retrieving all symbols grouped by kind like functions, classes, and enums.

Instructions

Return all symbols in a file grouped by kind — fast structural overview.

Like a table of contents before reading a chapter. Pass a path relative to the project root (src/main.cpp) or just the filename (main.cpp). Returns symbols keyed by kind (function, method, class, struct, enum, ...). Each kind has count (total) and items (first N, default 30). Set max_per_kind=0 for unlimited, signatures=true for full sigs.

Read-only: yes. No side effects. Use before reading a large file to orient yourself — see what functions, classes, and enums it defines.

Args: file_path: Path relative to project root, or just the filename. project_root: Project directory. Auto-detected if omitted. signatures: Include full function signatures. Default: False. max_per_kind: Max items per kind group (default 30, 0 = unlimited).

Returns: dict: {file, total_symbols, symbols: {kind: {count, items[]}}}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYesPath to source file — relative to project root or just filename.
project_rootNoProject root. Auto-detected if omitted.
signaturesNoInclude full function signatures in output.
max_per_kindNoMax items per symbol kind group (default 30, 0 = unlimited).
Behavior4/5

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

Despite no annotations, the description clearly states read-only, no side effects, describes the output structure (dict with file, total_symbols, symbols), and explains defaults and special values (max_per_kind=0 for unlimited).

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?

The description is well-structured with a concise summary, analogy, parameter list with inline explanations, and return format. It is front-loaded and each sentence adds value, though could be slightly tighter.

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 simple read operation with 4 parameters and no output schema, the description covers all necessary aspects: purpose, usage context, parameter semantics, and return structure. It is complete for an agent to use correctly.

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

Parameters4/5

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

Schema coverage is 100%, so baseline 3. The description adds value by explaining file_path as relative to project root or just filename, noting auto-detection for project_root, and clarifying signatures and max_per_kind defaults in natural language.

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 clearly states 'Return all symbols in a file grouped by kind — fast structural overview.' It uses a specific verb and resource, and the analogy ('Like a table of contents before reading a chapter') distinguishes it from sibling tools like get_source or lookup_symbol.

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

Usage Guidelines4/5

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

The description advises 'Use before reading a large file to orient yourself' and notes it's read-only with no side effects. While it doesn't explicitly list alternatives, the context is sufficient for an agent to decide when to invoke this tool.

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/turbyho/fw-context-mcp'

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