Skip to main content
Glama

Update Issue

update_issue

Modify existing MantisBT issue fields like status, priority, or description using partial updates to track bug resolution progress.

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
dry_runNoIf true, return the patch payload that would be sent without actually updating the issue. Useful for previewing changes before committing them.
fieldsYesFields to update (partial update — only provided fields are changed; unknown keys are rejected)

Implementation Reference

  • The handler for the 'update_issue' MCP tool.
      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'),
            dry_run: z.preprocess(coerceBool, z.boolean().optional()).describe('If true, return the patch payload that would be sent without actually updating the issue. Useful for previewing changes before committing them.'),
            fields: z.preprocess(
              (v) => {
                if (typeof v !== 'string') return v;
                try { return JSON.parse(v); } catch { return v; }
              },
              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, dry_run }) => {
          if (dry_run) {
            return {
              content: [{ type: 'text', text: JSON.stringify({ dry_run: true, id, would_patch: fields }, null, 2) }],
            };
          }
          try {
            const patch: Record<string, unknown> = { ...fields };
            for (const field of ['status', 'priority', 'severity', 'resolution', 'reproducibility'] as const) {
              const val = (fields as Record<string, { id?: number; name?: string } | undefined>)[field];
              if (val?.name !== undefined && val.id === undefined) {
                const resolved = await resolveEnum(field, val.name, client);
                if (typeof resolved !== 'string') patch[field] = resolved;
              }
            }
            const result = await client.patch<{ issue: MantisIssue }>(`issues/${id}`, patch);
            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 };
          }
        }
      );
  • Registration and schema definition for the 'update_issue' tool.
      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'),
            dry_run: z.preprocess(coerceBool, z.boolean().optional()).describe('If true, return the patch payload that would be sent without actually updating the issue. Useful for previewing changes before committing them.'),
            fields: z.preprocess(
              (v) => {
                if (typeof v !== 'string') return v;
                try { return JSON.parse(v); } catch { return v; }
              },
              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,
          },
        },
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations indicate this is not read-only and not destructive. The description adds valuable behavioral context beyond these hints: it explains partial update semantics ('only provided fields are changed'), notes that unknown keys are rejected, and details the dry_run functionality. It does not contradict the idempotentHint: false annotation, though it doesn't explain why the operation is non-idempotent.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately front-loaded with the core purpose, followed by a comprehensive field reference and ending with a critical usage warning. While the field list is lengthy, it is necessary given the tool's complexity. The structure is logical, though the field documentation could potentially be more compact.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the high complexity (nested objects with 14+ field types) and lack of output schema, the description comprehensively covers input parameters and validation rules. However, it omits any description of the return value or response structure, which would be helpful context given no output_schema is present.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Despite 100% schema description coverage (baseline 3), the description adds substantial semantic value. It documents specific enum values for status (e.g., 'acknowledged', 'resolved'), explains that resolution id 20 means 'fixed/resolved', clarifies that 'version' refers to 'affected version', and details the structure for handler references (id vs name)—none of which are evident from the schema alone.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a precise verb ('Update') and resource ('fields of an existing MantisBT issue'), explicitly distinguishing it from sibling tools like 'create_issue' (new issues) and 'get_issue' (reading). The mention of 'partial PATCH' further clarifies the specific update mechanism.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides critical operational guidance, including the requirement to set BOTH status and resolution when resolving, and explains the 'dry_run' parameter for previewing changes. However, it does not explicitly name sibling alternatives (e.g., 'use create_issue for new issues') or state when not to use this tool.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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