get_issue
Retrieve detailed information about a specific issue in Backlog projects using its ID or key for efficient tracking and management.
Instructions
Returns information about a specific issue
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| issueIdOrKey | Yes | Issue ID or issue key |
Implementation Reference
- src/tools/getIssue.ts:38-44 (handler)The core handler function for the 'get_issue' tool that resolves the issue identifier (ID or key) and fetches the issue data from the Backlog API.handler: async ({ issueId, issueKey }) => { const result = resolveIdOrKey('issue', { id: issueId, key: issueKey }, t); if (!result.ok) { throw result.error; } return backlog.getIssue(result.value); },
- src/tools/getIssue.ts:8-21 (schema)Input schema for the 'get_issue' tool, defining optional issueId (number) or issueKey (string) parameters with descriptions.const getIssueSchema = buildToolSchema((t) => ({ issueId: z .number() .optional() .describe( t('TOOL_GET_ISSUE_ISSUE_ID', 'The numeric ID of the issue (e.g., 12345)') ), issueKey: z .string() .optional() .describe( t('TOOL_GET_ISSUE_ISSUE_KEY', "The key of the issue (e.g., 'PROJ-123')") ), }));
- Output schema (IssueSchema) used by the 'get_issue' tool for validating the structure of the returned Backlog issue object.export const IssueSchema = z.object({ id: z.number(), projectId: z.number(), issueKey: z.string(), keyId: z.number(), issueType: IssueTypeSchema, summary: z.string(), description: z.string(), resolution: ResolutionSchema.optional(), priority: PrioritySchema, status: ProjectStatusSchema, assignee: UserSchema.optional(), category: z.array(CategorySchema), versions: z.array(VersionSchema), milestone: z.array(VersionSchema), startDate: z.string().optional(), dueDate: z.string().optional(), estimatedHours: z.number().optional(), actualHours: z.number().optional(), parentIssueId: z.number().optional(), createdUser: UserSchema, created: z.string(), updatedUser: UserSchema, updated: z.string(), customFields: z.array(CustomFieldSchema), attachments: z.array(IssueFileInfoSchema), sharedFiles: z.array(SharedFileSchema), stars: z.array(StarSchema), });
- src/tools/tools.ts:88-88 (registration)The 'get_issue' tool is instantiated and registered in the 'issue' toolset returned by the allTools function.getIssueTool(backlog, helper),
- src/utils/resolveIdOrKey.ts:51-55 (helper)Helper utility function called in the handler to resolve either a numeric issue ID or string key into a usable identifier, with error handling.export const resolveIdOrKey = <E extends EntityName>( entity: E, values: { id?: number; key?: string }, t: TranslationHelper['t'] ): ResolveResult => resolveIdOrField(entity, 'key', values, t);