Skip to main content
Glama

Delete Note

delete_note
DestructiveIdempotent

Delete a note permanently from a MantisBT issue. Provide the issue ID and note ID to remove the note irreversibly.

Instructions

Permanently delete a note from a MantisBT issue. This action is irreversible — deleted notes cannot be recovered.

Returns a plain-text confirmation message on success. Returns an error if the note does not exist or the current user lacks permission to delete it (MantisBT enforces access control: users can typically only delete their own notes unless they have manager-level access or higher).

Prerequisites: obtain note_id from list_notes or from get_issue (notes[].id); obtain issue_id from the same source.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
issue_idYesNumeric issue ID that owns the note — use get_issue or list_notes to identify this value
note_idYesNumeric note ID to delete — obtain from get_issue (notes[].id) or list_notes

Implementation Reference

  • The delete_note tool handler: calls client.delete to permanently remove a note from a MantisBT issue, then returns a plain-text confirmation. Also handles errors.
      // ---------------------------------------------------------------------------
      // delete_note
      // ---------------------------------------------------------------------------
    
      server.registerTool(
        'delete_note',
        {
          title: 'Delete Note',
          description: `Permanently delete a note from a MantisBT issue. This action is irreversible — deleted notes cannot be recovered.
    
    Returns a plain-text confirmation message on success. Returns an error if the note does not exist or the current user lacks permission to delete it (MantisBT enforces access control: users can typically only delete their own notes unless they have manager-level access or higher).
    
    Prerequisites: obtain note_id from list_notes or from get_issue (notes[].id); obtain issue_id from the same source.`,
          inputSchema: z.object({
            issue_id: z.coerce.number().int().positive().describe('Numeric issue ID that owns the note — use get_issue or list_notes to identify this value'),
            note_id: z.coerce.number().int().positive().describe('Numeric note ID to delete — obtain from get_issue (notes[].id) or list_notes'),
          }),
          annotations: {
            readOnlyHint: false,
            destructiveHint: true,
            idempotentHint: true,
          },
        },
        async ({ issue_id, note_id }) => {
          try {
            await client.delete<unknown>(`issues/${issue_id}/notes/${note_id}`);
            return {
              content: [{ type: 'text', text: `Note #${note_id} deleted from issue #${issue_id}.` }],
            };
          } catch (error) {
            const msg = error instanceof Error ? error.message : String(error);
            return { content: [{ type: 'text', text: errorText(msg) }], isError: true };
          }
        }
      );
  • Registration of 'delete_note' tool via server.registerTool with title, description, inputSchema (issue_id, note_id), and annotations (not read-only, destructive, idempotent).
      server.registerTool(
        'delete_note',
        {
          title: 'Delete Note',
          description: `Permanently delete a note from a MantisBT issue. This action is irreversible — deleted notes cannot be recovered.
    
    Returns a plain-text confirmation message on success. Returns an error if the note does not exist or the current user lacks permission to delete it (MantisBT enforces access control: users can typically only delete their own notes unless they have manager-level access or higher).
    
    Prerequisites: obtain note_id from list_notes or from get_issue (notes[].id); obtain issue_id from the same source.`,
          inputSchema: z.object({
            issue_id: z.coerce.number().int().positive().describe('Numeric issue ID that owns the note — use get_issue or list_notes to identify this value'),
            note_id: z.coerce.number().int().positive().describe('Numeric note ID to delete — obtain from get_issue (notes[].id) or list_notes'),
          }),
          annotations: {
            readOnlyHint: false,
            destructiveHint: true,
            idempotentHint: true,
          },
        },
  • Input schema for delete_note: issue_id and note_id, both coerced positive integers.
    inputSchema: z.object({
      issue_id: z.coerce.number().int().positive().describe('Numeric issue ID that owns the note — use get_issue or list_notes to identify this value'),
      note_id: z.coerce.number().int().positive().describe('Numeric note ID to delete — obtain from get_issue (notes[].id) or list_notes'),
    }),
  • src/index.ts:68-68 (registration)
    Registration call: registerNoteTools(server, client) invoked in the main index.ts to wire up all note tools including delete_note.
    registerNoteTools(server, client);
Behavior3/5

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

The description adds some behavioral context beyond annotations: it states the action is permanent irreversible, returns plain-text confirmation, and lists error conditions. Annotations already indicate destructiveHint=true and idempotentHint=true, so the description augments but does not significantly exceed their coverage.

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?

The description is concise with three focused paragraphs. Each sentence provides necessary information: purpose, irreversibility, return/error behavior, and prerequisites. No extraneous text.

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 the tool's low complexity (2 required params, no output schema), the description covers all essential aspects: purpose, behavior, prerequisites, error conditions, and return type. It is fully sufficient for an agent to use the tool correctly.

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?

The input schema has 100% coverage with descriptions for both parameters. The description adds value by explaining how to obtain these IDs (e.g., from list_notes or get_issue), which is helpful context beyond the schema itself.

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 the verb 'delete' and the specific resource 'note from a MantisBT issue', making it unambiguous. It distinguishes itself from sibling tools like add_note and list_notes by indicating the action is permanent and irreversible.

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 explicit prerequisites on how to obtain note_id and issue_id, and explains error conditions (non-existence, permission). However, it does not explicitly state when not to use this tool or mention alternatives beyond the prerequisite sources.

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