Skip to content

fix: managePermissions工具createUser动作未将password声明为必填参数,导致模型遗漏该参数#654

Open
binggg wants to merge 1 commit intomainfrom
automation/attribution-issue-moizl31y-hagnn4-managepermissions-createuser-password-moj3v0n9
Open

fix: managePermissions工具createUser动作未将password声明为必填参数,导致模型遗漏该参数#654
binggg wants to merge 1 commit intomainfrom
automation/attribution-issue-moizl31y-hagnn4-managepermissions-createuser-password-moj3v0n9

Conversation

@binggg
Copy link
Copy Markdown
Member

@binggg binggg commented Apr 28, 2026

Attribution issue

  • issueId: issue_moizl31y_hagnn4
  • category: tool
  • canonicalTitle: managePermissions工具createUser动作未将password声明为必填参数,导致模型遗漏该参数
  • representativeRun: atomic-js-cloudbase-cli-user-create/2026-04-28T18-54-24-ba89b0

Automation summary

  • root_cause: In the managePermissions tool's input schema (mcp/src/tools/permissions.ts:596), the password parameter was declared as optional (z.string().optional()), but the runtime validation at lines 759-761 requires password when action='createUser'. This schema/runtime mismatch caused the AI model to not know that password is required for the createUser action.
  • changes: Added a .describe("当 action='createUser' 时,password 为必填参数") to the password parameter in the Zod schema at line 596. This explicitly documents the conditional requirement, allowing the AI model to understand that password must be provided when creating users.
  • validation: All 12 permissions tests passed, and all 325 tests in the test suite passed. The change is minimal and follows the existing codebase pattern for documenting parameter requirements.
  • follow_up: The fix is complete. The description annotation will be propagated to the generated tools.json during the build process, ensuring AI models receive the correct parameter requirement information.

Changed files

  • doc/prompts/auth-web.mdx
  • mcp/src/tools/permissions.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