Skip to main content
Glama

List Issue Notes

list_notes
Read-onlyIdempotent

Fetch all comments on a MantisBT issue without retrieving the entire issue.

Instructions

List all notes (comments) attached to a MantisBT issue. Note: get_issue already includes notes in its response — use list_notes only when you need notes without fetching the full issue.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
issue_idYesNumeric issue ID

Implementation Reference

  • The async handler function that executes the 'list_notes' tool logic: calls client.get('issues/{issue_id}') to fetch the issue, extracts notes from the response, maps them with view URLs, and returns JSON text.
      async ({ issue_id }) => {
        try {
          const [result, baseUrl] = await Promise.all([
            client.get<{ issues: Array<{ notes?: MantisNote[] }> }>(`issues/${issue_id}`),
            client.getBaseUrl(),
          ]);
          const notes = (result.issues?.[0]?.notes ?? []).map(note => ({
            ...note,
            view_url: buildNoteViewUrl(baseUrl, issue_id, note.id),
          }));
          return {
            content: [{ type: 'text', text: JSON.stringify(notes, null, 2) }],
          };
        } catch (error) {
          const msg = error instanceof Error ? error.message : String(error);
          return { content: [{ type: 'text', text: errorText(msg) }], isError: true };
        }
      }
    );
  • Tool registration with Zod input schema (issue_id: number), description, title, and annotations (readOnlyHint, destructiveHint, idempotentHint).
    server.registerTool(
      'list_notes',
      {
        title: 'List Issue Notes',
        description: 'List all notes (comments) attached to a MantisBT issue. Note: get_issue already includes notes in its response — use list_notes only when you need notes without fetching the full issue.',
        inputSchema: z.object({
          issue_id: z.coerce.number().int().positive().describe('Numeric issue ID'),
        }),
        annotations: {
          readOnlyHint: true,
          destructiveHint: false,
          idempotentHint: true,
        },
      },
  • src/index.ts:16-16 (registration)
    Import of registerNoteTools from ./tools/notes.js.
    import { registerNoteTools } from './tools/notes.js';
  • src/index.ts:68-68 (registration)
    Call to registerNoteTools(server, client) that triggers registration of all note-related tools including list_notes.
    registerNoteTools(server, client);
  • buildNoteViewUrl helper function used by the list_notes handler to generate view URLs linking to notes in the MantisBT web UI.
    export function buildNoteViewUrl(baseUrl: string, issueId: number, noteId: number): string {
      return `${baseUrl}/view.php?id=${issueId}#bugnote${noteId}`;
    }
Behavior4/5

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

Annotations already provide readOnlyHint, destructiveHint, idempotentHint. Description reinforces that the tool lists notes (comments) and mentions it is a subset of get_issue's output. No contradictions; adds context that notes are comments.

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?

Two sentences, no wasted words. First sentence establishes purpose, second sentence provides usage guidance. Front-loaded and efficient.

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?

Given single parameter, clear annotations, and no output schema needed, the description fully covers the tool's purpose, usage context, and behavioral traits. Complete for an agent to decide and invoke correctly.

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?

Schema has 100% description coverage for the single parameter 'issue_id' described as 'Numeric issue ID'. Description does not add any additional meaning beyond the schema. Baseline 3 is appropriate.

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 clearly states 'List all notes (comments) attached to a MantisBT issue' with a specific verb and resource. It distinguishes from get_issue by noting that list_notes is only for notes without fetching the full issue.

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 advises when to use this tool versus get_issue: 'use list_notes only when you need notes without fetching the full issue.' Provides clear context and exclusion.

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