Skip to main content
Glama

File structure outline

outline
Read-only

Show a file's structure—function/class names, imports, top-level comments—without implementation bodies; include git branch/commit metadata when available.

Instructions

Show the structural outline of a file — function/class names, top-level comments, imports. Returns a compact view without implementation bodies. Includes git metadata (branch, commit) when the file is in a git repo. Use instead of cat when reviewing file structure or auditing many files at once.

Input Schema

NameRequiredDescriptionDefault
refNoGit ref to outline (e.g. 'main', 'HEAD~1', a commit hash). When set, reads file content from git (git show ref:path) instead of disk.
pathYesPath to the file

Output Schema

NameRequiredDescriptionDefault
pathYes
mtimeYesFile modification time (unix timestamp). 0 if using ref.
branchYesCurrent git branch, or null if not in a git repo
commitYesLast commit hash that touched this file, or null if not in a git repo
outlineYes
symbolsYes
languageYes
retainedNo
totalLinesYes
outlineLinesYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv5.0.1

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, so safety is covered, but the description still adds useful behavior: output is truncated to structure with no bodies, and git metadata (branch, commit) is included when the file lives in a repo. It stops short of saying what happens for non-repo files or binary/large files, which would be the last bit of behavioral context.

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 short sentences, front-loaded with what the tool returns, then the output shape, then the alternative. Every sentence carries distinct information and nothing is repeated from the schema.

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?

With an output schema present and 100% schema coverage, the description only needs to supply purpose, output character, and sibling routing — all of which it does. An agent can decide to call this instead of cat and know what it will get back.

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 both 'path' and 'ref' are already documented, including the git-show semantics of 'ref'. The description mentions git metadata but adds no syntax or constraint detail beyond the schema, so baseline 3 applies.

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?

States a specific verb and resource ('show the structural outline of a file') and enumerates the contents (function/class names, top-level comments, imports). The scope constraint 'compact view without implementation bodies' makes clear what the agent gets back and how it differs from a full read.

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?

Explicitly names the alternative ('use instead of cat') and the two conditions that select it: reviewing file structure or auditing many files at once. This is exactly the when/when-not routing an agent needs among ~60 siblings.

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