get-project
Retrieve detailed project information by ID to access project data and manage workflows through Plane's API.
Instructions
Get detailed information about a specific project
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_id | Yes | ID of the project to retrieve |
Implementation Reference
- src/index.ts:291-301 (handler)Handler function for the 'get-project' tool. Validates input, calls Plane API to fetch project details by ID, and returns JSON response.case "get-project": { if (!args || typeof args.project_id !== "string") { throw new Error("Project ID is required"); } const { project_id } = args; const project = await callPlaneAPI(`/projects/${project_id}/`, "GET"); return { content: [{ type: "text", text: JSON.stringify(project, null, 2) }], isError: false, }; }
- src/index.ts:41-54 (schema)Tool metadata definition including name, description, and input schema for 'get-project'.const GET_PROJECT_TOOL: Tool = { name: "get-project", description: "Get detailed information about a specific project", inputSchema: { type: "object", properties: { project_id: { type: "string", description: "ID of the project to retrieve", }, }, required: ["project_id"], }, };
- src/index.ts:262-271 (registration)Registration of the 'get-project' tool (as GET_PROJECT_TOOL) in the list of available tools returned by ListToolsRequestHandler.server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: [ LIST_PROJECTS_TOOL, GET_PROJECT_TOOL, CREATE_ISSUE_TOOL, LIST_ISSUES_TOOL, GET_ISSUE_TOOL, UPDATE_ISSUE_TOOL, ], }));
- src/index.ts:198-246 (helper)Shared helper function callPlaneAPI used by the get-project handler to make authenticated API calls to Plane.async function callPlaneAPI( endpoint: string, method: string, body?: any ): Promise<any> { const baseUrl = `${PLANE_HOST}/api/v1/workspaces/${PLANE_WORKSPACE_SLUG}`; const url = `${baseUrl}${endpoint}`; const options: RequestInit = { method, headers: { "Content-Type": "application/json", "X-API-Key": PLANE_API_KEY as string, }, }; if (body && (method === "POST" || method === "PATCH")) { options.body = JSON.stringify(body); } try { const response = await fetch(url, options); if (!response.ok) { let errorText; try { errorText = await response.text(); } catch (parseError) { errorText = "Unable to parse error response"; } throw new Error( `Plane API error: ${response.status} ${response.statusText}\n${errorText}` ); } // For DELETE requests that return 204 No Content if (response.status === 204) { return { success: true }; } return await response.json(); } catch (error) { throw new Error( `Error calling Plane API: ${ error instanceof Error ? error.message : String(error) }` ); } }