llama-stack-mirror/llama_stack
Ashwin Bharambe ce33d02443
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.
2025-05-25 13:27:52 -07:00
..
apis fix(tools): do not index tools, only index toolgroups (#2261) 2025-05-25 13:27:52 -07:00
cli chore: make cprint write to stderr (#2250) 2025-05-24 23:39:57 -07:00
distribution fix(tools): do not index tools, only index toolgroups (#2261) 2025-05-25 13:27:52 -07:00
models chore: make cprint write to stderr (#2250) 2025-05-24 23:39:57 -07:00
providers fix(tools): do not index tools, only index toolgroups (#2261) 2025-05-25 13:27:52 -07:00
strong_typing chore: enable pyupgrade fixes (#1806) 2025-05-01 14:23:50 -07:00
templates feat: add list responses API (#2233) 2025-05-23 13:16:48 -07:00
ui feat: start ui server in llama stack run (#2170) 2025-05-23 20:00:09 -07:00
__init__.py export LibraryClient 2024-12-13 12:08:00 -08:00
env.py refactor(test): move tools, evals, datasetio, scoring and post training tests (#1401) 2025-03-04 14:53:47 -08:00
log.py chore: make cprint write to stderr (#2250) 2025-05-24 23:39:57 -07:00
schema_utils.py chore: enable pyupgrade fixes (#1806) 2025-05-01 14:23:50 -07:00