Skip to main content
Glama

Add Note to Issue

add_note

Add comments to MantisBT issues with UTF-8 text support and configurable visibility settings for team collaboration.

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

  • Handler function for 'add_note' which sends a POST request to add a note to a MantisBT issue.
      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 };
        }
      }
    );
  • Zod schema definition for the input parameters of 'add_note'.
    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)'),
    }),
  • Tool registration for 'add_note' using server.registerTool.
    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,
        },
      },
      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 };
        }
      }
    );
Behavior3/5

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

Annotations indicate this is a write operation (readOnlyHint=false) and non-idempotent (idempotentHint=false). The description adds valuable behavioral context about 'Full UTF-8 text' support, which clarifies encoding capabilities beyond what annotations provide. It does not contradict annotations.

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 efficiently structured: first establishes core functionality, second adds critical technical capability (UTF-8). No redundant words or filler content. The information density is optimal for quick agent comprehension.

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 tool's simplicity (single action with 3 well-documented parameters) and non-destructive nature, the description is adequately complete. While no output schema exists to document return values, the description sufficiently covers the inputs and behavior for an agent to invoke the tool 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?

With 100% schema description coverage, the schema fully documents all three parameters including the view_state enum and text constraints. The description reinforces the UTF-8 capability mentioned in the schema, meeting the baseline expectation for high-coverage schemas without adding significant new parameter-specific semantics.

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 action (Add), resource (note/comment), and target (existing MantisBT issue). It effectively distinguishes from siblings like 'create_issue' (which creates the issue itself) and 'delete_note' by specifying this operates on existing issues and adds rather than removes content.

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

Usage Guidelines3/5

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

The phrase 'to an existing MantisBT issue' implies a prerequisite (the issue must exist), providing implicit context. However, there is no explicit guidance on when to choose this over alternatives like 'update_issue' or what happens if the issue_id is invalid.

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