fix(create_event): use flat parameters for MCP client compatibility#26
Open
madbonez wants to merge 1 commit intoOmar-V2:mainfrom
Open
fix(create_event): use flat parameters for MCP client compatibility#26madbonez wants to merge 1 commit intoOmar-V2:mainfrom
madbonez wants to merge 1 commit intoOmar-V2:mainfrom
Conversation
Some MCP clients (e.g. Cursor IDE) pass tool parameters as flat args or serialize nested objects as JSON strings, causing Pydantic validation errors. Switch create_event from single CreateEventRequest to flat params (title, start_time, end_time + optional fields). Server still builds CreateEventRequest internally; CalendarManager unchanged. Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
MCP Client Compatibility
create_event tool (2026-02)
Some MCP clients (e.g. Cursor IDE) pass tool parameters differently: nested objects may arrive as JSON strings instead of proper structures, which caused Pydantic validation errors such as: Input should be a valid dictionary or instance of CreateEventRequest.
Change: The create_event tool now accepts flat parameters instead of a single CreateEventRequest object. This is a more universal API: clients can send simple key–value arguments without building nested structures, which works across different MCP implementations and serialization behaviours.
Required: title, start_time, end_time
Optional: calendar_name, location, notes, alarms_minutes_offsets, url, all_day
Inside the server these are still assembled into CreateEventRequest and passed to CalendarManager. Calendar behaviour is unchanged; compatibility with various MCP clients is improved.