Skip to content

fix: MCP 工具错误提示不清晰导致无法定位参数问题#667

Closed
binggg wants to merge 1 commit into
mainfrom
automation/attribution-issue-mo8whjxm-vaf900-mcp
Closed

fix: MCP 工具错误提示不清晰导致无法定位参数问题#667
binggg wants to merge 1 commit into
mainfrom
automation/attribution-issue-mo8whjxm-vaf900-mcp

Conversation

@binggg
Copy link
Copy Markdown
Member

@binggg binggg commented Apr 28, 2026

Attribution issue

  • issueId: issue_mo8whjxm_vaf900
  • category: tool
  • canonicalTitle: MCP 工具错误提示不清晰导致无法定位参数问题
  • representativeRun: atomic-js-clientsdk-init-login-create-collection/2026-04-21T17-30-30-b3vf6z

Automation summary

  • root_cause: The buildCapiErrorMessage function in mcp/src/tools/capi.ts didn't handle the generic "400 invalid parameter value" error pattern. When the Tencent Cloud API returned this error (e.g., "400 invalid parameter value (request-id)"), the MCP tool just passed it through without providing helpful context about which parameter might be wrong or what to do next, making it impossible for agents to locate the parameter problem.
  • changes:
  1. Added detection for the "400 invalid parameter" error pattern using regex /400\s+invalid\s+parameter/i
  2. Added helpful guidance for this error pattern that includes:
  • Explanation that the parameter value is invalid or doesn't meet API requirements
  • A checklist of things to check (parameter type, format, enum values, required fields)
  • Parameter hints for known TCB actions (shows common and required parameter keys)
  • Suggestion to use searchKnowledgeBase(mode="openapi", query="${action}") to find detailed API documentation
  1. Added test cases in mcp/src/tools/capi.test.ts to verify the new error handling
  • validation:
  • All 16 tests pass (including 4 new test cases for the 400 error handling)
  • TypeScript compilation passes with

Changed files

  • mcp/src/tools/capi.test.ts
  • mcp/src/tools/capi.ts

@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: FAILED
  • summary: at least one planned evaluation case failed
  • updated_at: 2026-04-28T23:35:08.299Z

Cases

  • [FAILED] — primary — evaluation failed

@binggg
Copy link
Copy Markdown
Member Author

binggg commented Jun 3, 2026

Closing stale automated attribution PR. The issue has been superseded by subsequent work or is no longer actionable.

@binggg binggg closed this Jun 3, 2026
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