Skip to main content
Glama
TaylorChen

Multi-MCPs

by TaylorChen

get_top_headlines

Retrieve top news headlines by country and category through the Multi-MCPs server, which aggregates multiple third-party APIs for unified access to web services.

Instructions

Get top headlines by country and category

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
countryNo
categoryNo

Implementation Reference

  • Tool registration for 'get_top_headlines' including name, description, and input schema.
    {
      name: "get_top_headlines",
      description: "Get top headlines by country and category",
      inputSchema: {
        type: "object",
        properties: {
          country: { type: "string" },
          category: { type: "string" },
        },
      },
    },
  • Handler implementation for the 'get_top_headlines' tool, which validates the API key and delegates to the NewsApiClient's topHeadlines method.
    async get_top_headlines(args: Record<string, unknown>) {
      if (!cfg.newsApiKey) throw new Error("NEWS_API_KEY is not configured");
      const country = args.country ? String(args.country) : undefined;
      const category = args.category ? String(args.category) : undefined;
      return client.topHeadlines(country, category);
    },
  • Helper method in NewsApiClient class that performs the actual API request to retrieve top headlines.
    topHeadlines(country?: string, category?: string) {
      return this.request("/v2/top-headlines", {
        headers: { Authorization: `Bearer ${this.apiKey}` },
        query: { country, category },
      });
    }
  • Input schema definition for the 'get_top_headlines' tool, specifying optional country and category parameters.
    inputSchema: {
      type: "object",
      properties: {
        country: { type: "string" },
        category: { type: "string" },
      },
    },
Behavior2/5

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

With no annotations provided, the description carries full burden but only states the basic function. It doesn't disclose behavioral traits like rate limits, authentication needs, pagination, response format, or whether it's a read-only operation. For a news API tool, this leaves significant gaps.

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, efficient sentence with no wasted words. It's appropriately sized for a simple tool and front-loads the core functionality.

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

Completeness2/5

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

Given no annotations, 0% schema coverage, and no output schema, the description is incomplete. It doesn't explain what 'top headlines' means (e.g., recency, popularity), return values, or error handling. For a 2-parameter tool with no structured documentation, this is inadequate.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the schema provides no parameter documentation. The description mentions 'by country and category' which maps to the two parameters but adds minimal semantic context—no details on valid values, formats, or examples. It doesn't compensate for the schema's lack of descriptions.

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 'Get' and resource 'top headlines', with filtering by 'country and category'. It's specific about what the tool does, though it doesn't explicitly differentiate from sibling 'search_news' which might have overlapping functionality.

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?

No guidance is provided on when to use this tool versus alternatives like 'search_news'. The description mentions filtering by country and category but doesn't specify if these are required, optional, or what the default behavior is when omitted.

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/TaylorChen/muti-mcps'

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