Skip to main content
Glama
WhenYouAreStrange

goodbook-mcp

list_sections

Retrieve all available sections from food service standards documents to quickly navigate preparation guidelines and compliance requirements.

Instructions

List all available sections in the food service standards document

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Primary handler function implementing the list_sections MCP tool. Fetches sections using PDFParser.getSections() and formats a detailed text response listing all available sections with previews.
    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
        }]
      };
    }
  • Secondary handler function in GoodbookTools class implementing identical list_sections logic.
    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
        }]
      };
    }
  • Core helper method that generates the list of sections from parsed PDF content, providing name, length, and preview for each section.
    getSections() {
      return Object.keys(this.sections).map(name => ({
        name,
        contentLength: this.sections[name].length,
        preview: this.sections[name].slice(0, 3).join(' ').substring(0, 200) + '...'
      }));
    }
  • JSON schema definition for the list_sections tool, specifying no input parameters are required.
    name: "list_sections",
    description: "List all available sections in the food service standards document",
    inputSchema: {
      type: "object",
      properties: {},
      required: []
    }
  • src/index.js:204-210 (registration)
    Registration handler for list_tools MCP request, which returns the toolDefinitions array including list_sections.
    server.setRequestHandler(ListToolsRequestSchema, async () => {
      console.error("Received list_tools request");
      await ensureInitialized();
      return {
        tools: toolDefinitions
      };
    });
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the action ('List all available sections') but doesn't add context such as whether this is a read-only operation, if it requires authentication, rate limits, or what the output format might be. This leaves significant gaps in understanding the tool's behavior.

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 a single, clear sentence that efficiently conveys the tool's purpose without any wasted words. It is front-loaded and appropriately sized for a simple tool, making it easy to parse and understand quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (0 parameters, no output schema, no annotations), the description is adequate but has clear gaps. It states what the tool does but lacks behavioral context and usage guidelines, which are important even for simple tools to ensure correct invocation and integration with siblings.

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?

The input schema has 0 parameters with 100% coverage, so no parameter documentation is needed. The description appropriately doesn't discuss parameters, focusing instead on the tool's purpose, which aligns with the baseline for zero parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('List') and resource ('sections in the food service standards document'), making the purpose specific and understandable. However, it doesn't explicitly differentiate from sibling tools like 'get_section_content' or 'search_food_standards', which might also involve sections, so it doesn't fully achieve sibling distinction.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites, context, or exclusions, leaving the agent to infer usage based on the name alone, which is insufficient for optimal tool selection.

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

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