Skip to main content
Glama

add_note

Add comments to existing MantisBT issues with UTF-8 support and visibility control for public or private notes.

Instructions

Add a note (comment) to an existing MantisBT issue. Full UTF-8 text is supported.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
issue_idYesNumeric issue ID
textYesNote text (supports full UTF-8, markdown will be stored as-is)
view_stateNoVisibility of the note (default: public)public

Implementation Reference

  • The asynchronous handler function that executes the add_note tool logic, making an HTTP POST request to the MantisBT API.
      async ({ issue_id, text, view_state }) => {
        try {
          const body = {
            text,
            view_state: { name: view_state },
          };
          const result = await client.post<{ note: MantisNote }>(`issues/${issue_id}/notes`, body);
          return {
            content: [{ type: 'text', text: JSON.stringify(result.note ?? result, null, 2) }],
          };
        } catch (error) {
          const msg = error instanceof Error ? error.message : String(error);
          return { content: [{ type: 'text', text: errorText(msg) }], isError: true };
        }
      }
    );
  • The Zod schema validation for the add_note tool input parameters.
    inputSchema: z.object({
      issue_id: z.coerce.number().int().positive().describe('Numeric issue ID'),
      text: z.string().min(1).describe('Note text (supports full UTF-8, markdown will be stored as-is)'),
      view_state: z.enum(['public', 'private']).default('public').describe('Visibility of the note (default: public)'),
    }),
  • The registration of the add_note tool on the MCP server.
    server.registerTool(
      'add_note',
      {
        title: 'Add Note to Issue',
        description: 'Add a note (comment) to an existing MantisBT issue. Full UTF-8 text is supported.',
        inputSchema: z.object({
          issue_id: z.coerce.number().int().positive().describe('Numeric issue ID'),
          text: z.string().min(1).describe('Note text (supports full UTF-8, markdown will be stored as-is)'),
          view_state: z.enum(['public', 'private']).default('public').describe('Visibility of the note (default: public)'),
        }),
        annotations: {
          readOnlyHint: false,
          destructiveHint: false,
          idempotentHint: false,
        },
      },

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