Skip to main content
Glama

update_issue

Modify existing MantisBT issues by updating fields like status, priority, description, or assignee using partial PATCH requests.

Instructions

Update one or more fields of an existing MantisBT issue using a partial PATCH.

The "fields" object accepts any combination of:

  • summary (string)

  • description (string)

  • steps_to_reproduce (string)

  • additional_information (string)

  • status: { name: "new"|"feedback"|"acknowledged"|"confirmed"|"assigned"|"resolved"|"closed" }

  • resolution: { id: 20 } (20 = fixed/resolved)

  • handler: { id: <user_id> } or { name: "" }

  • priority: { name: "<priority_name>" }

  • severity: { name: "<severity_name>" }

  • reproducibility: { name: "<reproducibility_name>" }

  • category: { name: "<category_name>" }

  • version: { name: "<version_name>" } (affected version)

  • target_version: { name: "<version_name>" }

  • fixed_in_version: { name: "<version_name>" }

  • view_state: { name: "public"|"private" }

Important: when resolving an issue, always set BOTH status and resolution to avoid leaving resolution as "open".

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesNumeric issue ID to update
fieldsYesFields to update (partial update — only provided fields are changed; unknown keys are rejected)

Implementation Reference

  • The handler function that executes the PATCH request to update the MantisBT issue.
    async ({ id, fields }) => {
      try {
        const result = await client.patch<{ issue: MantisIssue }>(`issues/${id}`, fields);
        return {
          content: [{ type: 'text', text: JSON.stringify(result.issue ?? result, null, 2) }],
        };
      } catch (error) {
        const msg = error instanceof Error ? error.message : String(error);
        return { content: [{ type: 'text', text: errorText(msg) }], isError: true };
      }
    }
  • Schema defining the input structure for updating an issue, including validation for the allowed fields.
    inputSchema: z.object({
      id: z.coerce.number().int().positive().describe('Numeric issue ID to update'),
      fields: z.object({
        summary: z.string().optional(),
        description: z.string().optional(),
        steps_to_reproduce: z.string().optional(),
        additional_information: z.string().optional(),
        status: ref.optional(),
        resolution: ref.optional(),
        priority: ref.optional(),
        severity: ref.optional(),
        reproducibility: ref.optional(),
        handler: ref.optional(),
        category: ref.optional(),
        version: ref.optional(),
        target_version: ref.optional(),
        fixed_in_version: ref.optional(),
        view_state: ref.optional(),
      }).strict().describe('Fields to update (partial update — only provided fields are changed; unknown keys are rejected)'),
    }),
  • Registration of the 'update_issue' tool within the MCP server.
      server.registerTool(
        'update_issue',
        {
          title: 'Update Issue',
          description: `Update one or more fields of an existing MantisBT issue using a partial PATCH.
    
    The "fields" object accepts any combination of:
    - summary (string)
    - description (string)
    - steps_to_reproduce (string)
    - additional_information (string)
    - status: { name: "new"|"feedback"|"acknowledged"|"confirmed"|"assigned"|"resolved"|"closed" }
    - resolution: { id: 20 }  (20 = fixed/resolved)
    - handler: { id: <user_id> } or { name: "<username>" }
    - priority: { name: "<priority_name>" }
    - severity: { name: "<severity_name>" }
    - reproducibility: { name: "<reproducibility_name>" }
    - category: { name: "<category_name>" }
    - version: { name: "<version_name>" }  (affected version)
    - target_version: { name: "<version_name>" }
    - fixed_in_version: { name: "<version_name>" }
    - view_state: { name: "public"|"private" }
    
    Important: when resolving an issue, always set BOTH status and resolution to avoid leaving resolution as "open".`,
          inputSchema: z.object({
            id: z.coerce.number().int().positive().describe('Numeric issue ID to update'),
            fields: z.object({
              summary: z.string().optional(),
              description: z.string().optional(),
              steps_to_reproduce: z.string().optional(),
              additional_information: z.string().optional(),
              status: ref.optional(),
              resolution: ref.optional(),
              priority: ref.optional(),
              severity: ref.optional(),
              reproducibility: ref.optional(),
              handler: ref.optional(),
              category: ref.optional(),
              version: ref.optional(),
              target_version: ref.optional(),
              fixed_in_version: ref.optional(),
              view_state: ref.optional(),
            }).strict().describe('Fields to update (partial update — only provided fields are changed; unknown keys are rejected)'),
          }),
          annotations: {
            readOnlyHint: false,
            destructiveHint: false,
            idempotentHint: false,
          },
        },
        async ({ id, fields }) => {
          try {
            const result = await client.patch<{ issue: MantisIssue }>(`issues/${id}`, fields);
            return {
              content: [{ type: 'text', text: JSON.stringify(result.issue ?? result, 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