delete_tag
Delete a tag from your monitoring system by specifying its unique tag ID. This removes the tag from all associated resources.
Instructions
Delete a tag.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tag_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- src/devhelm_mcp/tools/tags.py:58-65 (handler)The `delete_tag` tool handler. Accepts `tag_id` (string) and optional `api_token`. Calls `get_client(api_token).tags.delete(tag_id)` via the DevHelm SDK and returns a success message "Tag deleted successfully." on success, or raises a tool error via `raise_tool_error` on `DevhelmError`.
@mcp.tool() def delete_tag(tag_id: str, api_token: str | None = None) -> str: """Delete a tag.""" try: get_client(api_token).tags.delete(tag_id) return "Tag deleted successfully." except DevhelmError as e: raise_tool_error(e) - src/devhelm_mcp/tools/tags.py:18-18 (registration)The `register` function in `tags.py` that registers `delete_tag` (and other tag tools) with the FastMCP server via the `@mcp.tool()` decorator.
def register(mcp: FastMCP) -> None: - src/devhelm_mcp/server.py:109-110 (registration)The `server.py` registration loop that calls `mod.register(mcp)` for all tool modules, including `tags`, which registers `delete_tag` with the MCP server.
for mod in ALL_TOOL_MODULES: mod.register(mcp) - src/devhelm_mcp/tools/tags.py:59-59 (schema)The function signature defines the input schema for `delete_tag`: a required `tag_id: str` and an optional `api_token: str | None`.
def delete_tag(tag_id: str, api_token: str | None = None) -> str: - tests/test_tools.py:63-63 (helper)The test file lists `"delete_tag"` as one of the expected registered tool names, confirming it's tracked in tool registration tests.
"delete_tag",