docs Improve MCP readme

This commit is contained in:
Christian Tzolov 2024-12-28 23:56:16 +01:00
commit 347f86ff19

View file

@ -60,27 +60,6 @@ public class McpSyncServer {
this.asyncServer.removeTool(toolName).block();
}
/**
* Notify clients that the list of available tools has changed.
*/
public void notifyToolsListChanged() {
this.asyncServer.notifyToolsListChanged().block();
}
/**
* Notify clients that the list of available resources has changed.
*/
public void notifyResourcesListChanged() {
this.asyncServer.notifyResourcesListChanged().block();
}
/**
* Notify clients that the list of available prompts has changed.
*/
public void notifyPromptsListChanged() {
this.asyncServer.notifyPromptsListChanged().block();
}
/**
* Add a new resource handler.
* @param resourceHandler The resource handler to add
@ -113,6 +92,27 @@ public class McpSyncServer {
this.asyncServer.removePrompt(promptName).block();
}
/**
* Notify clients that the list of available tools has changed.
*/
public void notifyToolsListChanged() {
this.asyncServer.notifyToolsListChanged().block();
}
/**
* Notify clients that the list of available resources has changed.
*/
public void notifyResourcesListChanged() {
this.asyncServer.notifyResourcesListChanged().block();
}
/**
* Notify clients that the list of available prompts has changed.
*/
public void notifyPromptsListChanged() {
this.asyncServer.notifyPromptsListChanged().block();
}
/**
* Close the server gracefully.
*/