Skip to main content
Glama
baranwang

Trends Hub

get-bbc-news

Fetch BBC news articles across categories like world, UK, business, politics, health, education, technology, and entertainment to access global news coverage.

Instructions

获取 BBC 新闻,提供全球新闻、英国新闻、商业、政治、健康、教育、科技、娱乐等资讯

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
categoryNo
editionNo版本,仅对 `category` 为空有效

Implementation Reference

  • src/tools/bbc.ts:47-55 (registration)
    Tool registration defining name, description, schema, and thin handler function that delegates to getRssItems after schema parsing.
    export default defineToolConfig({
      name: 'get-bbc-news',
      description: '获取 BBC 新闻,提供全球新闻、英国新闻、商业、政治、健康、教育、科技、娱乐等资讯',
      zodSchema: bbcRequestSchema,
      func: async (args) => {
        const { url } = bbcRequestSchema.parse(args);
        return getRssItems(url);
      },
    });
  • Zod schema for tool input: category (news section) and edition, with transform to construct the BBC RSS feed URL.
    const bbcRequestSchema = z
      .object({
        category: z
          .union([
            z.literal('').describe('热门新闻'),
            z.literal('world').describe('国际'),
            z.literal('uk').describe('英国'),
            z.literal('business').describe('商业'),
            z.literal('politics').describe('政治'),
            z.literal('health').describe('健康'),
            z.literal('education').describe('教育'),
            z.literal('science_and_environment').describe('科学与环境'),
            z.literal('technology').describe('科技'),
            z.literal('entertainment_and_arts').describe('娱乐与艺术'),
          ])
          .optional()
          .default(''),
        edition: z
          .union([
            z.literal(''),
            z.literal('uk').describe('UK'),
            z.literal('us').describe('US & Canada'),
            z.literal('int').describe('Rest of the world'),
          ])
          .optional()
          .default('')
          .describe('版本,仅对 `category` 为空有效'),
      })
      .transform((values) => {
        let url = 'https://feeds.bbci.co.uk/news/';
        if (values.category) {
          url += `${values.category}/`;
        }
        url += 'rss.xml';
        if (values.edition) {
          url += `?edition=${values.edition}`;
        }
        return {
          ...values,
          url,
        };
      });
  • Core utility function that fetches and parses RSS feed XML, extracting structured news items (title, description, category, author, pub date, link).
    export const getRssItems = async (url: string) => {
      const data = await getRss(url);
      if (!Array.isArray(data.rss?.channel?.item)) {
        return [];
      }
      return (data.rss.channel.item as any[]).map((item) => {
        let category = '';
        if (typeof item.category === 'string') {
          category = item.category;
        }
        if (Array.isArray(item.category)) {
          category = item.category.join(', ');
        }
        return {
          title: item.title,
          description: item.description,
          category,
          author: item.author || item['dc:creator'],
          publish_time: item.pubDate,
          link: item.link,
        };
      });
    };
Behavior2/5

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

No annotations are provided, so the description carries full burden for behavioral disclosure. The description mentions what content is available but doesn't describe how the tool behaves: it doesn't specify whether this is a read-only operation, how results are returned (e.g., format, pagination, limits), whether authentication is needed, or any rate limits. For a tool with no annotations, this leaves significant behavioral questions unanswered.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately concise - a single sentence that efficiently lists available content categories. It's front-loaded with the main purpose ('获取 BBC 新闻') followed by supporting details. While it could be slightly more structured, there's no wasted verbiage.

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, no output schema, and 2 parameters with only 50% schema coverage, the description is incomplete. It adequately states what content is available but doesn't address behavioral aspects, return format, or parameter usage. For a news-fetching tool with multiple similar siblings, more context about when and how to use it would be valuable.

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

Parameters3/5

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

Schema description coverage is 50% (only 'category' parameter has descriptions, 'edition' has minimal description). The description doesn't mention parameters at all, failing to compensate for the schema's partial coverage. However, since there are only 2 parameters and the schema provides enum values with descriptions for 'category', the baseline is 3. The description adds no parameter semantics beyond what's in the schema.

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 tool's purpose: '获取 BBC 新闻' (get BBC news) followed by a list of content categories. It specifies the resource (BBC news) and scope (global, UK, business, politics, etc.), but doesn't explicitly differentiate from sibling tools that also fetch news from other sources like NYTimes or TheVerge. The description is specific about what content is available, though it could better distinguish this BBC-specific tool from other news-fetching siblings.

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. With multiple sibling tools that fetch news from different sources (e.g., get-nytimes-news, get-theverge-news), there's no indication of when BBC news is preferable or what makes this tool distinct. The description only lists available categories without contextual usage advice.

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/baranwang/mcp-trends-hub'

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