Skip to main content
Glama

get_project_by_id

Retrieve a WebSim project using its unique ID to access and view project details through the WebSim MCP Server.

Instructions

Get a WebSim project by its ID

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

  • MCP tool handler for get_project_by_id: parses input args using Zod schema, calls the API client helper, formats and returns JSON response as text content.
    handler: async (args) => { const { project_id } = ProjectIdSchema.parse(args); const result = await apiClient.getProjectById(project_id); return { content: [{ type: "text", text: JSON.stringify({ success: true, data: result, message: `Successfully retrieved project ${project_id}` }, null, 2) }] }; }
  • MCP input schema for the get_project_by_id tool defining the project_id parameter.
    inputSchema: { type: "object", properties: { project_id: { type: "string", description: "WebSim project ID" } }, required: ["project_id"] },
  • server.js:239-266 (registration)
    Full tool definition object for get_project_by_id registered in the tools array used by MCP server request handlers.
    { name: "get_project_by_id", description: "Get a WebSim project by its ID", 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.getProjectById(project_id); return { content: [{ type: "text", text: JSON.stringify({ success: true, data: result, message: `Successfully retrieved project ${project_id}` }, null, 2) }] }; } },
  • Zod schema for validating the project_id input parameter used in the tool handler.
    const ProjectIdSchema = z.object({ project_id: z.string().describe('WebSim project ID') });
  • WebSimAPIClient helper method that performs the HTTP request to fetch project data by ID from the WebSim API.
    async getProjectById(projectId) { return this.makeRequest(`/api/v1/projects/${projectId}`); }

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