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

NameRequiredDescriptionDefault
project_idYesWebSim project ID

Input Schema (JSON Schema)

{ "properties": { "project_id": { "description": "WebSim project ID", "type": "string" } }, "required": [ "project_id" ], "type": "object" }

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') });

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