Skip to main content
Glama

list_sections

Read-onlyIdempotent

Extract section headers from Pine Script documentation files to navigate large reference documents efficiently before retrieving specific content.

Instructions

List all section headers in a doc file. Use before get_section() to find the right header.

Especially useful for large files like ta.md, strategy.md, collections.md, drawing.md, general.md which have 50-115 sections each.

Args: path: Documentation file path (e.g., "reference/functions/ta.md")

Returns top-level section headers (## level) for navigation. Subsections (###) are omitted since get_section(include_children=True) returns them when reading.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
Behavior4/5

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

Annotations already indicate this is a read-only, idempotent, closed-world operation. The description adds valuable context beyond annotations: it explains the navigation purpose, specifies the header level returned (##), clarifies what's omitted (### subsections), and mentions typical file sizes (50-115 sections). No contradiction with annotations exists.

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?

The description is efficiently structured: first sentence states the core purpose, second provides usage guidance, third highlights specific use cases, and the Args/Returns sections clearly document parameters and output. Every sentence adds value with zero waste, and key information is front-loaded.

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 simple read-only tool with good annotations and one parameter, the description is nearly complete. It explains purpose, usage, parameter semantics, and output behavior. The only minor gap is lack of explicit mention of error cases (e.g., what happens if the file doesn't exist), but given the annotations and straightforward nature, this is acceptable.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage for the single parameter 'path', the description fully compensates by providing clear semantics: it explains 'path' as 'Documentation file path' and gives a concrete example ('e.g., "reference/functions/ta.md"'). This adds essential meaning beyond the bare schema type (string).

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 clearly states the specific action ('List all section headers') and resource ('in a doc file'), distinguishing it from siblings like list_docs (which lists documents) and get_section (which reads content). It explicitly mentions the scope ('top-level section headers (## level)') and what's excluded ('Subsections (###) are omitted').

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?

The description provides explicit guidance on when to use this tool ('Use before get_section() to find the right header') and when not to use it ('Subsections (###) are omitted'). It also mentions specific use cases ('Especially useful for large files...') and references an alternative tool (get_section with include_children=True for subsections).

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/paulieb89/pinescript-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server