Skip to content

Commit

Permalink
feat: add prompts/list_changed notification
Browse files Browse the repository at this point in the history
Add a notification type that servers can use to inform clients when their list of available prompts has changed, similar to the existing notifications for tools and resources. This allows clients to stay in sync with the server's prompt offerings without polling.
  • Loading branch information
dsp-ant committed Oct 3, 2024
1 parent b03fd43 commit 83232bd
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion schema/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -494,6 +494,13 @@ export interface PromptArgument {
required?: boolean;
}

/**
* An optional notification from the server to the client, informing it that the list of prompts it offers has changed. This may be issued by servers without any previous subscription from the client.
*/
export interface PromptListChangedNotification extends Notification {
method: "notifications/prompts/list_changed";
}

/* Tools */
/**
* Sent from the client to request a list of tools the server has.
Expand Down Expand Up @@ -771,7 +778,8 @@ export type ServerNotification =
| LoggingMessageNotification
| ResourceUpdatedNotification
| ResourceListChangedNotification
| ToolListChangedNotification;
| ToolListChangedNotification
| PromptListChangedNotification;

export type ServerResult =
| EmptyResult
Expand Down

0 comments on commit 83232bd

Please sign in to comment.