Skip to content

fix: MCP DestroyEnv 工具参数设计不清晰导致 400 错误#663

Open
binggg wants to merge 1 commit intomainfrom
automation/attribution-issue-mo8xbscc-lyduht-mcp-destroyenv-400
Open

fix: MCP DestroyEnv 工具参数设计不清晰导致 400 错误#663
binggg wants to merge 1 commit intomainfrom
automation/attribution-issue-mo8xbscc-lyduht-mcp-destroyenv-400

Conversation

@binggg
Copy link
Copy Markdown
Member

@binggg binggg commented Apr 28, 2026

Attribution issue

  • issueId: issue_mo8xbscc_lyduht
  • category: tool
  • canonicalTitle: MCP DestroyEnv 工具参数设计不清晰导致 400 错误
  • representativeRun: atomic-js-cloudbase-chain-env-destroy-and-verify/2026-04-21T17-54-12-7k3gxj

Automation summary

aborted

Changed files

  • mcp/src/generated/tcb-action-index.ts
  • scripts/generate-tcb-action-index.mjs

}

// Handle object type normalization
if ((schema?.type === "object" || schema?.properties) && typeof value === "object" && value !== null) {
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 50813e3272

ℹ️ 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".

if ((schema?.type === "integer" || schema?.type === "number") && typeof value === "string") {
const parsed = Number(value);
if (!Number.isNaN(parsed)) {
return schema.type === "integer" ? Math.floor(parsed) : parsed;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Avoid flooring non-integer numeric strings

The new normalization path converts any numeric string for integer schemas with Math.floor, so an example like "1.9" (or "-1.2") is silently rewritten to a different value (1 / -2) instead of being left unchanged or rejected. This can produce misleading exampleParams that no longer reflect the OpenAPI source and may drive bad tool calls (especially for bounded fields) when agents copy examples. Restrict integer coercion to strings that parse as exact integers (and finite values) to avoid data corruption during generation.

Useful? React with 👍 / 👎.

@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-28T22:40:00.181Z

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