Skip to content

Commit fc3ebfd

Browse files
committed
docs: quick Resolve section on the whats-new page
Surface the Resolve dependency interface in the SDK half as the preferred way to ask the client for input mid-call (era-portable: live elicitation for legacy clients, multi-round-trip on 2026-07-28), with a note that ctx.elicit() for legacy connections and hand-built InputRequiredResult remain, each pointing at its owning page.
1 parent 99c7e8a commit fc3ebfd

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

docs/whats-new.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,16 @@ mcp = MCPServer("Demo") # v1: FastMCP("Demo")
2626

2727
It is also, for a decorator-built server, most of the port. `@mcp.tool()`, `@mcp.resource()`, and `@mcp.prompt()` accept what they accepted in v1 (`@mcp.resource()` adds one optional `security=` keyword), and the input schema still comes from your type hints. Around the edges: everything under `mcp.server.fastmcp.*` now lives under `mcp.server.mcpserver.*`, `ctx.fastmcp` is `ctx.mcp_server`, `get_context()` is gone (declare a `ctx: Context` parameter instead), and the exception base `FastMCPError` is `MCPServerError`. The **[Migration Guide](migration.md#fastmcp-renamed-to-mcpserver)** has the import table.
2828

29+
### `Resolve`: the new way to ask the user for input
30+
31+
Not everything a tool needs should come from the model. New in v2, a tool parameter annotated with `Resolve(fn)` is filled by a function you write instead, invisibly to the model, and that function can return `Elicit(...)` to put a question in front of the user. This is the preferred way to get anything from the client mid-call: the SDK carries the question over whichever mechanism the connection supports (a live elicitation request for a legacy client, a multi-round-trip on 2026-07-28), so one tool body serves both eras. **[Dependencies](handlers/dependencies.md)** is the page.
32+
33+
!!! note
34+
The other two forms remain when you need them: `ctx.elicit()` still works for clients on
35+
legacy connections (**[Elicitation](handlers/elicitation.md)**), and a handler can return an
36+
`InputRequiredResult` itself and drive the rounds by hand, which is also how sampling and
37+
roots requests travel at 2026-07-28 (**[Multi-round-trip requests](handlers/multi-round-trip.md)**).
38+
2939
### A first-class `Client`
3040

3141
v1 handed you three nested layers: a transport context manager yielding raw streams, a `ClientSession` wrapped around them, and a hand-called `await session.initialize()`. v2 has one object:

0 commit comments

Comments
 (0)