get_error_by_id
Retrieve detailed error records by their unique ID to analyze and resolve programming issues efficiently. Integrates with the Tribal Knowledge Service for enhanced error management and learning.
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)Primary handler implementation for the 'get_error_by_id' tool. Retrieves an error record from ChromaStorage by UUID, returns JSON or 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
- Proxy handler for 'get_error_by_id' that forwards the request to the Tribal API endpoint.@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 handle_execution method in the proxy server.elif tool_name == "get_error_by_id": return await get_error_by_id(**params)