Repository navigation
fix(examples): migrate examples from removed listTools to mcpJsonRpc - #355
Merged
Merged
Conversation
listTools was dropped from the client in v0.25.1; the examples only kept working on stale 0.12.x pins. Tool discovery now goes through mcpJsonRpc (MCPJSONRPCRequestMethod.tools_list) and the list example texts the correct gateway flags MCP_ENABLED and MCP_EXPOSE.
…ypes message.content can now be a multimodal content-parts array; cast the text-only assistant response to string so the example type-checks against current src exports. Surfaced while verifying issue #347, unrelated to listTools.
inference-gateway-maintainer
Bot
marked this pull request as ready for review
November 17, 2026 19:18
9 tasks
inference-gateway-releaser Bot
added a commit
that referenced
this pull request
Nov 17, 2026
## [0.31.0](v0.30.0...v0.31.0) (2026-11-17) ### ✨ Features * sync generated types with schemas v1.14.1 ([#357](#357)) ([c1ac248](c1ac248)) ### 🐛 Bug Fixes * **examples:** align gateway env vars with the openapi x-config spec ([#352](#352)) ([ad88612](ad88612)) * **examples:** migrate examples from removed listTools to mcpJsonRpc ([#355](#355)) ([d3fb472](d3fb472)), references [#347](#347) ### 👷 CI * align Dependabot schedule and grouping ([#344](#344)) ([c4e6a3e](c4e6a3e)) * **deps-dev:** bump the npm group with 3 updates ([#345](#345)) ([2882a46](2882a46)) * set up orchestrators from repos.yaml ([#346](#346)) ([53394ea](53394ea)) ### 📚 Documentation * **examples:** add audio examples for createSpeech, createSFX and createMusic ([#354](#354)) ([479cfb7](479cfb7)) * **examples:** fix run instructions referencing missing files, scripts and services ([#353](#353)) ([87f9d8d](87f9d8d)) ### 🔧 Miscellaneous * **deps:** bump flox dependencies to latest ([#342](#342)) ([60b715d](60b715d)) * **deps:** bump flox dependencies to latest ([#343](#343)) ([cf43b42](cf43b42)) * **examples:** raise example SDK pins to the current release line ([#356](#356)) ([d2d81c3](d2d81c3))
Contributor
|
🎉 This PR is included in version 0.31.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #347
Summary
The five runnable examples still called
client.listTools(), which was removed from the client in v0.25.1, and only kept starting because theirpackage.jsonfiles pin the SDK to 0.12.x. Tool discovery now goes through the current public surface,client.mcpJsonRpc(...)withMCPJSONRPCRequestMethod.tools_list, and the docs no longer name the nonexistentEXPOSE_MCPgateway flag (the real flags areMCP_ENABLEDandMCP_EXPOSE, and-epasses them into the container instead of a shell prefix that never reaches the gateway).Changes
client.listTools()withclient.mcpJsonRpc({ jsonrpc: '2.0', id: 1, method: MCPJSONRPCRequestMethod.tools_list }), reading tools fromresponse.result.toolsand reportingresponse.error(code + message) instead of iterating the removed{ data: [...] }envelope withtool.serverandtool.input_schemainitialize()- the Context7 / Brave Search / memory / filesystem tool filters now run over the JSON-RPCtools/listresultmcpJsonRpc(tools/list) and the docker command passes-e MCP_ENABLED=true -e MCP_EXPOSE=trueinto the containerNotes
npm run lint,npm run buildandnpm test, all green.src/with zero errors, using temporarytsconfig.check.jsonfiles that alias@inference-gateway/sdktosrc/index.ts. The check configs were removed after verification and are not committed.