Skip to main content
Glama

get_stats

Retrieve unread article counts and feed statistics from FreshRSS to monitor RSS feed activity and track reading progress.

Instructions

Get unread counts and statistics

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The implementation of the get_stats tool handler, which fetches and formats statistics from the FreshRSS client.
    wrapTool('get_stats', async () => {
      const stats = await client.stats.getStatistics();
    
      const lines = [
        `## FreshRSS Statistics`,
        `**Total Unread:** ${stats.totalUnread.toString()}`,
        '',
        '### Top Feeds by Unread Count',
      ];
    
      const topFeeds = stats.feeds.sort((a, b) => b.count - a.count).slice(0, 10);
    
      for (const feed of topFeeds) {
        const feedId = feed.id.replace('feed/', '');
        lines.push(`- ${feedId}: ${feed.count.toString()} unread`);
      }
    
      if (stats.categories.length > 0) {
        lines.push('', '### Categories');
        for (const cat of stats.categories) {
          const name = cat.id.replace('user/-/label/', '');
          lines.push(`- ${name}: ${cat.count.toString()} unread`);
        }
      }
    
      return textResult(lines.join('\n'));
    })
  • Registration of the get_stats tool within the MCP server.
    server.registerTool(
      'get_stats',
      {
        description: 'Get unread counts and statistics',
        inputSchema: z.object({}).strict(),
      },
Behavior2/5

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

With no annotations provided, the description must carry the full behavioral burden. While 'Get' implies a read-only operation, the description fails to disclose idempotency, caching behavior, computational cost, or the structure of the returned statistics.

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

Conciseness3/5

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

The description is extremely brief (four words) with no wasted content, but it borders on underspecification. It is front-loaded but lacks the necessary detail to be truly helpful without additional context.

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 absence of an output schema, the description partially compensates by mentioning 'unread counts and statistics' as return categories. However, it omits the structure, format, or specific statistical metrics (total feeds, per-feed counts, etc.) that would make it complete for a zero-parameter 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 input schema has zero parameters and 100% coverage trivially. According to scoring rules, this establishes a baseline of 4. No parameter semantics are needed or provided in the description.

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

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states the basic action ('Get') and target data ('unread counts and statistics'), but 'statistics' remains vague about what specific metrics are returned. While 'unread counts' provides some specificity in the context of the feed-reader sibling tools, it lacks the granular resource scoping seen in top-tier definitions.

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 provided on when to use this versus siblings like 'list_unread_article_ids' (which returns IDs rather than counts) or 'get_user_info'. No prerequisites or conditions are mentioned.

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/alysson-souza/freshrss-mcp'

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