Skip to main content
Glama

get_project

Retrieve project details from the MCP-APIKit server by providing a project ID to access API information and manage integrations.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectIdYesProject ID

Implementation Reference

  • The handler function that executes the 'get_project' MCP tool logic: fetches the project by ID using eolinkService and returns it as JSON text content.
    async ({ projectId }) => {
      const project = await eolinkService.getProject(projectId);
      return {
        content: [{ 
          type: "text", 
          text: JSON.stringify({ project }, null, 2) 
        }]
      };
    }
  • Input schema definition for the 'get_project' tool using Zod.
    { projectId: z.string().describe("Project ID") },
  • Registration of the 'get_project' tool on the MCP server instance using the SDK's tool() method.
    this.server.tool(
      "get_project",
      { projectId: z.string().describe("Project ID") },
      async ({ projectId }) => {
        const project = await eolinkService.getProject(projectId);
        return {
          content: [{ 
            type: "text", 
            text: JSON.stringify({ project }, null, 2) 
          }]
        };
      }
    );
  • Helper method in eolinkService that performs the actual HTTP GET request to retrieve a project by ID from the Eolink API.
    async getProject(projectId: string): Promise<Project | null> {
      try {
        const response = await axios.get(`${this.baseUrl}/projects/${projectId}`, {
          headers: this.getHeaders(),
        });
        return response.data.data || null;
      } catch (error) {
        console.error(`Error fetching project ${projectId}:`, error);
        return null;
      }
    }

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/scarqin/mcp-apikit'

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