evalstate's picture
download
raw
1.15 kB
import { logger } from './logger.js';
export function registerCapabilities(server, sharedApiClient, options = {}) {
const transportInfo = sharedApiClient.getTransportInfo();
const { hasResources = false, hasSkills = false } = options;
const advertiseResources = hasResources || hasSkills;
const capabilities = {
tools: {
listChanged: !transportInfo?.jsonResponseEnabled,
},
prompts: {
listChanged: false,
},
...(advertiseResources
? {
resources: {
subscribe: false,
listChanged: false,
},
}
: {}),
...(hasSkills
? {
extensions: {
'io.modelcontextprotocol/skills': {},
},
}
: {}),
};
server.server.registerCapabilities(capabilities);
if (server.server._capabilities?.completions) {
delete server.server._capabilities.completions;
logger.debug('Removed auto-added completions capability');
}
}
//# sourceMappingURL=capability-utils.js.map

Xet Storage Details

Size:
1.15 kB
·
Xet hash:
50480ff9e4223733edbfabadef06f54f81cb2b4caca104180f081dfefc60cd64

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.