Skip to content

Advertise form elicitation in client#1084

Closed
caseychow-oai wants to merge 2 commits intomodelcontextprotocol:mainfrom
caseychow-oai:caseychow/elicitations
Closed

Advertise form elicitation in client#1084
caseychow-oai wants to merge 2 commits intomodelcontextprotocol:mainfrom
caseychow-oai:caseychow/elicitations

Conversation

@caseychow-oai
Copy link
Copy Markdown

@caseychow-oai caseychow-oai commented Feb 11, 2026

Summary

Align client elicitation behavior with what is actually handled:

  • advertise form elicitation support explicitly
  • decline URL-mode elicitation requests

What Changed

  • client/src/lib/hooks/useConnection.ts
    • changes client capabilities from elicitation: {} to elicitation: { form: {} }
    • adds URL-mode guard in the elicitation/create handler returning { action: "decline" }
  • client/src/lib/hooks/__tests__/useConnection.test.tsx
    • updates capability expectation to assert elicitation.form
    • adds test coverage that URL-mode elicitation is declined and not forwarded to onElicitationRequest

Why

The client should only declare/support elicitation modes it can handle. This keeps capability advertisement and runtime behavior consistent.

Testing

  • cd client && npm test -- --runTestsByPath src/lib/hooks/__tests__/useConnection.test.tsx --watch=false
  • Result: pass (42 tests)

Breaking Changes

None.

AI Disclosure

This PR was prepared with assistance from an AI coding agent.

@caseychow-oai caseychow-oai changed the title [inspector] Declare elicitation form/url client capabilities [inspector] Keep form elicitation support and decline URL mode Feb 12, 2026
@caseychow-oai caseychow-oai changed the title [inspector] Keep form elicitation support and decline URL mode [inspector] Advertise form elicitation and decline URL mode requests Feb 12, 2026
@caseychow-oai caseychow-oai changed the title [inspector] Advertise form elicitation and decline URL mode requests Advertise form elicitation in client Feb 12, 2026
@cliffhall
Copy link
Copy Markdown
Member

@caseychow-oai

  • We're not advertising URL elicitation support yet, so we don't need code to respond to URL elicitation requests with a rejection. Servers should not be sending any such requests.
  • We have a URL elicitation PR on deck, but there's an SDK issue holding up its counterpart, the Everything server PR for URL elicitation that we need for testing. We will roll those out together.
  • We do support form elicitation, but don't need to explicitly say "form", as that's the default. The spec says:

For backwards compatibility, an empty capabilities object is equivalent to declaring support for form mode only:

{
  "capabilities": {
    "elicitation": {}, // Equivalent to { "form": {} }
  },
}

@cliffhall cliffhall closed this Mar 31, 2026
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