File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -142,6 +142,36 @@ specific proxy port instead, use the `--proxy-port` flag:
142
142
thv run --proxy-port <PORT_NUMBER> <SERVER>
143
143
` ` `
144
144
145
+ # ## Run a server exposing only selected tools
146
+
147
+ ToolHive can filter the tools returned to the client as result of a `tools/list`
148
+ command as well as block calls to tools that the user did not want to expose.
149
+
150
+ This can help reduce the amount of tools sent to the LLM while still using the
151
+ same MCP server, but it is not meant as a security feature.
152
+
153
+ To filter the list of tools, use the `--tools` flag either once
154
+
155
+ ` ` ` bash
156
+ thv run --tools <TOOL_1>,<TOOL_2> <SERVER>
157
+ ` ` `
158
+
159
+ Or multiple times
160
+
161
+ ` ` ` bash
162
+ thv run --tools <TOOL_1> --tools <TOOL_2> <SERVER>
163
+ ` ` `
164
+
165
+ For example :
166
+
167
+ ` ` ` bash
168
+ thv run --tools list_issues,get_issue github
169
+ ` ` `
170
+
171
+ If the server comes from the registry, ToolHive can validate the tool names
172
+ against the list advertised in the image reference. An error is returned in case
173
+ ToolHive cannot find one of the tools specified by the user.
174
+
145
175
# # Run a custom MCP server
146
176
147
177
To run an MCP server that isn't in the registry, you can use a
You can’t perform that action at this time.
0 commit comments