Get Multiple Issues
get_issuesRetrieve multiple MantisBT issues by their numeric IDs in a single call, with parallel processing and graceful handling of missing or inaccessible IDs.
Instructions
Retrieve multiple MantisBT issues by their numeric IDs in a single MCP call. Requests run in parallel (max 5 concurrent). Missing or inaccessible IDs return null at their array position — the call never fails due to individual missing IDs. Response includes "requested", "found", and "failed" counters for quick validation.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ids | Yes | Array of numeric issue IDs to fetch (1–50). null is returned per ID on 404/403/error instead of failing the whole call. |
Implementation Reference
- src/tools/issues.ts:105-153 (handler)The implementation of the get_issues tool, which retrieves multiple MantisBT issues by their numeric IDs concurrently.
server.registerTool( 'get_issues', { title: 'Get Multiple Issues', description: 'Retrieve multiple MantisBT issues by their numeric IDs in a single MCP call. ' + 'Requests run in parallel (max 5 concurrent). ' + 'Missing or inaccessible IDs return null at their array position — ' + 'the call never fails due to individual missing IDs. ' + 'Response includes "requested", "found", and "failed" counters for quick validation.', inputSchema: z.object({ ids: z .array(z.coerce.number().int().positive()) .min(1) .max(50) .describe('Array of numeric issue IDs to fetch (1–50). null is returned per ID on 404/403/error instead of failing the whole call.'), }), annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, }, }, async ({ ids }) => { const results = await runWithConcurrency( ids, GET_ISSUES_CONCURRENCY, async (id): Promise<MantisIssue | null> => { try { const result = await client.get<{ issues: MantisIssue[] }>(`issues/${id}`); return result.issues?.[0] ?? (result as unknown as MantisIssue); } catch { return null; } }, ); const found = results.filter((r) => r !== null).length; return { content: [{ type: 'text', text: JSON.stringify( { issues: results, requested: ids.length, found, failed: ids.length - found }, null, 2, ), }], }; }, );