Skip to content

fix: queryFunctions MCP 工具分页设计不完善,响应缺少分页元数据且跨页数据一致性无保障#686

Open
binggg wants to merge 1 commit intomainfrom
automation/attribution-issue-mojj9me4-yo5uhf-queryfunctions-mcp
Open

fix: queryFunctions MCP 工具分页设计不完善,响应缺少分页元数据且跨页数据一致性无保障#686
binggg wants to merge 1 commit intomainfrom
automation/attribution-issue-mojj9me4-yo5uhf-queryfunctions-mcp

Conversation

@binggg
Copy link
Copy Markdown
Member

@binggg binggg commented Apr 29, 2026

Attribution issue

  • issueId: issue_mojj9me4_yo5uhf
  • category: tool
  • canonicalTitle: queryFunctions MCP 工具分页设计不完善,响应缺少分页元数据且跨页数据一致性无保障
  • representativeRun: atomic-js-cloudbase-list-functions/2026-04-29T04-04-11-b885ee

Automation summary

  • root_cause: The queryFunctions MCP tool's listFunctions, listFunctionLogs, and listLayers actions lacked complete pagination metadata in their responses. The responses included functions/logs/layers arrays and totalCount, but were missing the current limit, offset, and hasMore flag. This made it difficult for agents to correctly implement pagination, leading to potential data inconsistency issues where agents might not know if more data was available or might hallucinate function names.
  • changes: Modified mcp/src/tools/functions.ts to add consistent pagination metadata to three list actions:
  1. listFunctions: Added limit, offset, hasMore (calculated as offset + functions.length < totalCount)
  2. listLayers: Added limit, offset, hasMore (calculated as offset + layers.length < totalCount)
  3. listFunctionLogs: Added limit, offset, hasMore (inferred as logs.length >= limit since logs API doesn't provide total count)
  • validation:
  • Build succeeds: webpack --config webpack/index.cjs --mode=production completed successfully
  • All 9 functions tests pass: vitest run src/tools/functions.test.ts
  • All 8 skill quality sta

Changed files

  • mcp/src/tools/functions.ts

@binggg
Copy link
Copy Markdown
Member Author

binggg commented Apr 29, 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-29T04:54:26.265Z

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