Skip to main content
Glama
WhenYouAreStrange

goodbook-mcp

list_sections

Retrieve all available sections from food service standards documents to navigate content structure and access preparation guidelines efficiently.

Instructions

List all available sections in the food service standards document

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The core handler function that implements the 'list_sections' tool logic. It fetches sections from the PDF parser and formats a numbered list with details.
    async function listSections() { const sections = pdfParser.getSections(); let response = "Available sections in the food standards document:\n\n"; sections.forEach((section, index) => { response += `${index + 1}. ${section.name}\n`; response += ` Content length: ${section.contentLength} items\n`; response += ` Preview: ${section.preview}\n\n`; }); return { content: [{ type: "text", text: response }] }; }
  • src/index.js:232-234 (registration)
    Tool dispatch/registration in the MCP CallToolRequestSchema handler switch statement.
    case "list_sections": { return await listSections(); }
  • Tool definition registration in the toolDefinitions array used for ListToolsRequestSchema, including name, description, and input schema.
    { name: "list_sections", description: "List all available sections in the food service standards document", inputSchema: { type: "object", properties: {}, required: [] }
  • Alternative class-based handler for 'list_sections' in GoodbookTools class (used in tests).
    async listSections() { const sections = this.pdfParser.getSections(); let response = "Available sections in the food standards document:\n\n"; sections.forEach((section, index) => { response += `${index + 1}. ${section.name}\n`; response += ` Content length: ${section.contentLength} items\n`; response += ` Preview: ${section.preview}\n\n`; }); return { content: [{ type: "text", text: response }] }; }
  • Tool schema definition in GoodbookTools.getToolDefinitions() method.
    { name: "list_sections", description: "List all available sections in the food service standards document", inputSchema: { type: "object", properties: {}, required: [] } },

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/WhenYouAreStrange/goodbook-mcp'

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