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
| Name | Required | Description | Default |
|---|---|---|---|
| projectId | Yes | Project ID |
Implementation Reference
- src/services/mcpServer.ts:65-73 (handler)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) }] }; }
- src/services/mcpServer.ts:64-64 (schema)Input schema definition for the 'get_project' tool using Zod.{ projectId: z.string().describe("Project ID") },
- src/services/mcpServer.ts:62-74 (registration)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) }] }; } );
- src/services/eolinkService.ts:43-53 (helper)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; } }