---
summary: "Elicitation wired on the wire (#211), URL-mode elicitation (#212), sampling surface removed (#220), server identity fields (#213), completable prompt args + resource template completion (#214), RootsRegistry deleted (#218)"
breaking: true
agent-notes: |
  **Breaking — compilation stops for sampling consumers:**
  `Context.sample`, `SamplingOpts`, `CreateMessageResult`, and `SamplingMessage` are removed from the public API. Delete any code paths that reference `ctx.sample` or import these types — the member was always `undefined` at runtime (no production behavior change). Sampling is deprecated by SEP-2577 (MCP 2026-07-28); the recommended replacement is a direct LLM provider service.

  **Elicitation now works on the wire:**
  `ctx.elicit` is defined when the connected client advertised the elicitation capability and `undefined` otherwise. Re-verify any handler that presence-gates on `ctx.elicit` — previously the guard always routed to the fallback; now it routes to the elicit branch for capable clients.

  **Optional adoptions (no breaking change):**
  - Pass `title`, `websiteUrl`, `description`, `icons` to `createApp()`/`createWorkerHandler()` to populate `initialize` serverInfo and `/.well-known/mcp.json`.
  - Wrap `prompt()` args with `completable()` (re-exported from main entry) to enable argument autocompletion.
  - Add `title` to `prompt()` definitions.
  - Add a `complete` map to `resource()` definitions for URI template variable completion.
---

# 0.10.3 — 2026-06-10

## Added

- **`ElicitFn`** — new exported interface for `ctx.elicit`; directly callable for form-mode elicitation and carries a `.url(message, url)` method for URL-mode (external link) elicitation. `elicitationId` is generated internally for URL-mode. ([#211](https://github.com/cyanheads/mcp-ts-core/issues/211), [#212](https://github.com/cyanheads/mcp-ts-core/issues/212))
- **`completable`, `isCompletable`, `CompleteCallback`, `CompleteResourceTemplateCallback`** re-exported from the main entry (`@cyanheads/mcp-ts-core`) so consumers don't need a direct `@modelcontextprotocol/sdk` import. ([#214](https://github.com/cyanheads/mcp-ts-core/issues/214))
- **`PromptDefinition.title`** — optional human-readable display name forwarded to `registerPrompt`'s config and surfaced in `prompts/list`. ([#214](https://github.com/cyanheads/mcp-ts-core/issues/214))
- **`ResourceDefinition.complete`** — optional per-variable completion callbacks (`Record<string, CompleteResourceTemplateCallback>`) forwarded to the SDK's `ResourceTemplate` constructor; the SDK auto-installs `completion/complete` handling and advertises the `completions` capability. ([#214](https://github.com/cyanheads/mcp-ts-core/issues/214))
- **`CreateAppOptions`** — new optional fields `title`, `websiteUrl`, `description`, `icons` (typed against `Implementation['icons']`) forwarded to the `McpServer` constructor's `serverInfo` and to `buildServerManifest` so `initialize` and `/.well-known/mcp.json` stay consistent. Explicit `description` wins over `MCP_SERVER_DESCRIPTION`/`package.json`. ([#213](https://github.com/cyanheads/mcp-ts-core/issues/213))
- **`ManifestServer`** — new optional `title`, `websiteUrl`, `icons` fields in the server manifest output. ([#213](https://github.com/cyanheads/mcp-ts-core/issues/213))
- **Integration tests** — `tests/integration/elicitation.int.test.ts` drives a real SDK client over a linked in-memory transport; `tests/integration/completions.int.test.ts` covers completable prompt args and resource template completion. ([#211](https://github.com/cyanheads/mcp-ts-core/issues/211), [#214](https://github.com/cyanheads/mcp-ts-core/issues/214))
- **Linter regression test** — `tests/unit/linter/prompt-rules.test.ts` covers `generate-required`, `description-required`, `describe-on-fields` on args, and confirms `completable`-wrapped fields pass without warnings. ([#214](https://github.com/cyanheads/mcp-ts-core/issues/214))

## Changed

- **`ctx.elicit`** is now wired at registration time via `elicitInput` and `getClientCapabilities` closures over the per-server SDK `Server` instance (rather than sniffing `RequestHandlerExtra`). Presence is gated at request time on the client's advertised `elicitation` capability. Zod schemas are converted to the spec's restricted flat JSON Schema via `toJSONSchema()` before being sent on the wire. ([#211](https://github.com/cyanheads/mcp-ts-core/issues/211))
- **`HandlerNotifiers` / `ResourceHandlerNotifiers`** — both interfaces gain `elicitInput` and `getClientCapabilities` fields bound at registration time. `wrapElicit` now accepts `notifiers` (not `SdkRuntimeCapabilities`) in both `toolHandlerFactory.ts` and `resourceHandlerFactory.ts`. ([#211](https://github.com/cyanheads/mcp-ts-core/issues/211))
- **`createMockContext`** — when `options.elicit` is provided, the mock context's `ctx.elicit` is promoted to an `ElicitFn` with a default no-op `.url()` stub (`{ action: 'cancel' }`), so tests that only exercise form-mode elicitation don't need to supply `.url` explicitly. ([#212](https://github.com/cyanheads/mcp-ts-core/issues/212))
- **`scripts/audit-open-index-signatures.ts`** — `listSourceFiles()` now filters out worktree-deleted files (`existsSync(p)` guard) so the audit doesn't crash on files removed but not yet staged. ([chore])
- **`@types/node` `^25.9.2` → `25.9.3`** (pinned).

## Removed

- **`ctx.sample`** — removed from `Context`, `ContextDeps`, `createContext`, and all public type exports. Sampling is deprecated by SEP-2577 (MCP 2026-07-28); the member was always `undefined` at runtime. ([#220](https://github.com/cyanheads/mcp-ts-core/issues/220))
- **`SamplingOpts`** — removed from `src/core/context.ts` and the public API. ([#220](https://github.com/cyanheads/mcp-ts-core/issues/220))
- **`CreateMessageResult`, `SamplingMessage`** — removed from the main entry re-exports. ([#220](https://github.com/cyanheads/mcp-ts-core/issues/220))
- **`template_code_review_sampling`** example tool and its smoke test — deleted alongside the sampling surface. ([#220](https://github.com/cyanheads/mcp-ts-core/issues/220))
- **`RootsRegistry`** (`src/mcp-server/roots/roots-registration.ts`) — placeholder class deleted; the `roots/` directory and its test are gone. `RootsRegistry` was never exported publicly and `registerAll()` was a no-op. Roots is also deprecated by SEP-2577. ([#218](https://github.com/cyanheads/mcp-ts-core/issues/218))
- **`MockContextOptions.sample`** — removed from `src/testing/index.ts`. ([#220](https://github.com/cyanheads/mcp-ts-core/issues/220))
