delete_error
Remove specific error records from the Tribal Knowledge Service to maintain accurate programming error documentation.
Instructions
Delete an error record.
Args:
error_id: UUID of the error record
Returns:
True if deleted, False if not found
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error_id | Yes |
Implementation Reference
- src/mcp_server_tribal/mcp_app.py:224-240 (handler)The MCP tool handler for the 'delete_error' tool. It validates the error_id as a UUID string and delegates the deletion to the storage service.@mcp.tool() async def delete_error(error_id: str) -> bool: """ Delete an error record. Args: error_id: UUID of the error record Returns: True if deleted, False if not found """ try: uuid_id = UUID(error_id) return await storage.delete_error(uuid_id) except ValueError: return False
- Concrete implementation of delete_error in the ChromaStorage class, which performs the actual deletion from the ChromaDB collection.async def delete_error(self, error_id: UUID) -> bool: """Delete an error record by ID.""" try: result = self.collection.get(ids=[str(error_id)]) if not result["ids"]: return False self.collection.delete(ids=[str(error_id)]) return True except Exception: return False
- Abstract method definition in StorageInterface that defines the contract for delete_error used by the tool handler.@abc.abstractmethod async def delete_error(self, error_id: UUID) -> bool: """ Delete an error record by ID. Args: error_id: The UUID of the error record to delete Returns: True if the error was deleted, False otherwise """ pass