list_sections
Discover and retrieve all available documentation sections dynamically from Tambo Docs MCP Server to efficiently navigate technical content.
Instructions
Dynamically discover and list all available documentation sections
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/doc-handler.ts:183-218 (handler)The `listSections` method in the `DocHandler` class implements the core logic for the 'list_sections' tool. It ensures documentation sections are loaded (via `discover_docs` if needed), groups them by category, and returns a formatted markdown list of all available sections.async listSections(): Promise<CallToolResult> { await this.ensureSectionsLoaded(); if (this.sections.length === 0) { return { content: [ { type: 'text', text: 'No documentation sections discovered. Try running discover_docs first.', }, ], }; } const grouped = this.sections.reduce((acc, section) => { const category = section.category || 'Other'; if (!acc[category]) acc[category] = []; acc[category].push(section); return acc; }, {} as Record<string, DocSection[]>); const output = Object.entries(grouped) .map(([category, sections]) => `## ${category}\n${sections.map(s => `• **${s.title}** - ${s.path}`).join('\n')}` ) .join('\n\n'); return { content: [ { type: 'text', text: `Available documentation sections (${this.sections.length} total):\n\n${output}`, }, ], }; }
- src/server.ts:63-70 (registration)Registration of the 'list_sections' tool in the `ListToolsRequestHandler`. Defines the tool's name, description, and input schema (no required parameters).{ name: 'list_sections', description: 'Dynamically discover and list all available documentation sections', inputSchema: { type: 'object', properties: {}, }, },
- src/server.ts:92-93 (registration)Dispatch handler in the `CallToolRequestHandler` that routes calls to 'list_sections' to the `DocHandler.listSections()` method.case 'list_sections': return await this.docHandler.listSections();