get_error_by_id
Retrieve a specific error record by its unique ID to analyze programming issues and learn from past mistakes within the Tribal Knowledge Service.
Instructions
Get an error record by its ID.
Args:
error_id: UUID of the error record
Returns:
The error record or None if not found
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error_id | Yes |
Implementation Reference
- src/mcp_server_tribal/mcp_app.py:203-222 (handler)Handler function that implements the get_error_by_id MCP tool by validating the error_id as UUID and retrieving the corresponding ErrorRecord from ChromaStorage, serializing to dict or returning None if not found.@mcp.tool() async def get_error_by_id(error_id: str) -> Optional[Dict]: """ Get an error record by its ID. Args: error_id: UUID of the error record Returns: The error record or None if not found """ try: uuid_id = UUID(error_id) record = await storage.get_error(uuid_id) if record: return json.loads(record.model_dump_json()) return None except ValueError: return None
- Handler function that implements the get_error_by_id MCP tool by proxying a GET request to the backend API endpoint /api/v1/errors/{error_id}.@mcp.tool() async def get_error_by_id(error_id: str) -> Dict: """ Get an error record by its ID. Args: error_id: UUID of the error record Returns: The error record """ return await make_api_request("GET", f"/api/v1/errors/{error_id}")
- src/mcp_server_tribal/mcp_server.py:233-234 (registration)Explicit registration and dispatch of the get_error_by_id tool within the @mcp.handle_execution handler.elif tool_name == "get_error_by_id": return await get_error_by_id(**params)