Skip to main content
Glama

file_outline

Return a structured symbol outline for a source file—module, imports, classes, fields, functions, methods, variables, and type aliases—so you can inspect code structure without parsing the full file.

Instructions

Return the structured symbol outline (module, imports, classes/fields, functions/methods, variables, type aliases) of a source file.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "file": "<file>"
    },
    "name": "file_outline"
  }
}

Input Schema

NameRequiredDescriptionDefault
fileYesRepository-relative file path (e.g. internal/service/orders.go).
include_privateNoInclude unexported/private symbols (default true).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description carries the full disclosure burden. It conveys that this is a passive extraction that returns structure rather than source text, and it lists the symbol kinds covered, which is real behavioral value. It says nothing about behavior on missing files, parse failures, truncated/unparsed files, or output ordering, which an agent calling blindly would benefit from.

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?

A single front-loaded sentence with the core action first and the enumeration of returned symbol types in a compact parenthetical. No filler, no restatement of the tool name, and every clause contributes information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema, so the description must hint at return shape, and the parenthetical symbol list does that reasonably well. For a two-parameter read tool this is nearly complete; only the concrete structure of the returned outline (nesting, ordering, per-symbol fields) is left unspecified.

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 the file path format and the include_private default are already fully documented in the schema. The description adds no parameter-level meaning of its own, such as what include_private actually suppresses in the outline. Baseline 3 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 uses a specific verb ("Return") and resource ("structured symbol outline ... of a source file") and even enumerates the symbol categories returned (module, imports, classes/fields, functions/methods, variables, type aliases). That makes the tool's function unambiguous. It does not, however, distinguish itself from siblings such as find_symbol or repo_overview, so it stops short of 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 Guidelines3/5

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

No explicit when-to-use or when-not-to-use guidance is given, and no alternative is named, even though find_symbol and search_code overlap conceptually. Usage is only implied by the stated purpose: an agent infers this is the tool for getting a whole file's structural map. Nothing warns when a narrower sibling is more appropriate.

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