servers/src/everything/docs
Repository files (latest commit first)
Filename Latest commit message Latest commit date
cliffhall 1b8f376b90 Demonstrate registration of tools conditioned upon client capability support. Also, obviated need for clientConnected callback to pass sessionId because we defer initial fetching of roots happens when you run the get-roots-list tool.
* In how-it-works.md,
  - added a section on conditional tool registration

* In server/index.ts
  - import registerConditionalTools
  - in an oninitialized handler for the server, call registerConditionalTools
  - removed clientConnected from ServerFactoryResponse and all mentions in docs

* In tools/index.ts
  - export a registerConditionalTools function
  - refactor/move calls to registerGetRootsListTool, registerTriggerElicitationRequestTool, and registerTriggerSamplingRequestTool out of registerTools and into registerConditionalTools

* In server/roots.ts
  - only act if client supports roots
  - remove setInterval from call to requestRoots. It isn't happening during the initialze handshake anymore, so it doesn't interfere with that process if called immediaately

* In get-roots-list.ts, trigger-elicitation-request.ts, and trigger-sampling-request.ts,
  - only register tool if client supports capability

* Throughout the rest of the files, removing all references to `clientConnected`
2025-12-15 17:51:30 -05:00
..
architecture.md Updated package.json and ran prettier 2025-12-13 14:33:16 -05:00
extension.md Updated package.json and ran prettier 2025-12-13 14:33:16 -05:00
features.md Updated package.json and ran prettier 2025-12-13 14:33:16 -05:00
how-it-works.md Demonstrate registration of tools conditioned upon client capability support. Also, obviated need for clientConnected callback to pass sessionId because we defer initial fetching of roots happens when you run the get-roots-list tool. 2025-12-15 17:51:30 -05:00
instructions.md Updated server instructions.md. See https://github.com/modelcontextprotocol/servers/pull/3121#discussion_r2616651611 2025-12-15 17:04:59 -05:00
startup.md Demonstrate registration of tools conditioned upon client capability support. Also, obviated need for clientConnected callback to pass sessionId because we defer initial fetching of roots happens when you run the get-roots-list tool. 2025-12-15 17:51:30 -05:00
structure.md Demonstrate registration of tools conditioned upon client capability support. Also, obviated need for clientConnected callback to pass sessionId because we defer initial fetching of roots happens when you run the get-roots-list tool. 2025-12-15 17:51:30 -05:00