feat: Add SDK support for SEP-1034 default values in elicitation schemas (#1337)
Co-authored-by: Tapan Chugh <tapanc@cs.washington.edu> Co-authored-by: Felix Weinberger <3823880+felixweinberger@users.noreply.github.com>
This commit is contained in:
parent
c0f165776d
commit
b85e7bd1a9
1 changed files with 57 additions and 0 deletions
|
|
@ -747,6 +747,8 @@ async def book_table(date: str, time: str, party_size: int, ctx: Context[ServerS
|
|||
_Full example: [examples/snippets/servers/elicitation.py](https://github.com/modelcontextprotocol/python-sdk/blob/main/examples/snippets/servers/elicitation.py)_
|
||||
<!-- /snippet-source -->
|
||||
|
||||
Elicitation schemas support default values for all field types. Default values are automatically included in the JSON schema sent to clients, allowing them to pre-populate forms.
|
||||
|
||||
The `elicit()` method returns an `ElicitationResult` with:
|
||||
|
||||
- `action`: "accept", "decline", or "cancel"
|
||||
|
|
|
|||
Loading…
Reference in a new issue