Skip to main content
Glama
jbenton

guardian-mcp-server

by jbenton

guardian_get_sections

Retrieve all available Guardian newspaper sections to browse and access content categories from the complete archives.

Instructions

Get all available Guardian sections

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The core handler function that executes the guardian_get_sections tool: calls client.getSections() and formats the results.
    export async function guardianGetSections(client: GuardianClient, args: any): Promise<string> {
      const response = await client.getSections();
      const sections = response.response.results;
    
      return formatSectionsResponse(sections);
    }
  • The input schema definition (empty properties since no parameters needed) for the tool as registered in the MCP server.
    {
      name: 'guardian_get_sections',
      description: 'Get all available Guardian sections',
      inputSchema: {
        type: 'object',
        properties: {},
      },
    },
  • The registration mapping of the tool name to its handler function within the registerTools utility.
    guardian_get_sections: (args) => guardianGetSections(client, args),
  • Supporting utility function that formats the raw sections data into a user-readable markdown list.
    export function formatSectionsResponse(sections: GuardianSection[]): string {
      if (!sections || sections.length === 0) {
        return 'No sections found.';
      }
    
      let result = 'Available Guardian sections:\n\n';
    
      sections.forEach((section) => {
        result += `**${section.webTitle || 'Unknown'}**\n`;
        result += `ID: ${section.id || 'N/A'}\n`;
        result += `URL: ${section.webUrl || 'N/A'}\n\n`;
      });
    
      return result;
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states what the tool does but fails to describe key traits: whether it's a read-only operation, if it requires authentication, potential rate limits, the format of returned data (e.g., list of section names with IDs), or any pagination behavior. This leaves significant gaps for an agent to understand how to interact with the tool effectively.

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 directly states the tool's function without any fluff or redundant information. It is front-loaded with the core action and resource, making it efficient and easy to parse. Every word earns its place by conveying essential information.

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 minimally adequate. It explains what the tool does but lacks details on behavioral aspects like authentication needs or return format, which are important for a read operation. Without annotations or output schema, the description should provide more context to be fully complete, but it meets the basic requirement for a straightforward tool.

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 tool has 0 parameters, and the input schema has 100% description coverage (though empty). The description does not need to compensate for any parameter gaps, as there are none to document. It appropriately focuses on the tool's purpose without unnecessary parameter details, aligning 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 action ('Get') and the resource ('all available Guardian sections'), making the purpose immediately understandable. It distinguishes this from siblings like guardian_browse_section (which likely retrieves content within a specific section) and guardian_search (which searches across content). However, it doesn't specify the verb 'list' or 'retrieve' explicitly, which slightly reduces precision.

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

Usage Guidelines3/5

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

The description implies usage when needing all sections, but provides no explicit guidance on when to use this versus alternatives like guardian_browse_section or guardian_search. It lacks context about prerequisites, such as whether authentication is required or if this is a foundational step for other operations. The usage is inferred from the purpose but not explicitly stated.

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/jbenton/guardian-mcp-server'

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