Skip to main content
Glama
GeminiDesk MCP
by LZ7TOP

Extract Code Symbols & Line Ranges

fs_outline

Extracts class, function, interface, type, and Markdown heading outlines with exact start/end line ranges, so you can inspect file structure without reading the entire file.

Instructions

快速提取代码文件的类、函数、接口、类型、Markdown 标题等符号骨架及精确 [startLine, endLine] 行号范围,省去盲读全文。

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": {
      "path": "<path>"
    },
    "name": "fs_outline"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYes目标代码或文档文件路径
filterNo可选按符号名关键字过滤

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.0

TDQS

A3.8/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full burden. It does disclose the shape of the result (symbols with line ranges), which is more than a bare restatement. However, it says nothing about behavior on non-code files, binary/large files, whether the scan is recursive, or the output encoding, all of which matter for a tool with zero structured metadata.

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 dense sentence with zero filler, front-loading the action (提取) and the payload (symbol types and line ranges) before the motivation (省去盲读全文). Nothing is repeated from the schema or title verbatim.

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?

For a two-parameter read-only lookup with full schema coverage, this is nearly complete: the agent knows what is extracted and roughly what comes back. The remaining gap is that no output schema exists, so the exact response format (JSON objects? flat text?) and edge-case behavior remain 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 both parameters (path, filter) are already documented in the schema and the baseline applies. The description adds no meaning beyond that: it never mentions the keyword filter or how filtering interacts with the returned line ranges.

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 names a specific verb (提取/extract) and resource (symbol skeleton of a code file) and enumerates exactly what is returned: classes, functions, interfaces, types, Markdown headings, plus precise [startLine, endLine] ranges. The closing phrase 省去盲读全文 implicitly contrasts it against fs_read_file/fs_read_lines, so an agent can distinguish it from those siblings without opening a schema.

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?

Usage is only implied: the agent learns this tool is a cheaper alternative to reading a full file, which is a real cue for when to call it. But there is no explicit when-to-use/when-not phrasing, no guidance on when fs_search or fs_read_lines would be preferable, and no mention of the optional filter parameter as a narrowing strategy.

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