llama-stack/llama_stack/distribution
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
..
routers fix(tools): do not index tools, only index toolgroups (#2261) 2025-05-25 13:27:52 -07:00
routing_tables fix(tools): do not index tools, only index toolgroups (#2261) 2025-05-25 13:27:52 -07:00
server feat: accept MCP authorization headers for MCP toolgroups (#2230) 2025-05-23 08:52:18 -07:00
store fix(tools): do not index tools, only index toolgroups (#2261) 2025-05-25 13:27:52 -07:00
ui chore: more mypy fixes (#2029) 2025-05-06 09:52:31 -07:00
utils chore: make cprint write to stderr (#2250) 2025-05-24 23:39:57 -07:00
__init__.py API Updates (#73) 2024-09-17 19:51:35 -07:00
access_control.py chore: enable pyupgrade fixes (#1806) 2025-05-01 14:23:50 -07:00
build.py chore: make cprint write to stderr (#2250) 2025-05-24 23:39:57 -07:00
build_conda_env.sh chore: remove straggler references to llama-models (#1345) 2025-03-01 14:26:03 -08:00
build_container.sh feat: refactor external providers dir (#2049) 2025-05-15 20:17:03 +02:00
build_venv.sh chore: remove straggler references to llama-models (#1345) 2025-03-01 14:26:03 -08:00
client.py chore: make cprint write to stderr (#2250) 2025-05-24 23:39:57 -07:00
common.sh feat(pre-commit): enhance pre-commit hooks with additional checks (#2014) 2025-04-30 11:35:49 -07:00
configure.py feat: refactor external providers dir (#2049) 2025-05-15 20:17:03 +02:00
datatypes.py feat: accept MCP authorization headers for MCP toolgroups (#2230) 2025-05-23 08:52:18 -07:00
distribution.py feat: refactor external providers dir (#2049) 2025-05-15 20:17:03 +02:00
inspect.py fix: only print routes that match the runtime config (#2226) 2025-05-21 15:30:29 -07:00
library_client.py chore: make cprint write to stderr (#2250) 2025-05-24 23:39:57 -07:00
providers.py fix: catch TimeoutError in place of asyncio.TimeoutError (#2131) 2025-05-12 11:49:59 +02:00
request_headers.py chore: more mypy fixes (#2029) 2025-05-06 09:52:31 -07:00
resolver.py fix(tools): do not index tools, only index toolgroups (#2261) 2025-05-25 13:27:52 -07:00
stack.py chore: enable pyupgrade fixes (#1806) 2025-05-01 14:23:50 -07:00
start_stack.sh fix: replace all instances of --yaml-config with --config (#2196) 2025-05-16 14:31:12 -07:00