Skip to content

fix: MCP 云函数创建工具参数设计不清晰,错误提示过于笼统#612

Open
binggg wants to merge 1 commit intomainfrom
automation/attribution-issue-mo8z7grh-mdahjm-mcp
Open

fix: MCP 云函数创建工具参数设计不清晰,错误提示过于笼统#612
binggg wants to merge 1 commit intomainfrom
automation/attribution-issue-mo8z7grh-mdahjm-mcp

Conversation

@binggg
Copy link
Copy Markdown
Member

@binggg binggg commented Apr 28, 2026

Attribution issue

  • issueId: issue_mo8z7grh_mdahjm
  • category: tool
  • canonicalTitle: MCP 云函数创建工具参数设计不清晰,错误提示过于笼统
  • representativeRun: atomic-js-cloudbase-timer-trigger/2026-04-21T18-46-02-1xh24r

Automation summary

  • root_cause: The MCP cloud function creation tool had unclear parameter design in its Zod schema descriptions, leading to AI agents not understanding that func.name is required for createFunction action. Additionally, when the CloudBase SDK returned a generic "400 invalid parameter value" error, the tool didn't provide specific guidance on what parameters might be wrong.
  • changes: Made the following improvements to mcp/src/tools/functions.ts:
  1. Enhanced CREATE_FUNCTION_SCHEMA descriptions: Added "(必填)" (required) markers to name field and clarified type field description with valid values ("Event" or "HTTP")
  2. Enhanced TRIGGER_SCHEMA descriptions: Added "(必填)" markers to all trigger fields (name, type, config) with examples like 'timerHelloTrigger' and 'timer'
  3. Improved error handling for "invalid parameter value": Added a specific check in buildFunctionOperationErrorMessage() that catches "invalid parameter value|参数值无效|InvalidParameterValue" errors and provides a detailed checklist of common causes:
  • func.name is missing or invalid
  • func.type is not "Event" or "HTTP"
  • func.runtime is not supported
  • triggers array is missing required fiel

Changed files

  • doc/prompts/auth-web.mdx
  • mcp/src/tools/functions.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: FAILED
  • summary: at least one planned evaluation case failed
  • updated_at: 2026-04-28T14:11:45.849Z

Cases

  • [FAILED] — primary — evaluation failed

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