get_project
Retrieve detailed project information using a specified project ID to facilitate API management and integration within the MCP server environment.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectId | Yes | Project ID |
Implementation Reference
- src/services/mcpServer.ts:62-74 (handler)MCP tool registration and handler for 'get_project'. Defines input schema with projectId, fetches project from eolinkService, and returns JSON-formatted response.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)Core implementation of project retrieval via Eolink API using axios GET request to /projects/{projectId}.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; } }
- src/models/api.ts:6-12 (schema)TypeScript interface defining the Project type returned by the get_project tool.export interface Project { id: string; name: string; description?: string; createdAt: string; updatedAt: string; }