delete_application_category
Remove a custom application category from the MCP Server for Coroot by specifying the project ID and category name. Built-in categories cannot be deleted.
Instructions
Delete an application category.
Removes a custom application category. Built-in categories cannot be deleted.
Args: project_id: Project ID name: Category name to delete
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| project_id | Yes |
Implementation Reference
- src/mcp_coroot/server.py:948-973 (handler)MCP tool handler implementation for delete_application_category. The _impl function calls CorootClient.delete_application_category, wrapped with error handling. The public function is decorated with @mcp.tool() for FastMCP registration.@handle_errors async def delete_application_category_impl( project_id: str, name: str, ) -> dict[str, Any]: """Delete an application category.""" await get_client().delete_application_category(project_id, name) return { "success": True, "message": f"Application category '{name}' deleted successfully", } @mcp.tool() async def delete_application_category( project_id: str, name: str, ) -> dict[str, Any]: """Delete an application category. Removes a custom application category. Built-in categories cannot be deleted. Args: project_id: Project ID name: Category name to delete """
- src/mcp_coroot/client.py:769-791 (helper)CorootClient helper method that implements the core logic: constructs a delete payload with action='delete' and required fields, then POSTs to the Coroot API endpoint /api/project/{project_id}/application_categories.async def delete_application_category( self, project_id: str, category_name: str ) -> dict[str, Any]: """Delete an application category. Args: project_id: Project ID. category_name: Name of the category to delete. Returns: Deletion result. """ # For delete, we need to send a minimal valid structure with action and id data = { "action": "delete", "id": category_name, "name": category_name, # Required for validation "custom_patterns": "", # Required for validation } response = await self._request( "POST", f"/api/project/{project_id}/application_categories", json=data ) return self._parse_json_response(response)