Skip to content

fix(plugin-mcp): safe schema handling in withoutRequired (#17844) - #17850

Open
Rodrigoue9 wants to merge 1 commit into
payloadcms:mainfrom
Rodrigoue9:fix/bounty-17844
Open

fix(plugin-mcp): safe schema handling in withoutRequired (#17844)#17850
Rodrigoue9 wants to merge 1 commit into
payloadcms:mainfrom
Rodrigoue9:fix/bounty-17844

Conversation

@Rodrigoue9

Copy link
Copy Markdown

Title

fix(plugin-mcp): guard against non-object schemas in update validator withoutRequired (#17844)

Description

  • Adds guard checking for valid schema object before destructuring required in withoutRequired.
  • Prevents runtime crashes (TypeError) during MCP update tool registration when entity schema generation returns a permissive or non-object fallback.

Closes #17844

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.

plugin-mcp: update tool registration crashes when schema conversion falls back to permissive Zod schema

1 participant