Repository navigation
feat(orchestrator): give spec.mcp.servers tool filters and a timeout - #332
Merged
Merged
Conversation
An Orchestrator MCP server takes includeTools, excludeTools and timeoutSeconds. The pod's mcp.yaml carries them under the CLI's keys, include_tools, exclude_tools and timeout, so the pod gets only the tools a server is narrowed to and bounds each request to it. includeTools wins over excludeTools, and an unset timeout keeps the pod's default. mcpYAMLServer now names the CLI's keys itself instead of embedding the API type, whose camelCase names the CLI does not read.
6 tasks
inference-gateway-releaser Bot
added a commit
that referenced
this pull request
Nov 9, 2026
## [0.34.0](v0.33.0...v0.34.0) (2026-11-09) ### ✨ Features * **orchestrator:** give spec.mcp.servers tool filters and a timeout ([#332](#332)) ([9fd2f47](9fd2f47))
Contributor
|
🎉 This PR is included in version 0.34.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
edenreich
added a commit
to inference-gateway/cli
that referenced
this pull request
Nov 9, 2026
…pods (#1774) ## Summary A Kubernetes workspace wrote each of its `mcp_servers` into the session's Orchestrator with only its name, URL and headers. A server's `include_tools`, `exclude_tools` and `timeout` applied on this machine but not in the pod, so a server narrowed to two tools exposed every tool once a session moved to the cluster. Operator v0.34.0 takes them (inference-gateway/operator#332), and the workspace now forwards them: - `include_tools` and `exclude_tools` go into the Orchestrator as `includeTools` and `excludeTools`, as written. - `timeout` goes in as `timeoutSeconds` when it is above 0. The CLI treats 0 or less as unset, and the operator refuses anything below 1, so those stay unset. - A server with none of them is written exactly as before. Each entry is built from the operator's `OrchestratorMCPServer` type and converted with `DefaultUnstructuredConverter`, so its field names come from the operator's API instead of copied strings. `go.mod` moves the operator module from v0.33.0 to v0.34.0 for the new fields. The "may predate ..., upgrade it" error of a workspace with `mcp_servers` names v0.34.0, and `binding_service` alone still names v0.33.0. This is simpler than the issue's split by whether a server sets a filter: a workspace whose servers set none still runs on v0.33.0, since its Orchestrator carries no new field, and the version only shows in the error of a create the operator already refused. - `docs/daemon.md` says the pods get a server's tool filters and timeout and that they need operator v0.34.0, with v0.33.0 still enough for a server without them. - `examples/session-teleport` gives the `k8s-mcp` workspace's demo server `include_tools: [get_time, calculate]`, so the pod gets none of its file and environment tools, and its walkthrough installs operator v0.34.0. Closes #1773 ## Verification - `task test` passes, with a case that forwards a server's tool filters and a 10s timeout and drops a negative timeout. - The Orchestrators the workspace builds, one with a filtered server and one with headers only, were dumped and dry-run with strict field validation on a k3d cluster: - against operator v0.34.0's CRDs, both are accepted. - against operator v0.33.0's CRDs, the one without filters is accepted and the filtered one is refused with `BadRequest`, which `create` reports as the upgrade error. - `task precommit:run` passes. - `task test:e2e` passes. ## Cross-repo impact - docs: inference-gateway/docs#1152 documents the forwarded settings.
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.
Summary
An Orchestrator MCP server now narrows and bounds what the pod gets from it, as a server in the CLI's own
mcp.yamlcan:spec.mcp.servers[].includeToolslimits the pod to the listed tools, named as the server lists them.spec.mcp.servers[].excludeToolshides the listed tools. When both are set,includeToolswins, as it does in the CLI.spec.mcp.servers[].timeoutSecondsbounds one request to the server. It must be at least 1, and unset the pod's default applies.The pod's
mcp.yamlcarries them under the CLI's keys,include_tools,exclude_toolsandtimeout, and leaves out the unset ones.mcpYAMLServernow names the CLI's keys itself instead of embeddingOrchestratorMCPServer, whose camelCase names the CLI does not read. A change to any of them rolls the pod through themcps-config-hashannotation, like any other server change.examples/orchestrator/05-orchestrator.yamlgivestime-directonlyget_timeand a 10s timeout. The discovered time server keeps both of its tools.include_toolssince v0.79.0 and applied the per-server timeout since v0.216.0.Closes #331
Verification
task testpasses, with a case that strict-decodes the renderedmcp.yamlinto the CLI's keys, so a field written under its API name fails it.includeTools: [get_time]andtimeoutSeconds: 10against the example time server:include_tools: [get_time]andtimeout: 10.infer mcp list(v0.249.0) in the pod showedTimeout 10sandtime-direct include: get_time.excludeTools: [convert_time]changed themcps-config-hash, rolled the pod, and the new pod'sinfer mcp listshowedtime-direct exclude: convert_time.timeoutSeconds: -1is refused as below the minimum.examples/passes a server dry run against the regenerated CRDs.The pod's filtering itself was not exercised:
infer tools executedoes not start MCP servers, and an agent turn needs a model gateway. The CLI's tests cover it (MCPTool.IsEnabledwith include and exclude lists).Cross-repo impact
include_tools,exclude_toolsandtimeoutfrom~/.infer/mcp.yamlonce a release ships this, and asks for that operator version.