Skip to main content
Glama

get_swiss_news

Retrieve Swiss news headlines from SRF across categories like domestic, international, and economy. Returns articles with titles, descriptions, links, and publication dates.

Instructions

Get the latest Swiss news headlines from SRF (Schweizer Radio und Fernsehen). Returns top news articles with title, description, link, and publication date.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
categoryNoNews category. "switzerland" = domestic Swiss news (default), "international" = world news, "economy" = business & economy.
limitNoNumber of articles to return (default: 10, max: 50)

Implementation Reference

  • The main handler function for the get_swiss_news tool, which fetches and processes RSS news feeds from SRF.
    export async function handleGetSwissNews(args: {
      category?: string;
      limit?: number;
    }): Promise<string> {
      const category = args.category ?? "switzerland";
      const limit = Math.min(args.limit ?? 10, 50);
    
      const feedId = FEED_IDS[category];
      if (!feedId) {
        const valid = Object.keys(FEED_IDS).join(", ");
        throw new Error(`Unknown category "${category}". Valid categories: ${valid}`);
      }
    
      const xml = await fetchFeed(feedId);
      const allItems = parseRssItems(xml);
      const items = allItems.slice(0, limit);
    
      const result = {
        category,
        count: items.length,
        total_available: allItems.length,
        articles: items,
        source: "srf.ch",
      };
    
      const json = JSON.stringify(result, null, 2);
      if (json.length > 49000) {
        // Truncate descriptions if needed
  • Tool definition and registration block for get_swiss_news, including its description and input schema.
    {
      name: "get_swiss_news",
      description:
        "Get the latest Swiss news headlines from SRF (Schweizer Radio und Fernsehen). Returns top news articles with title, description, link, and publication date.",
      inputSchema: {
        type: "object" as const,
        properties: {
          category: {
            type: "string",
            enum: ["switzerland", "international", "economy"],
            description:
              'News category. "switzerland" = domestic Swiss news (default), "international" = world news, "economy" = business & economy.',
          },
          limit: {
            type: "number",
  • Switch case handling the invocation of get_swiss_news.
    case "get_swiss_news":
      return handleGetSwissNews(args as { category?: "switzerland" | "international" | "economy"; limit?: number });
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 mentions the data source (SRF) and return format, but lacks details on rate limits, authentication needs, error handling, or whether the operation is read-only (implied but not stated). For a tool with no annotations, this leaves significant behavioral 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 front-loaded with the core purpose in the first sentence and efficiently adds return details in the second. Both sentences earn their place by providing essential information without redundancy or fluff, making it appropriately sized and well-structured.

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 moderate complexity (2 parameters, no output schema, no annotations), the description covers the basic purpose and return format adequately. However, it lacks details on behavioral aspects like rate limits or error handling, which would be beneficial for a tool with no annotations, making it minimally complete but with clear gaps.

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?

The input schema has 100% description coverage, clearly documenting both parameters with enums and defaults. The description does not add any parameter-specific semantics beyond what the schema provides, so it meets the baseline score of 3 where the schema does the heavy lifting.

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

Purpose5/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 with specific verbs ('Get the latest Swiss news headlines') and resources ('from SRF'), distinguishing it from sibling tools like 'search_swiss_news' by focusing on top headlines rather than search functionality. It specifies the return format (articles with title, description, link, publication date).

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 for retrieving latest headlines, but does not explicitly state when to use this tool versus alternatives like 'search_swiss_news'. No guidance on prerequisites, exclusions, or specific contexts is provided, leaving usage context inferred rather than clearly defined.

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/vikramgorla/mcp-swiss'

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