Overview
Raw Logs provide detailed records of every MCP tool call. They show you exactly what happened—which tools were called, what queries were executed, whether they succeeded, and any errors that occurred.Accessing Raw Logs
In the Evaluation Dashboard:- Scroll to the bottom of the page
- Find the Raw Logs section
- Review the detailed records
Log Structure
Each log entry contains:- Tool Name: Which MCP tool was invoked
- Query Executed: The actual SQL query that ran
- Invocation Status: Success or failure
- Timestamp: When the invocation occurred
- Error Message: Error details (empty when successful)
Understanding Log Fields
Tool Name
What it shows: The name of the MCP tool that was invoked. Example:fetch_engagement_scores_by_event_type
What it tells you: Which tool agents are using most frequently.
Query Executed
What it shows: The actual SQL query that was executed, with parameter values injected. Example:- Exact query that ran
- Parameter values that were used
- How parameters were injected into the query
The Query Executed field shows the query after parameter injection. This is the actual query that ran against your database.
Invocation Status
What it shows: Whether the tool call succeeded or failed. Values:- Success: Tool executed successfully
- Error: Tool execution failed
Timestamp
What it shows: When the tool invocation occurred. Example:2024-11-05 14:23:45
What it tells you:
- When tools are being used
- Time patterns in usage
- Correlation with errors or performance issues
Error Message
What it shows: Detailed error information if the invocation failed. Empty when successful. Example:Error: Parameter 'event_type' not found in query
What it tells you:
- Why the invocation failed
- What needs to be fixed
- Common error patterns
Error messages are your best source of information for understanding failures. Always review them when investigating issues.
Analyzing Logs
Finding Successful Invocations
Look for entries with:- Status: Success
- Empty error message field
- Valid query results
Finding Failed Invocations
Look for entries with:- Status: Error
- Non-empty error message
- Failed query execution
Pattern Analysis
Review logs to identify patterns:- Time Patterns: Do errors occur at specific times?
- Query Patterns: Do certain queries fail more often?
- Parameter Patterns: Do certain parameter values cause errors?
- Tool Patterns: Do specific tools fail more than others?
Using Logs for Debugging
Step 1: Identify the Problem
- Find failed invocations in logs
- Review error messages
- Note which tool failed
- Check what parameters were used
Step 2: Understand the Context
- Look at the query that was executed
- Review parameter values
- Check timestamp (when did it fail?)
- Compare with successful invocations
Step 3: Reproduce the Issue
- Copy the query from the log
- Test it manually in SQL IDE
- Use the same parameter values
- See if you can reproduce the error
Step 4: Fix the Issue
- Identify the root cause
- Fix the tool or query
- Test the fix
- Monitor logs to confirm it’s resolved
Common Log Patterns
Pattern 1: Parameter Mismatch
Log Entry:Pattern 2: SQL Syntax Error
Log Entry:Pattern 3: Timeout
Log Entry:Best Practices
Regular Review
- ✅ Review logs regularly (weekly or daily)
- ✅ Focus on errors first
- ✅ Look for patterns over time
- ✅ Track improvements
Log Analysis
- Use filters to find specific issues
- Sort by timestamp to see recent activity
- Filter by status to focus on errors
- Search for specific error messages
Documentation
- Document common errors and fixes
- Note patterns you discover
- Share findings with team
- Create runbooks for frequent issues
Navigating Large Logs
Scrolling
- Scroll down to see older entries
- New entries appear at the top
- Use browser find/search to locate specific entries
Filtering
If filters are available:- Filter by tool name
- Filter by status (success/error)
- Filter by date range
- Filter by error message
Searching
Use browser search (Cmd+F or Ctrl+F) to:- Find specific tool names
- Search for error messages
- Locate specific timestamps
- Find parameter values
For large log files, use browser search to quickly find specific entries. This is much faster than scrolling through everything.
Next Steps
Now that you understand query logs:- Analyzing Errors - Use logs to identify and fix errors
- Improving Tools with Evals - Use log insights to optimize tools
- Evals Best Practices - Learn best practices for using Evals
Improve Your Tools
Use log insights to optimize your MCP tools