servers icon indicating copy to clipboard operation
servers copied to clipboard

Test issue for claude code github action: add Example for SEP-1036: URL Elicitation to Everything Server

Open olaservo opened this issue 1 month ago • 3 comments

Reference

olaservo avatar Nov 26 '25 17:11 olaservo

@claude could you explain more about how url elicitation is supposed to work, based on the MCP documentation?

olaservo avatar Nov 26 '25 17:11 olaservo

Claude finished @olaservo's task —— View job


Explanation of URL Elicitation (SEP-1036)

Based on the existing implementation in the everything server and the MCP protocol, here's how URL elicitation works:

What is Elicitation?

Elicitation is an MCP protocol feature that allows servers to request structured input from users through the client. It's essentially a way for servers to ask users to fill out forms with various field types.

How It Works

  1. Server Initiates: When a server needs user input, it sends an elicitation/create request to the client (see everything.ts:729-797)

  2. Request Structure: The request includes:

    • message: Instructional text shown to the user
    • requestedSchema: A JSON Schema defining the fields to collect
  3. Supported Field Types: The schema can define various input types:

    • string - Text input
    • boolean - Checkbox
    • integer / number - Numeric input with optional min/max
    • enum - Dropdown selection with predefined options
    • Format specifiers for specialized inputs:
      • format: "email" - Email address validation
      • format: "uri" - URL input (this is the "URL elicitation" aspect)
      • format: "date" - Date picker
  4. User Response: The client presents a UI form to the user, who can:

    • Accept - Submit the filled form data
    • Decline - Refuse to provide the information
    • Cancel - Close the dialog without action
  5. Server Receives Result: The server gets back an elicitationResult with:

    • action: "accept", "decline", or "cancel"
    • content: The user's input data (only present if action is "accept")

URL Elicitation Specifically

URL elicitation refers to using the format: "uri" field type in the schema. This tells the client to present a URL-specific input field with appropriate validation (see everything.ts:758-761):

homepage: {
  type: 'string',
  format: 'uri',
  description: 'Homepage / personal site',
}

Example from Everything Server

The startElicitation tool demonstrates a complete implementation at src/everything/everything.ts:726-844, including a homepage field that uses URL elicitation.

Key Benefits

  • Structured data collection from users
  • Type-safe validation using JSON Schema
  • Consistent UX across different MCP clients
  • Specialized input types like URLs, emails, dates

Note: The issue title mentions adding an example for URL elicitation, but the everything server already has a comprehensive implementation. If you'd like me to add additional examples or documentation, please let me know!


claude[bot] avatar Nov 26 '25 17:11 claude[bot]

Note: this run failed at fetching the latest info or querying the docs server since the allowed tools need to be configured.

olaservo avatar Nov 26 '25 17:11 olaservo

Claude finished @olaservo's task —— View job


Analyzed the request

  • [x] Read repository setup instructions (CLAUDE.md)
  • [x] Understand the request and gather context
  • [x] Review existing URL elicitation implementation
  • [ ] Waiting for clarification on next steps

Current Status

I've reviewed the everything server and found that it already has a comprehensive URL elicitation example in src/everything/everything.ts:758-762:

homepage: {
  type: 'string',
  format: 'uri',
  description: 'Homepage / personal site',
}

This is part of the startElicitation tool (lines 726-844) which demonstrates:

  • URL elicitation via format: 'uri'
  • Email elicitation via format: 'email'
  • Date elicitation via format: 'date'
  • String, boolean, integer, number, and enum types
  • Handling of accept/decline/cancel actions

Need Clarification

Since you mentioned me with just "@claude", I need to understand what you'd like me to do:

  1. Add more URL elicitation examples - Create additional examples showing different use cases for URL inputs?
  2. Add documentation - Document the existing URL elicitation feature more thoroughly?
  3. Add tests - Create tests for the URL elicitation functionality?
  4. Something else - Please specify what you'd like me to implement

Please let me know what you'd like me to do, and I'll get started right away!


claude[bot] avatar Dec 08 '25 03:12 claude[bot]