Skip to main content
Glama

Add Issue Monitor

add_monitor

Add a user as a watcher to receive email notifications for MantisBT issue updates.

Instructions

Add a user as a monitor (watcher) of a MantisBT issue. Monitors receive email notifications for issue updates.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
issue_idYesNumeric issue ID
usernameYesUsername of the user to add as monitor

Implementation Reference

  • The handler implementation for the 'add_monitor' tool using the MantisClient to perform a POST request to add a monitor.
    server.registerTool(
      'add_monitor',
      {
        title: 'Add Issue Monitor',
        description: 'Add a user as a monitor (watcher) of a MantisBT issue. Monitors receive email notifications for issue updates.',
        inputSchema: z.object({
          issue_id: z.coerce.number().int().positive().describe('Numeric issue ID'),
          username: z.string().min(1).describe('Username of the user to add as monitor'),
        }),
        annotations: {
          readOnlyHint: false,
          destructiveHint: false,
          idempotentHint: false,
        },
      },
      async ({ issue_id, username }) => {
        try {
          const body = { name: username };
          const result = await client.post<unknown>(`issues/${issue_id}/monitors`, body);
          return {
            content: [{ type: 'text', text: JSON.stringify(result ?? { success: true }, 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 input parameters of the 'add_monitor' tool.
    inputSchema: z.object({
      issue_id: z.coerce.number().int().positive().describe('Numeric issue ID'),
      username: z.string().min(1).describe('Username of the user to add as monitor'),
    }),
  • The registration function where 'add_monitor' is registered as a tool on the McpServer.
    export function registerMonitorTools(server: McpServer, client: MantisClient): void {
Behavior4/5

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

Annotations already indicate this is a write operation (readOnlyHint=false) and non-idempotent (idempotentHint=false). The description adds valuable behavioral context by explaining that monitors receive email notifications for updates—information not present in annotations. No contradictions with 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 with zero waste. The first sentence front-loads the core action (adding a monitor), while the second sentence efficiently explains the consequence (email notifications). Every word earns its place.

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?

For a simple two-parameter tool with complete schema documentation and clear annotations, the description is sufficiently complete. It explains the business logic (email notifications) that structured fields cannot convey. Minor gap: does not describe return value or error cases (e.g., if user is already monitoring), though the non-idempotent hint suggests potential failure on duplicate adds.

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 ('Numeric issue ID' and 'Username of the user to add as monitor'), the schema fully documents parameters. The description references 'issue' and 'user' aligning with the schema but does not add syntax details, format constraints, or examples beyond what the schema provides, warranting the baseline score.

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 uses a specific verb ('Add') with clear resource ('monitor/watcher of a MantisBT issue') and distinguishes from siblings like add_note or add_relationship by specifying the watcher/monitor role. The parenthetical '(watcher)' clarifies the domain terminology.

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?

Provides clear context for when to use the tool by stating that 'Monitors receive email notifications for issue updates,' which explains the functional benefit. However, it does not explicitly mention the sibling tool remove_monitor as an alternative or specify when not to use this tool.

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