Skip to content

Commit f2766ed

Browse files
committed
ui/notifications/tool-input* (singular to match inputSchema)
1 parent f3e34ae commit f2766ed

File tree

4 files changed

+16
-16
lines changed

4 files changed

+16
-16
lines changed

SEP.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -489,12 +489,12 @@ Host SHOULD add the message to the conversation thread, preserving the specified
489489

490490
##### Notifications (Host → UI)
491491

492-
**`ui/notifications/tool-inputs`** \- Host MUST send this notification with the complete tool arguments after the Guest UI's initialize request completes.
492+
**`ui/notifications/tool-input`** \- Host MUST send this notification with the complete tool arguments after the Guest UI's initialize request completes.
493493

494494
\`\`\`
495495
{
496496
jsonrpc: "2.0",
497-
method: "ui/tool-inputs",
497+
method: "ui/notifications/tool-input",
498498
params: {
499499
arguments: Record\<string, unknown\> // Tool input arguments
500500
}
@@ -503,12 +503,12 @@ Host SHOULD add the message to the conversation thread, preserving the specified
503503

504504
Host sends this notification after the Guest UI's `initialize` request completes, when tool arguments become available. This notification is sent at most once and is required before sending `ui/tool-result`.
505505

506-
**`ui/tool-inputs-partial`** \- Host MAY send this notification zero or more times while the agent is streaming tool arguments, before ui/tool-inputs is sent.
506+
**`ui/notifications/tool-input-partial`** \- Host MAY send this notification zero or more times while the agent is streaming tool arguments, before ui/notifications/tool-input is sent.
507507

508508
\`\`\`
509509
{
510510
jsonrpc: "2.0",
511-
method: "ui/tool-inputs-partial",
511+
method: "ui/notifications/tool-input-partial",
512512
params: {
513513
arguments: Record\<string, unknown\> // Tool input arguments
514514
}
@@ -519,7 +519,7 @@ The arguments object represents best-effort recovery of incomplete JSON, with un
519519

520520
- MAY parse the agent's partial JSON output by closing unclosed brackets/braces
521521
- MAY send recovered arguments as they become available during streaming
522-
- MUST stop sending once ui/tool-inputs is sent with complete arguments
522+
- MUST stop sending once ui/notifications/tool-input is sent with complete arguments
523523

524524
Guest UI behavior (optional):
525525

@@ -683,9 +683,9 @@ autonumber
683683
H **\--\>\>** UI**:** InitializeResult (e.g., host-context, capabilities, etc.)
684684
UI **\-\>\>** H**:** notifications/initialized
685685
**opt** Stream Tool input to UI
686-
H **\--\>\>** UI**:** ui/notifications/tool-inputs-partial (0..n)
686+
H **\--\>\>** UI**:** ui/notifications/tool-input-partial (0..n)
687687
**end**
688-
H **\--\>\>** UI**:** ui/notifications/tool-inputs (complete)
688+
H **\--\>\>** UI**:** ui/notifications/tool-input (complete)
689689
**end**
690690
**alt** Tool complete
691691
H **\--\>\>** UI**:** ui/notifications/tool-result
@@ -710,9 +710,9 @@ autonumber
710710
UI **\-\>\>** H**:** tools/call
711711
H **\-\>\>** S**:** tools/call
712712
**opt** Stream Tool input to UI
713-
H **\--\>\>** UI**:** ui/notifications/tool-inputs-partial (0..n)
713+
H **\--\>\>** UI**:** ui/notifications/tool-input-partial (0..n)
714714
**end**
715-
H **\--\>\>** UI**:** ui/notifications/tool-inputs (complete)
715+
H **\--\>\>** UI**:** ui/notifications/tool-input (complete)
716716
H**\--\>\>**UI**:** ui/notifications/tool-result
717717
**else** Message
718718
UI **\-\>\>** H**:** ui/message
@@ -758,15 +758,15 @@ autonumber
758758

759759
Tool execution results are passed to the UI through two mechanisms:
760760

761-
#### 1\. Tool Input (via `ui/notifications/tool-inputs` notification)
761+
#### 1\. Tool Input (via `ui/notifications/tool-input` notification)
762762

763763
The original tool call arguments:
764764
\`\`\`
765765
// Tool was called with:
766766
tools/call("get_weather", { location: "San Francisco" })
767767

768768
// UI receives:
769-
notification: ui/tool-inputs
769+
notification: ui/notifications/tool-input
770770
params: {
771771
arguments: { location: "San Francisco" }
772772
}

src/app-host.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ export class AppHost extends Protocol<Request, Notification, Result> {
120120

121121
sendToolInput(params: McpUiToolInputNotification["params"]) {
122122
return this.notification(<McpUiToolInputNotification>{
123-
method: "ui/notifications/tool-inputs",
123+
method: "ui/notifications/tool-input",
124124
params,
125125
});
126126
}

src/types.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ export type McpUiSizeChangeNotification = z.infer<
7575
>;
7676

7777
export const McpUiToolInputNotificationSchema = z.object({
78-
method: z.literal("ui/notifications/tool-inputs"),
78+
method: z.literal("ui/notifications/tool-input"),
7979
params: z.object({
8080
arguments: z.record(z.unknown()).optional(),
8181
}),
@@ -85,7 +85,7 @@ export type McpUiToolInputNotification = z.infer<
8585
>;
8686

8787
export const McpUiToolInputPartialNotificationSchema = z.object({
88-
method: z.literal("ui/notifications/tool-inputs-partial"),
88+
method: z.literal("ui/notifications/tool-input-partial"),
8989
params: z.object({
9090
arguments: z.record(z.unknown()).optional(),
9191
}),

types.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ export type McpUiSizeChangeNotification = z.infer<
7777
>;
7878

7979
export const McpUiToolInputNotificationSchema = z.object({
80-
method: z.literal("ui/notifications/tool-inputs"),
80+
method: z.literal("ui/notifications/tool-input"),
8181
params: z.object({
8282
arguments: z.record(z.unknown()).optional(),
8383
}),
@@ -87,7 +87,7 @@ export type McpUiToolInputNotification = z.infer<
8787
>;
8888

8989
export const McpUiToolInputPartialNotificationSchema = z.object({
90-
method: z.literal("ui/notifications/tool-inputs-partial"),
90+
method: z.literal("ui/notifications/tool-input-partial"),
9191
params: z.object({
9292
arguments: z.record(z.unknown()).optional(),
9393
}),

0 commit comments

Comments
 (0)