Skip to main content
Glama

get_project_stats

Retrieve statistics for a WebSim project to analyze performance metrics and usage data.

Instructions

Get statistics for a WebSim project

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idYesWebSim project ID

Implementation Reference

  • The handler function for the 'get_project_stats' tool. It validates input using ProjectIdSchema, calls the API client's getProjectStats method, and returns a formatted success response with the stats data.
    handler: async (args) => {
      const { project_id } = ProjectIdSchema.parse(args);
      const result = await apiClient.getProjectStats(project_id);
      return {
        content: [{
          type: "text",
          text: JSON.stringify({
            success: true,
            data: result,
            message: `Successfully retrieved statistics for project ${project_id}`
          }, null, 2)
        }]
      };
    }
  • Input schema for the 'get_project_stats' tool, defining the required 'project_id' parameter.
    inputSchema: {
      type: "object",
      properties: {
        project_id: {
          type: "string",
          description: "WebSim project ID"
        }
      },
      required: ["project_id"]
    },
  • server.js:408-435 (registration)
    Registration of the 'get_project_stats' tool object in the tools array used by the MCP server.
    {
      name: "get_project_stats",
      description: "Get statistics for a WebSim project",
      inputSchema: {
        type: "object",
        properties: {
          project_id: {
            type: "string",
            description: "WebSim project ID"
          }
        },
        required: ["project_id"]
      },
      handler: async (args) => {
        const { project_id } = ProjectIdSchema.parse(args);
        const result = await apiClient.getProjectStats(project_id);
        return {
          content: [{
            type: "text",
            text: JSON.stringify({
              success: true,
              data: result,
              message: `Successfully retrieved statistics for project ${project_id}`
            }, null, 2)
          }]
        };
      }
    },
  • API client helper method that fetches project statistics from the WebSim API endpoint.
    async getProjectStats(projectId) {
      return this.makeRequest(`/api/v1/projects/${projectId}/stats`);
    }
  • Zod schema used for input validation in the get_project_stats handler.
    const ProjectIdSchema = z.object({
      project_id: z.string().describe('WebSim project ID')
    });
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 states 'Get statistics' but doesn't clarify if this is a read-only operation, what permissions might be required, whether it's cached or real-time, or if there are rate limits. For a tool with zero annotation coverage, this leaves significant behavioral gaps, though it at least implies a non-destructive read.

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 front-loads the core purpose ('Get statistics for a WebSim project'). There's no wasted verbiage or redundancy, making it immediately scannable and appropriately sized for a simple tool with one parameter.

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 and output schema, the description is incomplete for a tool that likely returns complex statistical data. It doesn't hint at the structure or types of statistics returned (e.g., numeric metrics, time-series data), which could be critical for an AI agent to interpret results. With no structured fields to rely on, the description should do more to set expectations.

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, with the 'project_id' parameter fully documented in the schema. The description adds no additional parameter semantics beyond what's in the schema, such as format examples or constraints. Given the high schema coverage, a baseline score of 3 is appropriate, as the description doesn't compensate but also doesn't detract.

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 WebSim project'), making the purpose immediately understandable. It distinguishes from siblings like 'get_project_by_id' or 'get_project_assets' by focusing on statistics rather than project metadata or assets. However, it doesn't specify what types of statistics are included (e.g., usage metrics, performance data), 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_project_by_id', 'get_project_assets', and 'get_user_stats', there's no indication of whether this tool is for aggregated data, real-time metrics, or historical trends. It lacks explicit when/when-not instructions or named alternatives, leaving usage context unclear.

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