get_issue
Retrieve a MantisBT issue by ID to access details, notes, attachments, and relationships for bug tracking and project management.
Instructions
Retrieve a single MantisBT issue by its numeric ID. Returns all issue fields including notes, attachments, and relationships.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Numeric issue ID |
Implementation Reference
- src/tools/issues.ts:22-48 (handler)The tool "get_issue" is registered here and includes the handler logic that fetches a MantisBT issue by ID using the client and returns it as a JSON string.
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.', 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 }; } } );