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

TableJSON Schema
NameRequiredDescriptionDefault
project_idYesWebSim project ID

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}`);
    }
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It only states the basic action ('Get') without detailing whether this is a read-only operation, what permissions are needed, how errors are handled, or what the return format looks like. This leaves significant gaps for a tool that presumably fetches data.

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 directly states the tool's purpose without any unnecessary words. It is appropriately sized and front-loaded, making it easy to understand at a glance.

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. It doesn't explain what data is returned (e.g., project details, structure), potential errors, or behavioral traits like idempotency or rate limits, which are important for a data-fetching tool in a context with many sibling tools.

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 single parameter 'project_id' documented as 'WebSim project ID'. The description adds no additional meaning beyond this, so it meets the baseline of 3 where the schema does the heavy lifting.

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 ('a WebSim project'), making the purpose understandable. However, it doesn't distinguish this tool from sibling tools like 'get_project_by_slug' or 'list_all_projects', which would require explicit differentiation for a score of 5.

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. It doesn't mention when to choose 'get_project_by_id' over 'get_project_by_slug' or 'list_all_projects', nor does it specify any prerequisites or exclusions for usage.

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