backlog_get_issue
Retrieve specific issue details using the Backlog Issue API by providing the issue ID or key. Integrates with the Backlog MCP Server for streamlined project management operations.
Instructions
Performs an issue get using the Backlog Issue API.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| issueIdOrKey | Yes | Issue ID or Issue Key |
Implementation Reference
- src/tools/handlers.ts:136-168 (handler)The main handler function for the 'backlog_get_issue' tool. Validates input using IssueParamsSchema, calls issueService.getIssue(), formats the response as text or error.const handleGetIssue: ToolHandler = async (args) => { try { try { const validatedParams = IssueParamsSchema.parse(args); const text = await issueService.getIssue(validatedParams); return { content: [ { type: "text", text: `Issue details for ${validatedParams.issueIdOrKey}:\n${text}`, }, ], isError: false, }; } catch (validationError) { throw new ValidationError( `Invalid parameters: ${validationError instanceof Error ? validationError.message : String(validationError)}`, ); } } catch (error) { return { content: [ { type: "text", text: `Error: ${formatError(error)}`, }, ], isError: true, }; } };
- src/tools/handlers.ts:442-455 (registration)Registration of tool handlers, mapping 'backlog_get_issue' to handleGetIssue function.export const toolHandlers: Record<ToolName, ToolHandler> = { backlog_get_projects: handleGetProjects, backlog_get_project: handleGetProject, backlog_get_issues: handleGetIssues, backlog_get_issue: handleGetIssue, backlog_add_issue: handleAddIssue, backlog_update_issue: handleUpdateIssue, backlog_delete_issue: handleDeleteIssue, backlog_get_wikis: handleGetWikis, backlog_get_wiki: handleGetWiki, backlog_add_wiki: handleAddWiki, backlog_update_wiki: handleUpdateWiki, backlog_delete_wiki: handleDeleteWiki, };
- src/tools/toolDefinitions.ts:547-551 (schema)MCP tool definition for 'backlog_get_issue', including description and input schema generated from IssueParamsSchema.export const ISSUE_TOOL: Tool = createTool( "backlog_get_issue", "Performs an issue get using the Backlog Issue API.", IssueParamsSchema, );
- src/core/schema.ts:133-135 (schema)Zod schema used for input validation of the tool parameters.export const IssueParamsSchema = z.object({ issueIdOrKey: z.string().describe("Issue ID or Issue Key"), });
- src/services/issueService.ts:21-29 (helper)Helper service method that delegates to backlogAPI.getIssue and wraps errors.async getIssue(params: IssueParams): Promise<string> { try { return await backlogAPI.getIssue(params); } catch (error) { throw new Error( `Failed to get issue: ${error instanceof Error ? error.message : String(error)}`, ); } }