fetch_observation
Retrieve a specific observation by its unique ID from Langfuse observability platform. Choose output format: summarized JSON for agents, complete JSON string, or summarized JSON with file save.
Instructions
Get a single observation by ID.
Args:
ctx: Context object containing lifespan context with Langfuse client
observation_id: The ID of the observation to fetch (unique identifier string)
output_mode: Controls the output format and detail level
Returns:
Based on output_mode:
- compact: Summarized observation object
- full_json_string: String containing the full JSON response
- full_json_file: Summarized observation object with file save info
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| observation_id | Yes | The ID of the observation to fetch (unique identifier string) | |
| output_mode | No | Controls the output format and action. 'compact' (default): Returns a summarized JSON object optimized for direct agent consumption. 'full_json_string': Returns the complete, raw JSON data serialized as a string. 'full_json_file': Returns a summarized JSON object AND saves the complete data to a file. | compact |