[PR #3921] [CLOSED] fix(mcp): give the compact any-value schema an items schema #5966

Closed
opened 2026-10-31 01:10:48 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/3921
Author: @xingzihai
Created: 10/15/2026
Status: ❌ Closed

Base: main ← Head: fix/issue-3838


📝 Commits (1)

  • e338518 fix(mcp): give the compact any-value schema an items schema

📊 Changes

2 files changed (+17 additions, -1 deletions)

View changed files

📝 src/contracts/compactInputSchema.test.ts (+13 -0)
📝 src/contracts/compactInputSchema.ts (+4 -1)

📄 Description

修复的问题

#3838 — GitHub Copilot + VS Code 无法运行,报错 tool parameters array type must have items。

根因

compact 输入 schema profile(REA_MCP_INPUT_SCHEMA_PROFILE=compact)将无约束 JSON 值重写为显式 type union:{"type":["null","boolean","object","array","number","string"]}。声明了 array 类型但没有 items 键,严格客户端(如 VS Code Copilot)拒绝该 schema。

改动

src/contracts/compactInputSchema.ts — 在 inlineWithinBudget 的空 schema 分支中,为 type union 添加 items: { type: jsonValueTypes }。

src/contracts/compactInputSchema.test.ts — 更新既有断言并新增回归测试验证 items 存在且 schema 仍接受合法值。

测试

  • src/contracts/compactInputSchema.test.ts: 12 passed
  • tests/boundary/mcp/compactInputSchemaMcp.test.ts: 9 passed
  • tests/boundary/mcp/toolSchemaValidity.test.ts: 14 passed
  • typecheck + lint: clean

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/morluto/rea/pull/3921 **Author:** [@xingzihai](https://github.com/xingzihai) **Created:** 10/15/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/issue-3838` --- ### 📝 Commits (1) - [`e338518`](https://github.com/morluto/rea/commit/e338518a8b0127178ab8a4099563842706785402) fix(mcp): give the compact any-value schema an items schema ### 📊 Changes **2 files changed** (+17 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `src/contracts/compactInputSchema.test.ts` (+13 -0) 📝 `src/contracts/compactInputSchema.ts` (+4 -1) </details> ### 📄 Description ## 修复的问题 #3838 — GitHub Copilot + VS Code 无法运行,报错 `tool parameters array type must have items`。 ## 根因 compact 输入 schema profile(`REA_MCP_INPUT_SCHEMA_PROFILE=compact`)将无约束 JSON 值重写为显式 type union:`{"type":["null","boolean","object","array","number","string"]}`。声明了 `array` 类型但没有 `items` 键,严格客户端(如 VS Code Copilot)拒绝该 schema。 ## 改动 `src/contracts/compactInputSchema.ts` — 在 `inlineWithinBudget` 的空 schema 分支中,为 type union 添加 `items: { type: jsonValueTypes }`。 `src/contracts/compactInputSchema.test.ts` — 更新既有断言并新增回归测试验证 `items` 存在且 schema 仍接受合法值。 ## 测试 - `src/contracts/compactInputSchema.test.ts`: 12 passed - `tests/boundary/mcp/compactInputSchemaMcp.test.ts`: 9 passed - `tests/boundary/mcp/toolSchemaValidity.test.ts`: 14 passed - typecheck + lint: clean --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 01:10:48 +00:00
bsakaguchi changed title from [PR #3921] [CLOSED] fix(mcp): give the compact any-value schema an items schema to [PR #3921] fix(mcp): give the compact any-value schema an items schema 2026-11-03 13:31:23 +00:00
bsakaguchi changed title from [PR #3921] fix(mcp): give the compact any-value schema an items schema to [PR #3921] [CLOSED] fix(mcp): give the compact any-value schema an items schema 2026-11-03 14:33:05 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#5966
No description provided.