enable_test_context
Enable or disable test context mode to attach mock user and session data to traces for Langfuse attribution testing.
Instructions
Enable or disable test context mode for Langfuse attribution demos.
When enabled, all traces will include user_id, session_id, and metadata from the MockContext. This allows testing Langfuse filtering and aggregation without a real FastMCP authentication setup.
Args: enabled: Whether to enable test context mode (default: True).
Returns: Status dict with current test mode state and context values.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| enabled | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||