Skip to main content
Glama

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
NameRequiredDescriptionDefault
idYesNumeric issue ID

Implementation Reference

  • 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 };
        }
      }
    );

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/dpesch/mantisbt-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server