Skip to content

fix: MCP 工具 400 参数错误提示不清晰,无法引导正确使用#629

Merged
binggg merged 1 commit intomainfrom
automation/attribution-issue-mo8yphze-c40sfo-mcp-400
Apr 29, 2026
Merged

fix: MCP 工具 400 参数错误提示不清晰,无法引导正确使用#629
binggg merged 1 commit intomainfrom
automation/attribution-issue-mo8yphze-c40sfo-mcp-400

Conversation

@binggg
Copy link
Copy Markdown
Member

@binggg binggg commented Apr 28, 2026

Attribution issue

  • issueId: issue_mo8yphze_c40sfo
  • category: tool
  • canonicalTitle: MCP 工具 400 参数错误提示不清晰,无法引导正确使用
  • representativeRun: atomic-js-cloudbase-env-list/2026-04-21T18-32-53-ijklfb

Automation summary

  • root_cause: When the envQuery MCP tool encountered a 400 "invalid parameter value" error from the CloudBase API, it returned a generic error message that didn't explain which parameter was invalid or how to fix it. This made it difficult for users to understand and resolve the issue.
  • changes: Added a new buildEnvQueryErrorMessage function in mcp/src/tools/env.ts that analyzes error messages and provides actionable guidance based on common error patterns:
  • For 400/invalid parameter errors: suggests checking auth status and logging in
  • For auth errors: suggests running auth(action="status") to check login state
  • For permission errors: suggests verifying environment selection and permissions
  • For environment not found errors: suggests using envQuery(action="list") to see available environments
  • For network errors: suggests checking network connection
    Updated both error handling locations in the envQuery tool to use this enhanced error message function.
  • validation: All 35 env tests pass. The change is minimal and focused on improving error message clarity without changing any core functionality.
  • follow_up: None. The fix addresses the issue by providing clear, actiona

Changed files

  • mcp/src/tools/env.ts

@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@binggg
Copy link
Copy Markdown
Member Author

binggg commented Apr 28, 2026

Attribution post-PR evaluation

  • visibility: internal identifiers, run ids, and private links are intentionally omitted
  • attempt: 1
  • eval_scope: primary_only
  • overall: PASSED
  • summary: all planned evaluation cases passed
  • updated_at: 2026-04-28T17:22:45.143Z

Cases

  • [PASSED] — primary — evaluation passed

@binggg binggg merged commit f83161b into main Apr 29, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant