Frontmatter
| id | 10043 |
| title | Fix MCP OutputSchema Strict JSON-RPC Compliance and Zod Array Type Mapping |
| state | Closed |
| labels | bugai |
| assignees | tobiu |
| createdAt | Apr 16, 2026, 7:13 PM |
| updatedAt | May 15, 2026, 2:41 PM |
| githubUrl | https://github.com/neomjs/neo/issues/10043 |
| author | tobiu |
| commentsCount | 0 |
| parentIssue | null |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| blockedBy | [] |
| blocking | [] |
| closedAt | Apr 16, 2026, 7:40 PM |
Fix MCP OutputSchema Strict JSON-RPC Compliance and Zod Array Type Mapping
tobiu cross-referenced by PR #10044 on Apr 16, 2026, 7:14 PM
tobiu assigned to @tobiu on Apr 16, 2026, 7:17 PM
tobiu closed this issue on Apr 16, 2026, 7:40 PM
tobiu cross-referenced by #10064 on Apr 18, 2026, 7:46 PM
tobiu cross-referenced by PR #10065 on Apr 18, 2026, 7:51 PM
tobiu cross-referenced by #9837 on Apr 18, 2026, 9:08 PM
tobiu cross-referenced by PR #10067 on Apr 18, 2026, 9:14 PM
tobiu cross-referenced by #10068 on Apr 18, 2026, 9:57 PM
tobiu cross-referenced by PR #10069 on Apr 18, 2026, 10:02 PM
tobiu cross-referenced by #10070 on Apr 18, 2026, 10:42 PM
tobiu cross-referenced by PR #10071 on Apr 18, 2026, 10:50 PM
tobiu cross-referenced by #10072 on Apr 18, 2026, 11:38 PM
tobiu cross-referenced by #10074 on Apr 19, 2026, 1:01 AM
Architectural Problem
The MCP Client strict validation layer experienced Zod schema mismatches due to parsing bugs in the OS's internal
OpenApiValidatorwhich maps OpenAPI payload definitions to runtime.describe()Zod bindings.Specifically:
z.array(z.string())), fracturing endpoint bindings.outputSchemainstances parse strictly astype: "object". Certain endpoints (likeget_computed_stylesinneural-link) resolved correctly inside the target application, but returned root-level Array mappings via.send(), rendering them non-compliant and failing strict Client connection handshakes.Solution
switch()cases withinbuildZodSchemaand transitioned map traversal down tobuildZodSchemaFromNodedirectly, fully inheriting native types (numbers,integers,booleans, etc.) inherently resolving Input schema bounds.OpenApiValidatormapping was dynamically updated to force any OpenAPI definition whose resolved schema ($ref) does not structurally equate to an object to automatically wrap its structure within{ result: value }.neural-link,memory-core,knowledge-base,file-system,github-workflow) explicitly adjusted theirCallToolRequestSchemaresponse returns to encapsulate primitives and arrays natively into mapping payloads so MCP-Client Zod failures bypass organically.