detach-tag
Remove a tag from a specific item on a Miro board by providing the board ID, tag ID, and item ID. Streamline organization and management of tagged elements.
Instructions
Detach a tag from an item on a Miro board
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| boardId | Yes | Unique identifier (ID) of the board that contains the tag and item | |
| itemId | Yes | Unique identifier (ID) of the item from which you want to detach the tag | |
| tagId | Yes | Unique identifier (ID) of the tag that you want to detach |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"boardId": {
"description": "Unique identifier (ID) of the board that contains the tag and item",
"type": "string"
},
"itemId": {
"description": "Unique identifier (ID) of the item from which you want to detach the tag",
"type": "string"
},
"tagId": {
"description": "Unique identifier (ID) of the tag that you want to detach",
"type": "string"
}
},
"required": [
"boardId",
"tagId",
"itemId"
],
"type": "object"
}
Implementation Reference
- src/tools/detachTag.ts:14-34 (handler)The asynchronous function implementing the core logic of the 'detach-tag' tool. It validates required inputs (boardId, tagId, itemId), calls MiroClient API to remove the tag from the item, and returns success or error response.fn: async ({ boardId, tagId, itemId }) => { try { if (!boardId) { return ServerResponse.error("Board ID is required"); } if (!tagId) { return ServerResponse.error("Tag ID is required"); } if (!itemId) { return ServerResponse.error("Item ID is required"); } // Use the SDK method to detach a tag from an item await MiroClient.getApi().removeTagFromItem(boardId, itemId, tagId); return ServerResponse.text(JSON.stringify({ success: true, message: "Tag detached successfully" }, null, 2)); } catch (error) { return ServerResponse.error(error); } }
- src/tools/detachTag.ts:9-13 (schema)Zod-based input schema defining the required string parameters for the 'detach-tag' tool: boardId, tagId, and itemId, with descriptions.args: { boardId: z.string().describe("Unique identifier (ID) of the board that contains the tag and item"), tagId: z.string().describe("Unique identifier (ID) of the tag that you want to detach"), itemId: z.string().describe("Unique identifier (ID) of the item from which you want to detach the tag") },
- src/index.ts:171-171 (registration)Registers the 'detachTagTool' with the ToolBootstrapper instance, making the 'detach-tag' tool available in the MCP server..register(detachTagTool)
- src/index.ts:71-71 (registration)Imports the 'detachTagTool' module from its source file for registration in the main index.import detachTagTool from './tools/detachTag.js';