Conversation
… 必填参数(EnvId),且参数命名约定不 (issue_mojd35i1_ptw5mr)
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6ae1d3cd38
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| 销毁环境时,常见做法是至少带上 \`EnvId\` 和 \`BypassCheck: true\`,如果环境已经处于隔离期再按文档补 \`IsForce: true\`。 | ||
|
|
||
| **重要:params 结构规则** | ||
| 1. params 必须是**扁平键值对**,不要嵌套对象。例如 \`CreateUser\` 的参数应写成 \`{ "EnvId": "env-xxx", "Name": "zhangsan", "Type": "internalUser", "UserStatus": "ACTIVE" }\`,而不是 \`{ "User": { "Name": "..." } }\`。 |
There was a problem hiding this comment.
Remove hard ban on nested params in callCloudApi guidance
The new prompt text states that params “must be flat key-value pairs” and explicitly tells callers not to send nested objects, but multiple tcb actions in this repo’s own action index require nested structures (e.g. CreateTable.MongoConnector/PermissionInfo, EditAuthConfig.Mfa, UpdateTable.CreateIndexes). This guidance will push the model to strip required nested payloads and produce invalid API requests for those actions, so it regresses tool-call success beyond the CreateUser case.
Useful? React with 👍 / 👎.
|
|
||
| **重要:params 结构规则** | ||
| 1. params 必须是**扁平键值对**,不要嵌套对象。例如 \`CreateUser\` 的参数应写成 \`{ "EnvId": "env-xxx", "Name": "zhangsan", "Type": "internalUser", "UserStatus": "ACTIVE" }\`,而不是 \`{ "User": { "Name": "..." } }\`。 | ||
| 2. 几乎所有 tcb Action 都**必须**在 params 顶层携带 \`EnvId\`(环境 ID)。如果已通过 auth 工具获取了 env_id,请直接填入 params.EnvId。 |
There was a problem hiding this comment.
Avoid implying EnvId is required for nearly all tcb actions
The added rule says almost all tcb actions must carry top-level EnvId, but the repository’s generated action index includes actions without EnvId in their parameters (for example DescribeEnvLimit). Encouraging unconditional EnvId injection can trigger “parameter not recognized” failures on such actions, so this instruction over-constrains valid calls and can introduce avoidable call errors.
Useful? React with 👍 / 👎.
Attribution post-PR evaluation
Cases
|
Attribution issue
Automation summary
callCloudApitool description did not clearly state three critical constraints: (1)paramsmust be flat key-value pairs (not nested objects), (2) almost all tcb Actions requireEnvIdas a top-level param, and (3) parameter names must match the official API exactly (case-sensitive). This caused the model to callCreateUserwith a nestedUserobject, missingEnvId, and using incorrect field names (UserNameinstead ofName,UserTypeinstead ofType,Statusinstead ofUserStatus).mcp/src/tools/capi.ts— added a "重要:params 结构规则" section to the tool description with 3 explicit rules (flat structure, EnvId required, exact field names), and updated theparamsdescribe text to include aCreateUserexample with correct flat structure and a note about required fields (EnvId, Name) and common naming pitfalls (Name vs UserName, Type vs UserType, UserStatus vs Status).npx tsc --noEmit) passes. All 3 mandatory skill quality tests (build-skills-repo,build-compat-config,skill-quality-standards) pass (10/10). No other files reference the changed tool description text.Changed files
mcp/src/tools/capi.ts