Skip to main content
Glama

List Issue File Attachments

list_issue_files
Read-onlyIdempotent

Retrieve file attachments for a MantisBT issue to access documentation, screenshots, or logs associated with bug reports.

Instructions

List all file attachments of a MantisBT issue.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
issue_idYesNumeric issue ID

Implementation Reference

  • The tool 'list_issue_files' is registered and implemented in src/tools/files.ts using `server.registerTool`. The handler function processes the `issue_id`, fetches the issue data from the `MantisClient`, and returns the attached files.
    server.registerTool(
      'list_issue_files',
      {
        title: 'List Issue File Attachments',
        description: 'List all file attachments of a MantisBT issue.',
        inputSchema: z.object({
          issue_id: z.coerce.number().int().positive().describe('Numeric issue ID'),
        }),
        annotations: {
          readOnlyHint: true,
          destructiveHint: false,
          idempotentHint: true,
        },
      },
      async ({ issue_id }) => {
        try {
          const result = await client.get<{ issues: Array<{ attachments?: MantisFile[] }> }>(`issues/${issue_id}`);
          const attachments = result.issues?.[0]?.attachments ?? [];
          return {
            content: [{ type: 'text', text: JSON.stringify(attachments, null, 2) }],
          };
        } catch (error) {
          const msg = error instanceof Error ? error.message : String(error);
          return { content: [{ type: 'text', text: errorText(msg) }], isError: true };
        }
      }
    );
Behavior3/5

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

Annotations already establish read-only, idempotent, non-destructive behavior. The description adds scope context ('all' file attachments) and system context ('MantisBT'), but does not disclose return value structure, pagination behavior, or file size limits that would help the agent handle the response.

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

Conciseness5/5

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

Single sentence, nine words, front-loaded with action verb. No redundancy or wasted text. The density is appropriate for the tool's simplicity.

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 low complexity (single required parameter), complete schema coverage, and comprehensive safety annotations, the description is sufficient. While it lacks return value documentation, the absence of an output schema reduces this burden for a simple list operation.

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

Parameters3/5

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

With 100% schema description coverage (issue_id is documented as 'Numeric issue ID'), the schema carries the full semantic load. The description mentions 'issue' which maps to the parameter, but adds no additional validation rules, format examples, or domain constraints beyond the schema.

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

Purpose4/5

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

The description states a specific action (List) and resource (file attachments of a MantisBT issue) clearly. However, it does not explicitly distinguish from sibling tool 'upload_file' or clarify when listing is preferred over other access methods.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives (e.g., 'get_issue' which may return some attachment metadata) or prerequisites (e.g., issue visibility permissions). It purely states functionality without usage context.

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