Skip to main content
Glama
manimohans

The Verge News MCP Server

by manimohans

get-weekly-news

Retrieve news articles from The Verge published in the past seven days to stay informed about technology and culture developments.

Instructions

Get the latest news from The Verge for the past week

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The core handler logic for the 'get-weekly-news' tool. It fetches the latest RSS feed from The Verge, filters articles from the past 7 days, randomly selects 10 articles, formats them into brief summaries, and returns the result as structured text content. Includes error handling with console logging and error response.
    async () => {
      try {
        const allNews = await fetchVergeNews();
        const weeklyNews = filterNewsByDate(allNews, 7); // Last 7 days
        
        // Randomly select 10 news items from the past week
        const randomWeeklyNews = getRandomNewsItems(weeklyNews, 10);
        
        const formattedNews = formatNewsItems(randomWeeklyNews);
        const newsText = formatNewsAsBriefSummary(formattedNews);
        
        return {
          content: [
            {
              type: "text",
              text: `# The Verge - Random Weekly News\n\n${newsText}`
            }
          ]
        };
      } catch (error) {
        console.error("Error in get-weekly-news:", error);
        return {
          content: [
            {
              type: "text",
              text: `Error fetching weekly news: ${error instanceof Error ? error.message : String(error)}`
            }
          ],
          isError: true
        };
      }
    }
  • src/index.ts:179-216 (registration)
    The registration of the 'get-weekly-news' tool using McpServer.tool(). Specifies the tool name, description, empty input schema ({}), and references the inline handler function.
    // Register tool for weekly news
    server.tool(
      "get-weekly-news",
      "Get the latest news from The Verge for the past week",
      {},
      async () => {
        try {
          const allNews = await fetchVergeNews();
          const weeklyNews = filterNewsByDate(allNews, 7); // Last 7 days
          
          // Randomly select 10 news items from the past week
          const randomWeeklyNews = getRandomNewsItems(weeklyNews, 10);
          
          const formattedNews = formatNewsItems(randomWeeklyNews);
          const newsText = formatNewsAsBriefSummary(formattedNews);
          
          return {
            content: [
              {
                type: "text",
                text: `# The Verge - Random Weekly News\n\n${newsText}`
              }
            ]
          };
        } catch (error) {
          console.error("Error in get-weekly-news:", error);
          return {
            content: [
              {
                type: "text",
                text: `Error fetching weekly news: ${error instanceof Error ? error.message : String(error)}`
              }
            ],
            isError: true
          };
        }
      }
    );
  • Helper utility specifically used by get-weekly-news to randomly select 10 news items from the filtered weekly news list, ensuring no duplicates.
    function getRandomNewsItems(items: Parser.Item[], count: number = 10) {
      if (items.length <= count) {
        return items; // Return all items if there are fewer than requested
      }
      
      // Create a copy of the array to avoid modifying the original
      const itemsCopy = [...items];
      const result: Parser.Item[] = [];
      
      // Randomly select 'count' items
      for (let i = 0; i < count; i++) {
        if (itemsCopy.length === 0) break;
        
        // Get a random index
        const randomIndex = Math.floor(Math.random() * itemsCopy.length);
        
        // Add the randomly selected item to the result
        result.push(itemsCopy[randomIndex]);
        
        // Remove the selected item to avoid duplicates
        itemsCopy.splice(randomIndex, 1);
      }
      
      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 full burden. It states what the tool does but lacks behavioral details like whether it returns a list or single item, pagination, rate limits, authentication requirements, or error conditions. 'Get' suggests a read operation, but no safety or performance characteristics are disclosed.

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?

Single sentence, front-loaded with the core action, zero waste. Every word contributes to understanding the tool's function without redundancy.

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?

For a tool with no annotations, no output schema, and no parameters, the description is incomplete. It lacks details on return format (e.g., list of articles, metadata), error handling, or any behavioral traits needed for reliable agent use, given the complexity of news retrieval.

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?

With 0 parameters and 100% schema description coverage, the baseline is 4. The description adds context about the time frame ('past week') and source ('The Verge'), which is meaningful beyond the empty schema, though minimal.

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 resource ('latest news from The Verge for the past week'), making the purpose understandable. It distinguishes from 'get-daily-news' by specifying weekly scope, but doesn't explicitly differentiate from 'search-news' which might also retrieve news.

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 explicit guidance on when to use this tool versus alternatives like 'get-daily-news' or 'search-news'. The description implies usage for weekly news from The Verge, but doesn't clarify scenarios where other tools would be more appropriate.

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/manimohans/verge-news-mcp'

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