LearnNewsExamplesServices
Frontmatter
id9837
titleMCP Server: Support nested array schemas in OpenApiValidator
stateOpen
labels
enhancementai
assignees[]
createdAtApr 9, 2026, 10:33 PM
updatedAtApr 9, 2026, 10:33 PM
githubUrlhttps://github.com/neomjs/neo/issues/9837
authortobiu
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]

MCP Server: Support nested array schemas in OpenApiValidator

Openenhancementai
tobiu
tobiu commented on Apr 9, 2026, 10:33 PM

The OpenApiValidator.mjs within the MCP Server infrastructure currently forces all arrays defined in openapi.yaml to be mapped to z.array(z.string()).

While this handles simple arrays, it causes a ZodError for tools that require an array of objects (e.g., simulateEvent, which expects an array of event objects like { type: "click", targetId: "test" }).

We need to enhance buildZodSchema to introspect the items property of the array schema and properly map nested structures like objects to z.object() instead of defaulting all arrays to strings. This will support more robust complex payloads passed over the bridge via MCP tools.

tobiu added the enhancement label on Apr 9, 2026, 10:33 PM
tobiu added the ai label on Apr 9, 2026, 10:33 PM
tobiu cross-referenced by #9838 on Apr 9, 2026, 10:47 PM