forked from phoenix-oss/llama-stack-mirror
fix(tools): do not index tools, only index toolgroups (#2261)
When registering a MCP endpoint, we cannot list tools (like we used to) since the MCP endpoint may be behind an auth wall. Registration can happen much sooner (via run.yaml). Instead, we do listing only when the _user_ actually calls listing. Furthermore, we cache the list in-memory in the server. Currently, the cache is not invalidated -- we may want to periodically re-list for MCP servers. Note that they must call `list_tools` before calling `invoke_tool` -- we use this critically. This will enable us to list MCP servers in run.yaml ## Test Plan Existing tests, updated tests accordingly.
This commit is contained in:
parent
5a422e236c
commit
ce33d02443
19 changed files with 131 additions and 153 deletions
13
docs/_static/llama-stack-spec.html
vendored
13
docs/_static/llama-stack-spec.html
vendored
|
@ -9555,9 +9555,6 @@
|
|||
"toolgroup_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"tool_host": {
|
||||
"$ref": "#/components/schemas/ToolHost"
|
||||
},
|
||||
"description": {
|
||||
"type": "string"
|
||||
},
|
||||
|
@ -9599,21 +9596,11 @@
|
|||
"provider_id",
|
||||
"type",
|
||||
"toolgroup_id",
|
||||
"tool_host",
|
||||
"description",
|
||||
"parameters"
|
||||
],
|
||||
"title": "Tool"
|
||||
},
|
||||
"ToolHost": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"distribution",
|
||||
"client",
|
||||
"model_context_protocol"
|
||||
],
|
||||
"title": "ToolHost"
|
||||
},
|
||||
"ToolGroup": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue