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
| Name | Required | Description | Default |
|---|---|---|---|
| issue_id | Yes | The issue ID the relationship belongs to | |
| relationship_id | Yes | The numeric ID of the relationship to remove (from the relationships array in get_issue) |
Implementation Reference
- src/tools/relationships.ts:90-118 (registration)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 }; } } );