Fix: Respect explicit listChanged: false capability setting (#1513)
This commit is contained in:
parent
65bbceab77
commit
8654c7fd3a
2 changed files with 97 additions and 4 deletions
|
|
@ -117,7 +117,7 @@ export class McpServer {
|
|||
|
||||
this.server.registerCapabilities({
|
||||
tools: {
|
||||
listChanged: true
|
||||
listChanged: this.server.getCapabilities().tools?.listChanged ?? true
|
||||
}
|
||||
});
|
||||
|
||||
|
|
@ -429,7 +429,7 @@ export class McpServer {
|
|||
|
||||
this.server.registerCapabilities({
|
||||
resources: {
|
||||
listChanged: true
|
||||
listChanged: this.server.getCapabilities().resources?.listChanged ?? true
|
||||
}
|
||||
});
|
||||
|
||||
|
|
@ -509,7 +509,7 @@ export class McpServer {
|
|||
|
||||
this.server.registerCapabilities({
|
||||
prompts: {
|
||||
listChanged: true
|
||||
listChanged: this.server.getCapabilities().prompts?.listChanged ?? true
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -452,7 +452,10 @@ export class Server extends Protocol<ServerContext> {
|
|||
return this._clientVersion;
|
||||
}
|
||||
|
||||
private getCapabilities(): ServerCapabilities {
|
||||
/**
|
||||
* Returns the current server capabilities.
|
||||
*/
|
||||
public getCapabilities(): ServerCapabilities {
|
||||
return this._capabilities;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue