Skip to content

Conversation

@ochafik
Copy link
Contributor

@ochafik ochafik commented Oct 16, 2025

Description

Expands the startElicitation tool:

  • More field types:
    • string (plain and with default values)
    • boolean
    • email (format: "email")
    • uri (format: "uri")
    • date (format: "date") (note: didn't add date-time)
    • integer (with min/max and default)
    • number (with min/max and default)
    • enum with enumNames for human-readable labels
  • Added required fields support (name field is required)
  • Added 10-minute timeout to elicitation request
  • Inlined requestElicitation helper

cc/ @bhosmer-ant

🤖 Generated with Claude Code

Server Details

  • Server: everything
  • Changes to: startElicitation tool

Motivation and Context

Make it easy to test more elicitation features (string formats, numeric bounds, required fields)

How Has This Been Tested?

In the inspector

cd src/everything
npm i
npm run build
npx -y @modelcontextprotocol/inspector npm -- run --silent start

Breaking Changes

None

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 Protocol Documentation
  • My changes follows MCP security best practices
  • I have updated the server's README accordingly
  • I have tested this with an LLM client
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have documented all environment variables and configuration options

Additional context

This commit ports the comprehensive elicitation field type demonstration
from modelcontextprotocol/example-remote-server PR #17 to the everything
server, while maintaining the better UX of the existing implementation.

Changes:
- Expanded elicitation schema to demonstrate 9 field types:
  * string (plain and with default values)
  * boolean
  * email (format: "email")
  * uri (format: "uri")
  * date (format: "date")
  * integer (with min/max and default)
  * number (with min/max and default)
  * enum with enumNames for human-readable labels
- Added required fields support (name field is required)
- Added 10-minute timeout to elicitation request
- Improved response handling to dynamically show all provided fields
- Updated tool description to reflect comprehensive field type support
- Removed unused requestElicitation helper function (inlined implementation)
- Removed unused ElicitRequest import

The implementation follows PR #17's approach of directly using
extra.sendRequest() while preserving the user-friendly response handling
with emojis and formatted output from the original implementation.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@ochafik ochafik changed the title elicitation: add more types everything: add more types to startElicitation tool Oct 16, 2025
@ochafik ochafik marked this pull request as ready for review October 16, 2025 18:26
Copy link
Contributor

@bhosmer-ant bhosmer-ant left a comment

Choose a reason for hiding this comment

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

LGTM!

@bhosmer-ant bhosmer-ant merged commit 0838dce into main Oct 16, 2025
23 checks passed
@bhosmer-ant bhosmer-ant deleted the ochafik/port-pr17-elicitation branch October 16, 2025 18:48
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