Skip to main content
Glama

feedback_stats

Read-only

Analyze feedback data to generate actionable insights and recommendations for improving user experience and system performance.

Instructions

Get feedback stats and recommendations

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The `handleFeedbackStats` function retrieves recent feedback, calculates up/down vote counts, and aggregates tag frequencies to return a summary of feedback statistics.
    async function handleFeedbackStats(
      params: Record<string, unknown>,
      ownerId: string,
      env: Env,
    ): Promise<ToolResult> {
      const limit = (params.limit as number) ?? 100;
      const entries = await listFeedback(env, ownerId, limit);
    
      const up = entries.filter((e) => e.feedback === 'up').length;
      const down = entries.filter((e) => e.feedback === 'down').length;
      const total = entries.length;
    
      const tagCounts: Record<string, number> = {};
      for (const entry of entries) {
        for (const tag of entry.tags) {
          tagCounts[tag] = (tagCounts[tag] ?? 0) + 1;
        }
      }
    
      const topTags = Object.entries(tagCounts)
        .sort((a, b) => b[1] - a[1])
        .slice(0, 10)
        .map(([tag, count]) => ({ tag, count }));
    
      return textResult(
        JSON.stringify({
          total,
          up,
          down,
          ratio: total > 0 ? (up / total).toFixed(2) : '0.00',
          topTags,
        }),
      );
    }
  • Tool registration for 'feedback_stats' in the main MCP handler switch block.
    case 'feedback_stats':
      return handleFeedbackStats(params, ownerId, env);
    case 'prevention_rules':
Behavior3/5

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

The annotations indicate readOnlyHint=true, which the description aligns with by using 'Get' (implying a read operation). However, the description adds minimal behavioral context beyond this—it doesn't detail what 'stats and recommendations' entail, potential rate limits, or authentication needs. With annotations covering safety, it meets a baseline but lacks enrichment.

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 a single, efficient sentence with no wasted words, making it easy to parse. However, it's front-loaded but could be more structured if it included brief context or differentiation.

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 has no parameters, annotations provide read-only safety, and no output schema exists, the description is minimally adequate. It states the purpose but lacks details on output format or behavioral nuances, leaving gaps in completeness for a tool that might return complex data like 'stats and recommendations'.

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 0 parameters with 100% coverage, so no parameter documentation is needed. The description doesn't add parameter details, which is acceptable here, but it could have clarified semantics like what 'feedback' includes. Baseline is high due to no parameters.

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 'Get feedback stats and recommendations' states the general purpose (retrieving statistics and recommendations related to feedback) but lacks specificity about what 'feedback' refers to or how it distinguishes from siblings like 'feedback_summary' or 'capture_feedback'. It's vague about the resource scope and doesn't clearly differentiate from similar tools.

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 such as 'feedback_summary' or 'capture_feedback'. The description implies it's for retrieving data but doesn't specify contexts, prerequisites, or exclusions, leaving the agent without usage direction.

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/IgorGanapolsky/mcp-memory-gateway'

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