Skip to main content
Glama

get_file_outline

Read-onlyIdempotent

Retrieve the declaration outline for one exact repository-relative file, with optional exact label filtering and source-order paging. Excludes file, folder, and container nodes.

Instructions

Declaration outline of one exact repository-relative file: optional exact label filter, source order, exact total/offset/limit paging; file/folder/container nodes excluded.

Input Schema

NameRequiredDescriptionDefault
limitNo
formatNotree
labelsNoOptional exact node-label filter
offsetNo
projectYes
file_pathYesExact repository-relative file path

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.11.0

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, non-destructive, closed-world, so the safety profile is covered. The description adds real behavioral context beyond that: results are returned in source order, paging is exact total/offset/limit, and structural nodes are filtered out. It does not disclose the tree-vs-json output difference or rate/auth behavior.

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 dense sentence with the core resource stated first, followed by scope qualifiers and exclusions. Every clause carries information, though the semicolon-heavy telegraphic style compresses several distinct facts (filter, ordering, paging, exclusions) at the cost of some readability.

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?

For a read-only outline tool with no output schema, the description covers purpose, ordering, paging, and excluded node types. However, the format enum (tree vs json) and the project parameter are unexplained, and the shape of a returned outline is not characterized, leaving moderate gaps.

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 only 33% (labels and file_path), so the description must compensate. It does clarify paging semantics for offset/limit and reaffirms the exact label filter, but it says nothing about the 'format' enum (tree/json) or the 'project' parameter, leaving two of six parameters to be inferred from bare types.

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?

Names a specific verb+resource ('Declaration outline of one exact repository-relative file') and clarifies scope by treating it as a single-file view. It implicitly separates itself from repo-wide siblings like get_architecture or search_graph, but never names an alternative, so differentiation is inferential rather than explicit.

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?

The description is a feature list (label filter, source order, paging, node exclusions) with no when-to-use statement and no routing to competing siblings such as get_code_snippet or search_code. The only constraint given ('file/folder/container nodes excluded') describes output content, not when to select this tool.

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