Skip to main content
Glama

Get Issue Enum Values

get_issue_enums
Read-onlyIdempotent

Retrieve valid values for issue fields like severity, status, and priority to ensure correct data entry when creating or updating MantisBT issues.

Instructions

Return valid ID, name, and (if available) localized label for all issue enum fields.

Use this tool before creating or updating issues to look up the correct value for severity, status, priority, resolution, or reproducibility.

Example response (English installation): { "severity": [{"id": 10, "name": "feature"}, {"id": 50, "name": "minor"}, ...], "status": [{"id": 10, "name": "new"}, {"id": 20, "name": "feedback"}, ...], "priority": [{"id": 10, "name": "none"}, {"id": 30, "name": "normal"}, ...], "resolution": [{"id": 10, "name": "open"}, {"id": 20, "name": "fixed"}, ...], "reproducibility": [{"id": 10, "name": "always"}, {"id": 70, "name": "have not tried"}, ...] }

Example response (localized installation, e.g. German): { "status": [ {"id": 10, "name": "new", "label": "Neu"}, {"id": 20, "name": "feedback", "label": "Feedback"}, {"id": 30, "name": "acknowledged", "label": "Bestätigt"}, ... ], ... }

Fields:

  • "id" — numeric ID accepted by the API

  • "name" — localized or canonical name from the MantisBT database

  • "label" — UI display label (only present when it differs from "name")

  • "canonical_name" — English canonical name (only present on localized installs)

For create_issue (severity, priority, reproducibility): pass the canonical English name, the localized "name", or the "label" — all are accepted. The server resolves them to the correct ID.

For update_issue: pass either "id" or "name" in the field reference object.

Note: on some installations enum values are customized at the database level. In that case "name" itself may be localized (e.g. "kleinerer Fehler" instead of "minor") and no "label" will be present because there is no separate English original.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The 'get_issue_enums' tool is registered here, using 'fetchIssueEnums' as its handler.
      server.registerTool(
        'get_issue_enums',
        {
          title: 'Get Issue Enum Values',
          description: `Return valid ID, name, and (if available) localized label for all issue enum fields.
    
    Use this tool before creating or updating issues to look up the correct value
    for severity, status, priority, resolution, or reproducibility.
    
    Example response (English installation):
    {
      "severity":         [{"id": 10, "name": "feature"}, {"id": 50, "name": "minor"}, ...],
      "status":           [{"id": 10, "name": "new"}, {"id": 20, "name": "feedback"}, ...],
      "priority":         [{"id": 10, "name": "none"}, {"id": 30, "name": "normal"}, ...],
      "resolution":       [{"id": 10, "name": "open"}, {"id": 20, "name": "fixed"}, ...],
      "reproducibility":  [{"id": 10, "name": "always"}, {"id": 70, "name": "have not tried"}, ...]
    }
    
    Example response (localized installation, e.g. German):
    {
      "status": [
        {"id": 10, "name": "new",      "label": "Neu"},
        {"id": 20, "name": "feedback", "label": "Feedback"},
        {"id": 30, "name": "acknowledged", "label": "Bestätigt"},
        ...
      ],
      ...
    }
    
    Fields:
    - "id"             — numeric ID accepted by the API
    - "name"           — localized or canonical name from the MantisBT database
    - "label"          — UI display label (only present when it differs from "name")
    - "canonical_name" — English canonical name (only present on localized installs)
    
    For create_issue (severity, priority, reproducibility): pass the canonical English name, the
    localized "name", or the "label" — all are accepted. The server resolves them to the correct ID.
    
    For update_issue: pass either "id" or "name" in the field reference object.
    
    Note: on some installations enum values are customized at the database level. In that case "name"
    itself may be localized (e.g. "kleinerer Fehler" instead of "minor") and no "label" will be present
    because there is no separate English original.`,
          inputSchema: z.object({}),
          annotations: {
            readOnlyHint: true,
            destructiveHint: false,
            idempotentHint: true,
          },
        },
        async () => {
          try {
            const enums = await fetchIssueEnums(client);
            return {
              content: [{ type: 'text', text: JSON.stringify(enums, null, 2) }],
            };
          } catch (error) {
            const msg = error instanceof Error ? error.message : String(error);
            return { content: [{ type: 'text', text: errorText(msg) }], isError: true };
          }
        }
      );
  • The actual implementation of 'fetchIssueEnums', which fetches and processes the enum values from the MantisBT API.
    export async function fetchIssueEnums(
      client: MantisClient,
    ): Promise<Record<string, MantisEnumEntry[]>> {
      const params: Record<string, string | number | boolean | undefined> = {};
      ISSUE_ENUM_OPTIONS.forEach((opt, i) => {
        params[`option[${i}]`] = opt;
      });
    
      const result = await client.get<{ configs: Array<{ option: string; value: string | EnumEntry[] }> }>('config', params);
      const configs = result.configs ?? [];
    
      const keyMap: Record<string, string> = {
        severity_enum_string: 'severity',
        status_enum_string: 'status',
        priority_enum_string: 'priority',
        resolution_enum_string: 'resolution',
        reproducibility_enum_string: 'reproducibility',
      };
    
      const enums: Record<string, MantisEnumEntry[]> = {};
      for (const { option, value } of configs) {
        const key = keyMap[option];
        if (!key) continue;
        const canonicalMap = MANTIS_CANONICAL_ENUM_NAMES[key] ?? {};
        if (typeof value === 'string') {
          enums[key] = parseEnumString(value).map(({ id, name }) => {
            const entry: MantisEnumEntry = { id, name };
            const canonical_name = resolveCanonicalName(id, name, canonicalMap);
            if (canonical_name !== undefined) entry.canonical_name = canonical_name;
            return entry;
          });
        } else if (Array.isArray(value)) {
          enums[key] = value.map(({ id, name, label }) => {
            const entry: MantisEnumEntry = { id, name };
            if (label && label !== name) entry.label = label;
            const canonical_name = resolveCanonicalName(id, name, canonicalMap);
            if (canonical_name !== undefined) entry.canonical_name = canonical_name;
            return entry;
          });
        }
      }
    
      return enums;
    }
Behavior4/5

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

While annotations declare readOnly/idempotent/destructive hints, the description adds crucial behavioral context: localization examples (German), database-level customization possibilities, field resolution logic (canonical_name vs label), and return structure. No contradictions with annotations.

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?

Well-structured with clear sections: purpose, usage timing, examples (English/German), field definitions, and API usage notes. Front-loaded with core purpose. Length is justified by complexity of localization rules and lack of output schema, though slightly verbose.

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

Completeness5/5

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

No output schema exists, so description comprehensively documents return structure via JSON examples and field definitions (id, name, label, canonical_name). Covers edge cases like customized database values and localized installations. Complete for a lookup tool.

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

Parameters4/5

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

Input schema has 0 parameters, triggering baseline score of 4. Description appropriately focuses on return value semantics rather than non-existent parameters.

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?

Description clearly states it returns valid IDs, names, and localized labels for issue enum fields (severity, status, priority, resolution, reproducibility). Uses specific verb 'Return' and distinguishes from siblings like get_issue or create_issue by focusing specifically on lookup/enum values.

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

Usage Guidelines5/5

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

Explicitly states when to use: 'before creating or updating issues.' Directly references sibling tools 'create_issue' and 'update_issue' with specific guidance on how to pass values to each, providing clear differentiation from alternatives.

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