Get Issue
get_issueRetrieve a complete MantisBT issue by its ID, including all fields, notes, attachments, and relationships in a single call.
Instructions
Retrieve a single MantisBT issue by its numeric ID. Returns all issue fields including notes, attachments, and relationships. Notes are always included — no separate list_notes call needed.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Numeric issue ID |
Implementation Reference
- src/tools/issues.ts:73-99 (handler)The `get_issue` tool registration and handler implementation.
server.registerTool( 'get_issue', { title: 'Get Issue', description: 'Retrieve a single MantisBT issue by its numeric ID. Returns all issue fields including notes, attachments, and relationships. Notes are always included — no separate list_notes call needed.', inputSchema: z.object({ id: z.coerce.number().int().positive().describe('Numeric issue ID'), }), annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, }, }, async ({ id }) => { try { const result = await client.get<{ issues: MantisIssue[] }>(`issues/${id}`); const issue = result.issues?.[0] ?? result; return { content: [{ type: 'text', text: JSON.stringify(issue, null, 2) }], }; } catch (error) { const msg = error instanceof Error ? error.message : String(error); return { content: [{ type: 'text', text: errorText(msg) }], isError: true }; } } );