Skip to main content
Glama

list-sections

Lists all documentation sections for Macroforge to help users find relevant information by analyzing use cases and categories before retrieving specific documentation.

Instructions

Lists all Macroforge documentation sections.

Returns sections with:

  • title: Section name

  • use_cases: When this doc is useful (comma-separated keywords)

  • path: File path

  • category: Category name

WORKFLOW:

  1. Call list-sections FIRST for any Macroforge-related task

  2. Analyze use_cases to find relevant sections

  3. Call get-documentation with ALL relevant section names

Example use_cases: "setup, install", "serialization, json", "validation, email"

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The primary handler function that implements the logic for the 'list-sections' tool. It filters the cached documentation sections to show only top-level sections (excluding sub-chunks), formats them with title, use_cases, path, and category, and returns a formatted text response.
    function handleListSections() { // Filter out sub-chunks (sections with parent_id) - only show top-level sections const topLevelSections = sections.filter((s) => !s.parent_id); const formatted = topLevelSections .map( (s) => `* title: [${s.title}], use_cases: [${s.use_cases}], path: [${s.path}], category: [${s.category_title}]` ) .join('\n'); return { content: [ { type: 'text' as const, text: `Available Macroforge documentation sections:\n\n${formatted}`, }, ], }; }
  • The registration of the 'list-sections' tool in the ListToolsRequestSchema handler, providing the tool's name, detailed description of its purpose and workflow, and inputSchema (empty object as the tool takes no parameters).
    { name: 'list-sections', description: `Lists all Macroforge documentation sections. Returns sections with: - title: Section name - use_cases: When this doc is useful (comma-separated keywords) - path: File path - category: Category name WORKFLOW: 1. Call list-sections FIRST for any Macroforge-related task 2. Analyze use_cases to find relevant sections 3. Call get-documentation with ALL relevant section names Example use_cases: "setup, install", "serialization, json", "validation, email"`, inputSchema: { type: 'object', properties: {}, }, },
  • The input schema definition for the 'list-sections' tool, specifying an empty object since no input parameters are required.
    inputSchema: { type: 'object', properties: {}, },
  • The dispatch case in the CallToolRequestSchema handler that routes 'list-sections' tool calls to the handleListSections function.
    case 'list-sections': return handleListSections();
  • src/index.ts:79-79 (registration)
    Invocation of registerTools which sets up all tool handlers and registrations, including for 'list-sections'.
    registerTools(server);

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/macroforge-ts/mcp-server'

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