Skip to content

fix(tools): do not index tools, only index toolgroups#2261

Merged
ashwinb merged 2 commits into
ogx-ai:mainfrom
ashwinb:toolreg
May 25, 2025
Merged

fix(tools): do not index tools, only index toolgroups#2261
ashwinb merged 2 commits into
ogx-ai:mainfrom
ashwinb:toolreg

Conversation

@ashwinb
Copy link
Copy Markdown
Contributor

@ashwinb ashwinb commented May 25, 2025

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.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Meta Open Source bot. label May 25, 2025
@ashwinb ashwinb merged commit ce33d02 into ogx-ai:main May 25, 2025
27 checks passed
@ashwinb ashwinb deleted the toolreg branch May 25, 2025 20:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants