[GH-ISSUE #4985] MCP tool schema validation fails for obligation ledger: array parameter missing items #3080

Closed
opened 2026-10-31 00:36:12 +00:00 by bsakaguchi · 6 comments
Owner

Originally created by @johntroublemaker on GitHub (Oct 18, 2026).
Original GitHub issue: https://github.com/morluto/rea/issues/4985

Bug report

The MCP client rejects the mcp_rea_build_reconstruction_obligation_ledger tool before it can be called:

Failed to validate tool mcp_rea_build_reconstruction_obligation_ledger: Error: tool parameters array type must have items. Please open an issue for the MCP server or extension which provides this tool

This indicates that a parameter declared with JSON Schema type: "array" is missing its required items schema (or the generated schema is otherwise incompatible with the client's validator).

Expected behavior

The tool schema validates and the tool is available for invocation. Every array parameter should include an items schema compatible with the values accepted by the tool.

Actual behavior

The client fails tool registration/validation, so the obligation ledger tool cannot be used.

Environment

  • Tool: mcp_rea_build_reconstruction_obligation_ledger
  • Client: VS Code chat client
  • Configured model: Ollama Local / qwen2.5-coder:7b with tool calling enabled

Please check the server's advertised input schema for this tool (and any shared schema generator) for an array parameter without items. The precise offending parameter was not included in the client error.

Originally created by @johntroublemaker on GitHub (Oct 18, 2026). Original GitHub issue: https://github.com/morluto/rea/issues/4985 ## Bug report The MCP client rejects the `mcp_rea_build_reconstruction_obligation_ledger` tool before it can be called: > Failed to validate tool mcp_rea_build_reconstruction_obligation_ledger: Error: tool parameters array type must have items. Please open an issue for the MCP server or extension which provides this tool This indicates that a parameter declared with JSON Schema `type: "array"` is missing its required `items` schema (or the generated schema is otherwise incompatible with the client's validator). ## Expected behavior The tool schema validates and the tool is available for invocation. Every array parameter should include an `items` schema compatible with the values accepted by the tool. ## Actual behavior The client fails tool registration/validation, so the obligation ledger tool cannot be used. ## Environment - Tool: `mcp_rea_build_reconstruction_obligation_ledger` - Client: VS Code chat client - Configured model: Ollama Local / `qwen2.5-coder:7b` with tool calling enabled Please check the server's advertised input schema for this tool (and any shared schema generator) for an array parameter without `items`. The precise offending parameter was not included in the client error.
Author
Owner

@johntroublemaker commented on GitHub (Oct 18, 2026):

Additional affected tool reported in the same VS Code chat client:

Failed to validate tool mcp_rea_build_call_path: Error: tool parameters array type must have items.

This appears to be the same schema validation issue as the obligation-ledger tool reported above: an advertised array parameter is missing its JSON Schema items definition, or the generated input schema is otherwise incompatible with the client's validator. The configured local model is Ollama Local / qwen2.5-coder:7b with tool calling enabled. Could you check the schema emitted for build_call_path and the shared schema generation path?

<!-- gh-comment-id:6246932833 --> @johntroublemaker commented on GitHub (Oct 18, 2026): Additional affected tool reported in the same VS Code chat client: > Failed to validate tool `mcp_rea_build_call_path`: Error: tool parameters array type must have items. This appears to be the same schema validation issue as the obligation-ledger tool reported above: an advertised array parameter is missing its JSON Schema `items` definition, or the generated input schema is otherwise incompatible with the client's validator. The configured local model is Ollama Local / `qwen2.5-coder:7b` with tool calling enabled. Could you check the schema emitted for `build_call_path` and the shared schema generation path?
Author
Owner

@pablodiazjorge commented on GitHub (Oct 18, 2026):

I checked the advertised schemas from source builds (Windows 11, Node 22.22.3): I started rea mcp from the rea-agents-6.5.0 tag and from main 01cdbbdc5, listed the tools over stdio, and walked every inputSchema for nodes typed array without items.

  • 6.5.0: 228 such nodes in 23 tools, all from the same shared fixed tuple, relationship_coverage.limited_directions, which is advertised with prefixItems only, for example {"type":"array","prefixItems":[{"type":"string","const":"callers"}],"minItems":1,"maxItems":1}. Both tools reported here are among them; the full list is below.
  • main 01cdbbdc5: none. 204b9f3ac (fix(contracts): preserve array guidance across MCP schema profiles) gives those tuples an items schema, the union of their elements, for clients that only read items. It is in the rea-agents-6.6.0 tag, but npm latest is still 6.5.0, so npx rea-agents@latest serves the schemas without items until 6.6.0 is published.

Not run: VS Code itself. That its "array type must have items" check is what rejects these nodes is inferred from the schemas, not observed in the client.

The 23 tools in 6.5.0

build_call_path, build_reconstruction_obligation_ledger, compare_application_versions, compare_artifacts, compare_functions, compare_javascript_export_shapes, compare_managed_members, compare_process_captures, compare_source_to_bundle, compare_wasm_interfaces, correlate_static_and_runtime, evaluate_reconstruction_coverage, find_changed_behavior, import_managed_reconstruction, inspect_analysis_view, project_android_application_graph, project_apple_application_graph, project_harmony_application_graph, project_managed_application_graph, reconcile_javascript_runtime, trace_application_feature, trace_javascript_semantics, verify_managed_native_boundaries

<!-- gh-comment-id:6247187361 --> @pablodiazjorge commented on GitHub (Oct 18, 2026): I checked the advertised schemas from source builds (Windows 11, Node 22.22.3): I started `rea mcp` from the `rea-agents-6.5.0` tag and from main `01cdbbdc5`, listed the tools over stdio, and walked every `inputSchema` for nodes typed `array` without `items`. - **6.5.0:** 228 such nodes in 23 tools, all from the same shared fixed tuple, `relationship_coverage.limited_directions`, which is advertised with `prefixItems` only, for example `{"type":"array","prefixItems":[{"type":"string","const":"callers"}],"minItems":1,"maxItems":1}`. Both tools reported here are among them; the full list is below. - **main `01cdbbdc5`:** none. 204b9f3ac (`fix(contracts): preserve array guidance across MCP schema profiles`) gives those tuples an `items` schema, the union of their elements, for clients that only read `items`. It is in the `rea-agents-6.6.0` tag, but npm `latest` is still 6.5.0, so `npx rea-agents@latest` serves the schemas without `items` until 6.6.0 is published. Not run: VS Code itself. That its "array type must have items" check is what rejects these nodes is inferred from the schemas, not observed in the client. <details><summary>The 23 tools in 6.5.0</summary> `build_call_path`, `build_reconstruction_obligation_ledger`, `compare_application_versions`, `compare_artifacts`, `compare_functions`, `compare_javascript_export_shapes`, `compare_managed_members`, `compare_process_captures`, `compare_source_to_bundle`, `compare_wasm_interfaces`, `correlate_static_and_runtime`, `evaluate_reconstruction_coverage`, `find_changed_behavior`, `import_managed_reconstruction`, `inspect_analysis_view`, `project_android_application_graph`, `project_apple_application_graph`, `project_harmony_application_graph`, `project_managed_application_graph`, `reconcile_javascript_runtime`, `trace_application_feature`, `trace_javascript_semantics`, `verify_managed_native_boundaries` </details>
Author
Owner

@XinwangTao commented on GitHub (Oct 18, 2026):

Thanks for the thorough bisect, pablodiazjorge — walking every advertised inputSchema rather than guessing makes the blast radius unambiguous (228 nodes / 23 tools, all from the same limited_directions tuple). One thing worth double-checking in the fix: when prefixItems and items are both present they must stay consistent for the tuple slots that items also covers (here items = union of the elements) — otherwise a strict client that reads both could start rejecting in the opposite direction. The other half of this is release mechanics: npm latest is still 6.5.0, so every npx rea-agents@latest user keeps getting the broken schemas until 6.6.0 actually ships — publishing 6.6.0 as latest would close this for everyone, not just source-build users.

<!-- gh-comment-id:6247510259 --> @XinwangTao commented on GitHub (Oct 18, 2026): Thanks for the thorough bisect, pablodiazjorge — walking every advertised inputSchema rather than guessing makes the blast radius unambiguous (228 nodes / 23 tools, all from the same limited_directions tuple). One thing worth double-checking in the fix: when prefixItems and items are both present they must stay consistent for the tuple slots that items also covers (here items = union of the elements) — otherwise a strict client that reads both could start rejecting in the opposite direction. The other half of this is release mechanics: npm latest is still 6.5.0, so every npx rea-agents@latest user keeps getting the broken schemas until 6.6.0 actually ships — publishing 6.6.0 as latest would close this for everyone, not just source-build users.
Author
Owner

@pablodiazjorge commented on GitHub (Oct 18, 2026):

Update: rea-agents 6.7.0 is now latest on npm and includes 204b9f3ac, so reinstalling or restarting the server from npx rea-agents@latest should advertise these tuples with items. Not checked in VS Code itself.

<!-- gh-comment-id:6247747351 --> @pablodiazjorge commented on GitHub (Oct 18, 2026): Update: rea-agents 6.7.0 is now `latest` on npm and includes 204b9f3ac, so reinstalling or restarting the server from `npx rea-agents@latest` should advertise these tuples with `items`. Not checked in VS Code itself.
Author
Owner

@Jamesyahugh commented on GitHub (Oct 18, 2026):

Reproduced this independently with the installed npm package on Windows x64:

  • VS Code 1.142.0; bundled GitHub Copilot Chat 0.70.0; Node.js 24.12.0.
  • Registration: stdio, command cmd.exe, args ["/d","/c","npx","-y","rea-agents@6.5.0","mcp"].
  • Initialize + tools/list returned server rea 6.5.0 and 207 tools. A recursive scan found 228 input array nodes without items across 23 tools.

For build_reconstruction_obligation_ledger, the six affected branches are under:
inputSchema.properties.evidence_bundle.properties.records.items.properties.relationship_coverage.anyOf[0].oneOf[1 or 2].properties.limited_directions.anyOf[0..2].

Actual singleton:

{"type":"array","prefixItems":[{"type":"string","const":"callers"}],"minItems":1,"maxItems":1}

Expected: the same schema plus "items":{"type":"string","const":"callers"}. The two-slot tuple needs items accepting the literal union "callers" | "callees"; its positional schemas and exact length must stay intact.

The check extracted from the shipped Copilot 0.70.0 extension reproduces the exact error on the original catalog (23 rejected tools, including the ledger). An equivalent local backport of the literal-rest fix in 204b9f3ac to the installed MCP relationship-coverage producer yielded:

  • Same 207 tools; zero input array nodes missing items; zero rejections by that installed Copilot array check.
  • Resolved-schema comparison: only the intended tuple items additions (plus generated reference/schema identity changes).
  • 18 canonical tuple cases preserve valid singleton/pair forms and reject empty, reversed, duplicate, unrelated, null and oversized forms.
  • A real stdio tools/call for the empty-bundle ledger fixture succeeds; an unknown root key is rejected.

This is a local 6.5.0 workaround, not a new upstream fix. The official npm 6.7.0 package is published, but a registration explicitly pinned to 6.5.0 remains affected. Native VS Code reconnection/screenshot verification was not completed: the Computer Use app-approval channel was unavailable. No claim of full in-app verification.

<!-- gh-comment-id:6253300892 --> @Jamesyahugh commented on GitHub (Oct 18, 2026): Reproduced this independently with the installed npm package on Windows x64: - VS Code 1.142.0; bundled GitHub Copilot Chat 0.70.0; Node.js 24.12.0. - Registration: stdio, command `cmd.exe`, args `["/d","/c","npx","-y","rea-agents@6.5.0","mcp"]`. - Initialize + `tools/list` returned server `rea` 6.5.0 and 207 tools. A recursive scan found 228 input array nodes without `items` across 23 tools. For `build_reconstruction_obligation_ledger`, the six affected branches are under: `inputSchema.properties.evidence_bundle.properties.records.items.properties.relationship_coverage.anyOf[0].oneOf[1 or 2].properties.limited_directions.anyOf[0..2]`. Actual singleton: ```json {"type":"array","prefixItems":[{"type":"string","const":"callers"}],"minItems":1,"maxItems":1} ``` Expected: the same schema plus `"items":{"type":"string","const":"callers"}`. The two-slot tuple needs `items` accepting the literal union `"callers" | "callees"`; its positional schemas and exact length must stay intact. The check extracted from the shipped Copilot 0.70.0 extension reproduces the exact error on the original catalog (23 rejected tools, including the ledger). An equivalent local backport of the literal-rest fix in 204b9f3ac to the installed MCP relationship-coverage producer yielded: - Same 207 tools; zero input array nodes missing `items`; zero rejections by that installed Copilot array check. - Resolved-schema comparison: only the intended tuple `items` additions (plus generated reference/schema identity changes). - 18 canonical tuple cases preserve valid singleton/pair forms and reject empty, reversed, duplicate, unrelated, null and oversized forms. - A real stdio `tools/call` for the empty-bundle ledger fixture succeeds; an unknown root key is rejected. This is a local 6.5.0 workaround, not a new upstream fix. The official npm 6.7.0 package is published, but a registration explicitly pinned to 6.5.0 remains affected. Native VS Code reconnection/screenshot verification was not completed: the Computer Use app-approval channel was unavailable. No claim of full in-app verification.
Author
Owner

@XinwangTao commented on GitHub (Oct 25, 2026):

Thanks for the update — good to see 6.7.0 is now latest on npm with the tuple items fix, so new/restarted npx rea-agents@latest servers should pass the VS Code validator. Agreed with Jamesyahugh's caveat: registrations explicitly pinned to 6.5.0 (or any pre-6.6.0 tag) remain affected until upgraded, so a release-note reminder to re-validate after upgrading would help users who pin versions.

<!-- gh-comment-id:6391726166 --> @XinwangTao commented on GitHub (Oct 25, 2026): Thanks for the update — good to see 6.7.0 is now latest on npm with the tuple `items` fix, so new/restarted `npx rea-agents@latest` servers should pass the VS Code validator. Agreed with Jamesyahugh's caveat: registrations explicitly pinned to 6.5.0 (or any pre-6.6.0 tag) remain affected until upgraded, so a release-note reminder to re-validate after upgrading would help users who pin versions.
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#3080
No description provided.