Skip to content

Conversation

@antonpk1
Copy link
Collaborator

@antonpk1 antonpk1 commented Jan 8, 2026

Summary

Aligns the TypeScript types and generated Zod schemas with the specification.

Changes

The spec (apps.mdx line 444) defines toolInfo.id as optional:

toolInfo?: {
  id?: RequestId,  // <-- optional in spec
  tool: Tool,
};

However, the implementation had it as required. This PR fixes the mismatch.

Why this matters

This allows hosts to pass just the tool definition without needing a request ID, which is useful when the widget only needs to know which tool was called (e.g., for custom loading screens per tool type).

The spec (apps.mdx) defines toolInfo.id as optional (id?: RequestId),
but the TypeScript types and generated schemas had it as required.

This allows hosts to pass just the tool definition without needing
a request ID, which is useful when the tool name is the primary
information needed by the widget.
@pkg-pr-new
Copy link

pkg-pr-new bot commented Jan 8, 2026

Open in StackBlitz

npm i https://pkg.pr.new/modelcontextprotocol/ext-apps/@modelcontextprotocol/ext-apps@216

commit: 4012136

@antonpk1 antonpk1 closed this Jan 8, 2026
@antonpk1 antonpk1 reopened this Jan 8, 2026
@antonpk1 antonpk1 merged commit c475dc3 into main Jan 8, 2026
32 checks passed
@ochafik ochafik mentioned this pull request Jan 9, 2026
ochafik added a commit that referenced this pull request Jan 9, 2026
Merge latest changes from main including:
- Vue, Svelte, Preact, and Solid basic server examples (#141)
- safeAreaInsets support (#202)
- E2E test fixes (#206)
- npm publishing for examples (#184)
- ui.resourceUri optional (#210)
- Method names as consts (#192)
- toolInfo.id optional (#216)
- PostMessageTransport security fixes (#207, #208)
- Server-utils.ts refactoring
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants