Skip to content

fix: MCP uploadFiles 工具描述不明确,导致静态托管部署被误用为云存储上传#645

Open
binggg wants to merge 1 commit intomainfrom
automation/attribution-issue-moize3r3-mv20lr-mcp-uploadfiles-moj1juw3
Open

fix: MCP uploadFiles 工具描述不明确,导致静态托管部署被误用为云存储上传#645
binggg wants to merge 1 commit intomainfrom
automation/attribution-issue-moize3r3-mv20lr-mcp-uploadfiles-moj1juw3

Conversation

@binggg
Copy link
Copy Markdown
Member

@binggg binggg commented Apr 28, 2026

Attribution issue

  • issueId: issue_moize3r3_mv20lr
  • category: tool
  • canonicalTitle: MCP uploadFiles 工具描述不明确,导致静态托管部署被误用为云存储上传
  • representativeRun: application-js-vite-hello-world-hosting-deploy/2026-04-28T18-47-53-asctvh

Automation summary

  • root_cause: The uploadFiles tool description in MCP was unclear about subdirectory deployment configuration. It incorrectly suggested using "relative paths" for publicPath/base/assetPrefix, which causes 404 errors when deploying to subdirectories (e.g., /vite-test/). The attribution focus identified that for subdirectory deployments, the base must be an absolute path like /vite-test/ (with leading slash), NOT ./.
  • changes: Updated mcp/src/tools/hosting.ts with three improvements:
  1. Enhanced tool description: Added a mandatory pre-deployment checklist that clearly distinguishes between root deployment (can use relative paths) and subdirectory deployment (must use absolute paths like /vite-test/). Explicitly warns against using ./ for subdirectory deployments.
  2. Updated parameter descriptions:
  • localPath: Added note about uploading complete build artifact directory contents (not just index.html)
  • cloudPath: Clarified format (relative to hosting root, no leading /) and emphasized the absolute path requirement for subdirectory deployments
  1. Improved error messages: Added subdirectory deployment configuration hints in `buildUploadFilesErrorM

Changed files

  • mcp/src/tools/hosting.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.

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