You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[plan] Implement enhanced MCP error messages with actionable guidance #7952
Improve MCP server error messages to include actionable guidance that helps agents self-correct when they make parameter validation errors.
Context
When agents call MCP tools with missing parameters, they receive generic errors like "missing or empty 'item_number'" without guidance on how to fix it. Enhanced errors should teach agents the correct usage.
Approach
Locate the MCP server error handling code (likely in actions/setup/js/ or pkg/workflow/js/)
Identify where parameter validation errors are generated
Enhance error responses to include:
Parameter name and what it represents
Expected format/type
Example of a correct tool call
Ensure error format is consistent across all MCP tools
Files to Modify
Search for:
MCP server implementation files containing error handling
Look for files with "MCP error -32602" or parameter validation logic
Likely in actions/setup/js/*.cjs (source) or pkg/workflow/js/*.cjs (generated)
Example Enhancement
Current error:
MCP error -32602: Invalid arguments: missing or empty 'item_number'
Enhanced error:
MCP error -32602: Invalid arguments: missing or empty 'item_number'
Required parameter 'item_number' is missing. Please provide the numeric ID of the issue, PR, or discussion to comment on.
Example:
{
"item_number": 123,
"body": "Your comment text"
}
Acceptance Criteria
All MCP validation errors include parameter description
Errors include example of correct usage
Error format is consistent across all safe output MCP tools
JavaScript changes pass make lint-cjs validation
Changes are synced to pkg/workflow/js/ via make build
Testing
After making changes:
make build # Sync JS changes and rebuild binary
make lint-cjs # Validate JavaScript code
make recompile # Recompile workflows# Test with a workflow that intentionally has validation errors
Activity