Skip to main content
Glama

get_section

Read-onlyIdempotent

Extract specific sections from Pine Script documentation files by header to retrieve targeted information for coding assistance.

Instructions

Get a specific section from a documentation file by its header.

Use after list_sections() shows available headers, or after resolve_topic() / search_docs() identifies the relevant file.

Args: path: Documentation file path (e.g., "reference/functions/strategy.md") header: Header text to find (e.g., "strategy.exit()" or "## strategy.exit()") include_children: Include nested subsections under the header (default: True)

Returns the section content from the header to the next same-level header.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
headerYes
include_childrenNo
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and openWorldHint=false. The description adds valuable behavioral context beyond annotations by specifying the return format ('Returns the section content from the header to the next same-level header') and clarifying the include_children default behavior. No contradictions with annotations exist.

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 with a purpose statement, usage guidelines, parameter explanations, and return behavior—all in four focused sentences. Each sentence adds value without redundancy, and key information is front-loaded.

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?

Given the tool's moderate complexity, annotations covering safety/idempotency, and no output schema, the description is complete: it explains purpose, usage context, all parameters, and return behavior. It effectively bridges gaps left by the structured fields.

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

Parameters5/5

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

With 0% schema description coverage, the description fully compensates by explaining all three parameters: path ('Documentation file path'), header ('Header text to find'), and include_children ('Include nested subsections under the header'). It provides examples and clarifies the default value, adding essential meaning not in the schema.

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 ('Get a specific section') and resource ('from a documentation file by its header'), distinguishing it from siblings like get_doc (entire document) or list_sections (list headers only). It precisely defines the tool's scope and target.

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?

Explicit guidance is provided on when to use this tool: 'Use after list_sections() shows available headers, or after resolve_topic() / search_docs() identifies the relevant file.' This clearly directs the agent to prerequisite steps and names specific alternative tools for context establishment.

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