Skip to main content
Glama

get_file_outline

Read-onlyIdempotent

Lists functions, classes, and methods in a file with line ranges and signatures, so you can see what it defines without reading the whole file.

Instructions

Lists the symbols defined in one file — functions, classes, methods — with their line ranges and signatures. Cheaper than reading the file when you only need to know what it defines, or need to pick a line range to read. The index may be stale for very recent edits; verify with Read when exactness matters.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileYesPath relative to the indexed project root, POSIX separators

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileYes
noteNo
indexedYes
entitiesYes
languageYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint and destructiveHint=false, so the safety profile is covered. The description adds genuinely useful non-annotation context: the index may be stale for very recent edits, and Read should be used to verify exactness. That staleness/verification caveat is the kind of trait structured fields cannot express.

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?

Three compact sentences, front-loaded with the output shape, then the usage tradeoff, then the staleness caveat. Each sentence carries distinct information and none is redundant.

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?

An output schema exists, so return format need not be explained, and annotations cover the safety profile. Combined with the usage rule and staleness caveat, everything an agent needs to call this correctly is present.

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?

There is a single parameter with 100% schema coverage, so the schema already defines 'file' as a project-root-relative POSIX path. The description adds no syntax or formatting detail beyond what the schema states, so the baseline of 3 for high-coverage schemas applies.

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 description states a precise verb+resource+scope: 'Lists the symbols defined in one file — functions, classes, methods — with their line ranges and signatures.' An agent immediately knows both the operation and the payload. It does not explicitly distinguish itself from siblings like find_references or anyindex_search, which is the only gap keeping this from a 5.

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 gives an explicit decision rule ('Cheaper than reading the file when you only need to know what it defines, or need to pick a line range to read') and names the alternative tool (Read) for the case where exactness matters. When-to-use and when-to-verify are both covered with no inference required.

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