File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -1327,9 +1327,8 @@ MCP servers can prompt the user to perform a URL-based action through URL elicit
13271327// Server-side: Prompt the user to navigate to a URL
13281328const result = await server .server .elicitURLInput ({
13291329 message: ' Please enter your API key' ,
1330- requestedSchema: {
1331- type: ' string'
1332- }
1330+ elicitationId: ' 550e8400-e29b-41d4-a716-446655440000' ,
1331+ url: ' http://localhost:3000/api-key'
13331332});
13341333
13351334// Alternative, return an error from within a tool:
@@ -1338,7 +1337,7 @@ throw new UrlElicitationRequiredError([
13381337 mode: ' url' ,
13391338 message: ' This tool requires a payment confirmation. Open the link to confirm payment!' ,
13401339 url: ` http://localhost:${MCP_PORT }/confirm-payment?session=${sessionId }&elicitation=${elicitationId }&cartId=${encodeURIComponent (cartId )} ` ,
1341- elicitationId
1340+ elicitationId: ' 550e8400-e29b-41d4-a716-446655440000 '
13421341 }
13431342]);
13441343```
You can’t perform that action at this time.
0 commit comments