Agents: document MCP client elicitation + url-elicitation changelog#31974
Draft
mattzcarey wants to merge 11 commits into
Draft
Agents: document MCP client elicitation + url-elicitation changelog#31974mattzcarey wants to merge 11 commits into
mattzcarey wants to merge 11 commits into
Conversation
…elog - New Elicitation section in the McpClient API docs: onElicitRequest, handler-driven capability advertisement (form+url with an override, form-only without), explicit capability narrowing, and the broadcast/respond pattern for forwarding elicitation to a UI - Cross-link from the server-side elicitInput docs - Changelog: URL elicitations are in the Agents SDK
Contributor
Review
Fix in your agentFix the following review findings in PR #31974 (https://github.com/cloudflare/cloudflare-docs/pull/31974).
Before making changes, review each finding and present a brief summary table:
- For each finding, state whether you agree, disagree, or need clarification
- If you disagree (e.g. the fix requires disproportionate effort for minimal benefit,
or the finding is factually incorrect), explain why
- If you need clarification before deciding, ask those questions
- Then share your plan for which issues to tackle and in what order
After triaging, fix all legitimate findings. For any you decide to skip,
post a comment on this PR with the finding ID and your reasoning.
---
## Code Review
### Suggestions (1)
#### CR-fb0f7b385b05 · Misleading code example comment
- **File:** `src/content/changelog/agents/2026-07-09-url-elicitation.mdx` line 39
- **Issue:** The form-mode comment in the TypeScript example says "collect the fields described by requestedSchema", but the next line returns `{ action: "decline", content: {} }` instead of collecting anything. A developer copying the snippet may be confused about why the return value does not match the comment.
- **Fix:** Update the comment to explain that the example declines form-mode requests, matching the fuller comment in `src/content/docs/agents/model-context-protocol/apis/client-api.mdx` ("Form mode: collect the fields described by requestedSchema, or decline if your surface cannot prompt the user").
---
## Style Guide Review
### Warnings (1)
#### SG-03b8011f3d5e · Internal links must have a trailing slash
- **File:** `src/content/docs/agents/model-context-protocol/apis/client-api.mdx` line 437
- **Issue:** Internal link `](/agents/model-context-protocol/apis/agent-api/#elicitinputoptions-context)` omits the trailing slash before the anchor.
- **Fix:** Change the link to `](/agents/model-context-protocol/apis/agent-api/#elicitinputoptions-context)`.
### Suggestions (1)
#### SG-33c9b1a171c0 · Passive voice
- **File:** `src/content/changelog/agents/2026-07-09-url-elicitation.mdx` line 49
- **Issue:** Line uses passive constructions: `is now honored` and `is persisted`.
- **Fix:** Rewrite in active voice, e.g., `addMcpServer now honors an explicitly declared ...`.
Code ReviewThis code review is in beta and may not always be helpful — use your judgment. Suggestions (1)
ConventionsNo convention issues found. Style Guide ReviewWarnings (1)
Suggestions (1)
CommandsOnly codeowners can run commands. Post a comment with the command to trigger it.
|
Contributor
|
This pull request requires reviews from CODEOWNERS as it changes files that match the following patterns:
|
Contributor
irvinebroque
approved these changes
Jul 11, 2026
irvinebroque
left a comment
Contributor
There was a problem hiding this comment.
How about taking the mermaid diagram from here and using to convey this flow in changelog?
https://modelcontextprotocol.io/specification/draft/client/elicitation
Stamp so you have it, see comments
| @@ -0,0 +1,63 @@ | |||
| --- | |||
| title: URL elicitations are in the Agents SDK | |||
Contributor
There was a problem hiding this comment.
Suggested change
| title: URL elicitations are in the Agents SDK | |
| title: Respond to elicitation requests from MCP servers, using the Agents SDK |
Suggest something in title that says MCP? And tries to convey what you can now do?
|
|
||
| </TypeScriptExample> | ||
|
|
||
| The advertised modes are persisted with each MCP server, so connections restored after Durable Object hibernation advertise the same modes and the handlers reattach when `onStart()` runs. Agents without configured handlers advertise no elicitation capability, so servers use their non-elicitation fallbacks instead of sending requests the agent cannot answer. |
Contributor
There was a problem hiding this comment.
Suggested change
| The advertised modes are persisted with each MCP server, so connections restored after Durable Object hibernation advertise the same modes and the handlers reattach when `onStart()` runs. Agents without configured handlers advertise no elicitation capability, so servers use their non-elicitation fallbacks instead of sending requests the agent cannot answer. | |
| The Agents SDK automatically persists the modes that each MCP server advertises, so connections restored after Durable Object hibernation advertise the same modes and the handlers reattach when `onStart()` runs. Agents without configured handlers advertise no elicitation capability, so servers use their non-elicitation fallbacks instead of sending requests the agent cannot answer. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Documents MCP client elicitation support in the Agents SDK, finalized in cloudflare/agents#1911 (with #1903 and #1910).
client-api.mdx: new Elicitation section — registering handlers withthis.mcp.configureElicitationHandlers({ form, url })inonStart(); handler-driven capability advertisement (connections advertise exactly the configured modes, no handlers means no elicitation capability, explicitclient.capabilities.elicitationdeclarations win and are persisted); hibernation behavior (restored connections advertise the persisted modes and handlers reattach whenonStart()runs); why url mode keeps sensitive URLs such as OAuth links out of model context; and the broadcast/@callablepattern for forwarding elicitation requests to a browser UI, linking the runnablemcp-clientandmcp-elicitationexamples.agent-api.mdx: cross-link from the server-side elicitation note to the client-side handler guidance.2026-07-09-url-elicitation.mdx— "URL elicitations are in the Agents SDK": why to use url elicitations, how to register handlers, how to upgrade.Important
Draft on purpose — do not merge yet. The documented API is in
cloudflare/agentsmainbut not yet released (pending Version Packages). Merging would publish a changelog for an unreleased feature. Before marking ready: confirm the Agents SDK release containing #1911 has shipped, and update the changelog entry's filename/dateto the publish date.Documentation checklist