arcade-mcp icon indicating copy to clipboard operation
arcade-mcp copied to clipboard

Audit error messages for actionable fix instructions

Open TheMostlyGreat opened this issue 1 year ago • 1 comments

Summary

Error messages should tell users how to fix the problem, not just what the problem is.

Current State

Example - missing secret error:

Tool 'tool_name' cannot be executed because it requires the following secrets that are not available: API_KEY

This tells the user what's wrong but not how to fix it.

Proposed State

✗ Missing secret 'API_KEY'

  Tool 'fetch_data' requires this secret but it's not configured.

  To fix, either:
  1. Add to .env file:     API_KEY=your_key_here
  2. Set environment var:  export API_KEY=your_key_here

  Then restart the server.

Why This Matters

  • Reduces friction - Users don't have to search docs or guess
  • Better DX - Errors become self-service documentation
  • Fewer support questions - The answer is in the error

Inspiration

Elm and Rust compilers are famous for helpful error messages. Every error should answer: "What do I do now?"

Scope

Audit all user-facing errors in arcade-mcp-server:

  1. Missing secrets - Show how to set them
  2. Invalid tool input - Show expected shape vs received
  3. Authorization failures - Explain the auth flow
  4. Transport errors - Suggest common fixes (port in use, etc.)
  5. Configuration errors - Show valid options

Each error should include:

  • Clear problem statement
  • Specific context (which tool, which field, what value)
  • Concrete fix instructions
  • Next step (e.g., "Then restart the server")

Related

This pattern is being implemented in the TypeScript version for consistency across implementations.

TheMostlyGreat avatar Dec 02 '25 17:12 TheMostlyGreat

Linked to https://linear.app/arcadedev/issue/TOO-199/audit-error-messages-for-actionable-fix-instructions

evantahler avatar Dec 02 '25 20:12 evantahler