Skip to content

fix: MCP queryFunctions output 结构嵌套导致 AI 解析出错#627

Open
binggg wants to merge 1 commit intomainfrom
automation/attribution-issue-moisa1j5-a1ora6-mcp-queryfunctions-output-ai
Open

fix: MCP queryFunctions output 结构嵌套导致 AI 解析出错#627
binggg wants to merge 1 commit intomainfrom
automation/attribution-issue-moisa1j5-a1ora6-mcp-queryfunctions-output-ai

Conversation

@binggg
Copy link
Copy Markdown
Member

@binggg binggg commented Apr 28, 2026

Attribution issue

  • issueId: issue_moisa1j5_a1ora6
  • category: tool
  • canonicalTitle: MCP queryFunctions output 结构嵌套导致 AI 解析出错
  • representativeRun: atomic-js-cloudbase-list-functions/2026-04-28T15-28-11-663142

Automation summary

  • root_cause: The queryFunctions tool's listFunctions action returned function objects using Tencent Cloud API format with FunctionName field (capital letters). The AI had difficulty parsing this nested structure, leading to incorrect function name extraction and listing non-existent functions in internal evaluation artifact.
  • changes: Modified mcp/src/tools/functions.ts to add a name field to each function in the listFunctions output. The fix maps each function object to include name: fn.FunctionName while preserving all original fields. This makes it easier for AI to extract function names using the intuitive name field.
  • validation:
  • TypeScript compilation passes without errors
  • Skill/doc tests pass (10/10 tests passed)
  • follow_up: None. This is a minimal fix addressing the root cause - the output now includes both name (easy to parse) and the original FunctionName (for backward compatibility).

Changed files

  • 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: ERROR
  • summary: post-PR evaluation errored
  • updated_at: 2026-04-28T16:47:06.285Z

Cases

  • [ERROR] — primary — evaluation errored

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