get-issue
Retrieve detailed information about a specific project issue using project and issue IDs to access comprehensive issue data for project management.
Instructions
Get detailed information about a specific issue
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| issue_id | Yes | ID of the issue to retrieve | |
| project_id | Yes | ID of the project containing the issue |
Implementation Reference
- src/index.ts:367-384 (handler)The handler for the 'get-issue' tool. Validates input arguments (project_id and issue_id), calls the Plane API to retrieve the specific issue, and returns the JSON-formatted response.case "get-issue": { if ( !args || typeof args.project_id !== "string" || typeof args.issue_id !== "string" ) { throw new Error("Project ID and Issue ID are required"); } const { project_id, issue_id } = args; const issue = await callPlaneAPI( `/projects/${project_id}/issues/${issue_id}/`, "GET" ); return { content: [{ type: "text", text: JSON.stringify(issue, null, 2) }], isError: false, }; }
- src/index.ts:126-143 (schema)The Tool schema definition for 'get-issue', including name, description, and input schema requiring project_id and issue_id.const GET_ISSUE_TOOL: Tool = { name: "get-issue", description: "Get detailed information about a specific issue", inputSchema: { type: "object", properties: { project_id: { type: "string", description: "ID of the project containing the issue", }, issue_id: { type: "string", description: "ID of the issue to retrieve", }, }, required: ["project_id", "issue_id"], }, };
- src/index.ts:261-270 (registration)Registration of the 'get-issue' tool (via GET_ISSUE_TOOL) in the ListToolsRequestHandler, making it available for listing.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:197-245 (helper)Shared helper function callPlaneAPI used by the get-issue handler to make authenticated HTTP requests to the Plane API.async function callPlaneAPI( endpoint: string, method: string, body?: any ): Promise<any> { const baseUrl = `https://api.plane.so/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) }` ); } }