Delete Note
delete_notePermanently delete a note from a MantisBT issue. This action is irreversible and requires both issue ID and note ID.
Instructions
Permanently delete a note from a MantisBT issue. This action is irreversible.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| issue_id | Yes | Numeric issue ID that owns the note | |
| note_id | Yes | Numeric note ID to delete |
Implementation Reference
- src/tools/notes.ts:104-115 (handler)The async handler for the delete_note tool, which performs a DELETE request to the MantisBT API for the specified note.
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 }; } } ); - src/tools/notes.ts:89-103 (registration)The registration of the delete_note tool with its schema definition using Zod.
server.registerTool( 'delete_note', { title: 'Delete Note', description: 'Permanently delete a note from a MantisBT issue. This action is irreversible.', inputSchema: z.object({ issue_id: z.coerce.number().int().positive().describe('Numeric issue ID that owns the note'), note_id: z.coerce.number().int().positive().describe('Numeric note ID to delete'), }), annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: true, }, },