MCPcopy Create free account
hub / github.com/bearlyai/OpenADE / initialize

Method initialize

projects/runtime/src/server.ts:453–471  ·  view source on GitHub ↗
(params: RuntimeInitializeParams, context: RuntimeHandlerContext)

Source from the content-addressed store, hash-verified

451 }
452
453 private initialize(params: RuntimeInitializeParams, context: RuntimeHandlerContext): RuntimeInitializeResult {
454 const requestedProtocolVersion = params.protocolVersion
455 if (typeof requestedProtocolVersion === "number" && requestedProtocolVersion !== this.protocolVersion) {
456 throw new RuntimeHandlerError(
457 "unsupported_protocol_version",
458 `Desktop update required: client protocol ${requestedProtocolVersion} is not compatible with runtime protocol ${this.protocolVersion}.`,
459 {
460 clientProtocolVersion: requestedProtocolVersion,
461 serverProtocolVersion: this.protocolVersion,
462 }
463 )
464 }
465 return {
466 protocolVersion: this.protocolVersion,
467 serverName: this.serverName,
468 ...(this.serverVersion ? { serverVersion: this.serverVersion } : {}),
469 capabilities: this.capabilitiesFor(context.connection),
470 }
471 }
472
473 private serverStatus(context: RuntimeHandlerContext): RuntimeInitializeResult & { connectionCount: number } {
474 return {

Callers 2

constructorMethod · 0.95
MermaidBlockFunction · 0.45

Calls 1

capabilitiesForMethod · 0.95

Tested by

no test coverage detected