Skip to content

Conversation

owengo
Copy link

@owengo owengo commented Aug 20, 2025

This change allows to handle elicitations without any data, just the user action.

Motivation and Context

The change allows to create very simple "Accept / Reject / Cancel" elicitations without check boxes or input data for the user.

cf: #1284

How Has This Been Tested?

Yes we have an MCP server which allows create and update documents in a database, and we have an elicitation requiring the user to accept the action

Breaking Changes

No, the behavior is exactly the same for all the elicitations which actually require data.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

The behavior is possible with the typescript sdk, but not the python sdk:

   const result = await server.server.elicitInput({
       message: `${confirmationMessage}`,
        requestedSchema: {
         type: "object",
         properties: {
         },
         required: []
       }
     });  
     if (result.action === "accept") { 
       log.warn(`User accepted usage of ${toolName}`, {
         user: userEmail,
       });
       return true;
     } else {
...

@owengo owengo requested a review from a team as a code owner August 20, 2025 13:12
@owengo owengo requested a review from ochafik August 20, 2025 13:12
Copy link

@ochafik ochafik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @owengo, thanks for sending this!

Suggesting an alternative fix below, please lemme know your thoughts :-)

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.

3 participants