Skip to main content
Glama

get_user_stats

Retrieve statistics for a WebSim user to analyze their activity and performance within the platform.

Instructions

Get statistics for a specific WebSim user

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
userYesUsername

Implementation Reference

  • The handler function for the 'get_user_stats' MCP tool. It validates the input arguments using UserParamsSchema, calls the apiClient.getUserStats method to fetch data from the WebSim API, and returns a formatted text content response with the results.
    handler: async (args) => {
      const { user } = UserParamsSchema.parse(args);
      const result = await apiClient.getUserStats(user);
      return {
        content: [{
          type: "text",
          text: JSON.stringify({
            success: true,
            data: result,
            message: `Successfully retrieved statistics for user ${user}`
          }, null, 2)
        }]
      };
  • The inputSchema definition for the 'get_user_stats' tool, specifying the required 'user' parameter as a string.
    inputSchema: {
      type: "object",
      properties: {
        user: {
          type: "string",
          description: "Username"
        }
      },
      required: ["user"]
    },
  • server.js:502-528 (registration)
    The complete tool registration object for 'get_user_stats' within the tools array, which is used by the MCP server's ListToolsRequestHandler and CallToolRequestHandler.
    {
      name: "get_user_stats",
      description: "Get statistics for a specific WebSim user",
      inputSchema: {
        type: "object",
        properties: {
          user: {
            type: "string",
            description: "Username"
          }
        },
        required: ["user"]
      },
      handler: async (args) => {
        const { user } = UserParamsSchema.parse(args);
        const result = await apiClient.getUserStats(user);
        return {
          content: [{
            type: "text",
            text: JSON.stringify({
              success: true,
              data: result,
              message: `Successfully retrieved statistics for user ${user}`
            }, null, 2)
          }]
        };
      }
  • Supporting utility method in the WebSimAPIClient class that performs the HTTP request to retrieve user statistics from the WebSim API endpoint.
    async getUserStats(user) {
      return this.makeRequest(`/api/v1/users/${user}/stats`);
    }
  • Zod validation schema for user parameters, used in the handler for input parsing.
    const UserParamsSchema = z.object({
      user: z.string().describe('Username')
    });
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states this is a 'Get' operation (implying read-only), but doesn't disclose any behavioral traits like authentication requirements, rate limits, error conditions, or what format the statistics are returned in. For a statistics tool with zero annotation coverage, this leaves significant behavioral gaps unaddressed.

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 a single, efficient sentence that communicates the core purpose without any wasted words. It's appropriately sized for a simple tool with one parameter and gets straight to the point. Every word earns its place in this minimal but complete statement of function.

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 the lack of annotations, no output schema, and the description's minimalism, this is incomplete for a statistics tool. The description doesn't explain what statistics are returned, their format, or any behavioral considerations. While the purpose is clear, the context needed for effective tool selection and invocation is insufficient, especially compared to richer sibling tools in the same server.

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 schema description coverage is 100% with the single parameter 'user' documented as 'Username'. The description adds no additional parameter semantics beyond what the schema already provides. According to scoring rules, when schema coverage is high (>80%), the baseline is 3 even with no param info in the description, which applies here.

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 verb 'Get' and resource 'statistics for a specific WebSim user', making the purpose immediately understandable. It distinguishes from siblings like 'get_user' or 'get_user_followers' by focusing on statistics rather than basic user info or social connections. However, it doesn't specify what types of statistics are included, keeping it from a perfect score.

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 siblings like 'get_user' (likely basic user info), 'get_user_followers/following' (social data), and 'get_project_stats' (project-level statistics), there's clear potential for confusion about which tool to select for different statistical needs. The description offers no when/when-not guidance or named alternatives.

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/gigachadtrey/websimm'

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