Skip to content

fix(mcp): ask before accepting an empty elicitation - #64861

Closed
DEV-S-SHAH wants to merge 1 commit into
anomalyco:devfrom
DEV-S-SHAH:mcp-empty-confirm
Closed

DEV-S-SHAH wants to merge 1 commit into
anomalyco:devfrom
DEV-S-SHAH:mcp-empty-confirm

Conversation

@DEV-S-SHAH

Copy link
Copy Markdown

Issue for this PR

Closes #63463

Type of change

  • Bug fix

What does this PR do?

An MCP form elicitation with an empty requestedSchema.properties was answered with { "action": "accept", "content": {} } without showing anything. An empty form is how a server asks for plain confirmation ("Send this message?"), so the user should get to accept, decline, or cancel.

This shows a single required boolean Confirm field carrying the server's message. A true answer maps to accept with empty content, false maps to decline, and dismissing the form maps to cancel. The existing test is updated to answer the confirmation form and assert the resulting accept result.

How did you verify your code works?

  • bun test test/mcp.test.ts from packages/core: 114 pass
  • bun run typecheck:tsc in packages/core

Screenshots / recordings

Not included: the regression test drives the form service directly rather than the TUI.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@DEV-S-SHAH

Copy link
Copy Markdown
Author

Closing as a duplicate of #63469, which was already open for this issue and covers accept, decline, and cancel in its tests. I missed it when preparing this branch.

@opencodejr

opencodejr Bot commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

Thanks for picking up #63463 and for the clear write-up!

This looks like a duplicate of #63469, which is already open for the same issue. It makes the same change: when the schema is empty it shows a single required boolean Confirm field instead of auto-accepting, and maps confirming to accept, refusing to decline and dismissing to cancel. It also has tests for all three cases.

If you think something is missing there, reviewing, testing or commenting on #63469 would be a great way to help.

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.

MCP: a form elicitation with no fields is accepted without asking the user

2 participants