Skip to content

feat(turbovault): fix batch_execute MCP schema with typed input model#8

Merged
nicholasjpaterno merged 1 commit intoEpistates:mainfrom
slikts:main
Apr 6, 2026
Merged

feat(turbovault): fix batch_execute MCP schema with typed input model#8
nicholasjpaterno merged 1 commit intoEpistates:mainfrom
slikts:main

Conversation

@slikts
Copy link
Copy Markdown
Contributor

@slikts slikts commented Apr 5, 2026

The loosely-typed batch operations were causing ChatGPT to fail like this when adding the server: "Invalid schema for function 'batch_execute': In context=('properties', 'operations'), array schema items is not an object." I also tested in Claude, but it worked without errors there, so it apparently depends on how permissive the JSON schema parsing is for any particular client.

replace batch_execute input from untyped JSON values to a schema-friendly BatchOperationInput enum
derive JsonSchema for MCP tool generation and keep serde-tagged operation variants
convert MCP-facing BatchOperationInput values into internal BatchOperation before execution
remove manual serde_json::Value parsing loop in batch_execute
add schemars dependency wiring needed for schema generation
keep existing transactional behavior and empty-operations validation unchanged
@nicholasjpaterno
Copy link
Copy Markdown
Contributor

@slikts Thanks for opening this PR, I’m taking a look now!

@nicholasjpaterno nicholasjpaterno merged commit f512c32 into Epistates:main Apr 6, 2026
2 of 3 checks passed
@nicholasjpaterno
Copy link
Copy Markdown
Contributor

nicholasjpaterno commented Apr 6, 2026

@slikts thanks for this! I'm merging this as is, I'm going to fast follow with a few small changes and we'll get this shipped asap!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants