Skip to main content
Glama

remove_relationship

Remove a relationship from a MantisBT issue by specifying the issue ID and relationship ID. Use after retrieving relationships with get_issue.

Instructions

Remove a relationship from a MantisBT issue.

Use get_issue first to retrieve the relationship IDs. The relationship_id is the numeric id field of a relationship object in the issue's relationships array (not the type ID).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
issue_idYesThe issue ID the relationship belongs to
relationship_idYesThe numeric ID of the relationship to remove (from the relationships array in get_issue)

Implementation Reference

  • Tool registration and handler implementation for "remove_relationship" in src/tools/relationships.ts.
      server.registerTool(
        'remove_relationship',
        {
          title: 'Remove Issue Relationship',
          description: `Remove a relationship from a MantisBT issue.
    
    Use get_issue first to retrieve the relationship IDs. The relationship_id is the numeric id field of a relationship object in the issue's relationships array (not the type ID).`,
          inputSchema: z.object({
            issue_id: z.coerce.number().int().positive().describe('The issue ID the relationship belongs to'),
            relationship_id: z.coerce.number().int().positive().describe('The numeric ID of the relationship to remove (from the relationships array in get_issue)'),
          }),
          annotations: {
            readOnlyHint: false,
            destructiveHint: true,
            idempotentHint: false,
          },
        },
        async ({ issue_id, relationship_id }) => {
          try {
            await client.delete<unknown>(`issues/${issue_id}/relationships/${relationship_id}`);
            return {
              content: [{ type: 'text', text: JSON.stringify({ success: true }, null, 2) }],
            };
          } catch (error) {
            const msg = error instanceof Error ? error.message : String(error);
            return { content: [{ type: 'text', text: errorText(msg) }], isError: true };
          }
        }
      );

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