Skip to content

docs(mcp): add MCP Tool Search page - #451

Merged
krrish-berri-2 merged 1 commit into
mainfrom
claude/funny-banzai-0054d7
Jul 1, 2026
Merged

docs(mcp): add MCP Tool Search page#451
krrish-berri-2 merged 1 commit into
mainfrom
claude/funny-banzai-0054d7

Conversation

@krrish-berri-2

Copy link
Copy Markdown
Contributor

Summary

New docs page walking through the MCP tool search feature from BerriAI/litellm#31776 and BerriAI/litellm#31777. Lives under the MCP Gateway sidebar group.

Structure:

  • Quick start: generate a key with mcp_tool_search_enabled, hit tools/list, search, call. Same flow shown over the streamable-http endpoint with the MCP Python SDK.
  • Proxy-wide default via litellm_settings.default_key_generate_params.object_permission, including the caller-scope-safety note (the default merges after validation, so a non-admin personal-key request doesn't 403).
  • How it works: describes the token-overlap ranking algorithm (top_k default 5, score > 0, stable sort tiebreak, per-call top_k override).
  • Prerequisite: LiteLLM v1.92.x+.
  • Access control: search only surfaces what the key can already reach; mcp_tool_call still runs through _get_allowed_mcp_servers + execute_mcp_tool so the server allowlist, IP filter, and per-key mcp_tool_permissions still apply.
  • Tool search vs. semantic filter tradeoff.

Sidebar entry inserted after mcp_semantic_filter in both the MCP Gateway category and the /mcp proxy-API mirror.

Test plan

  • npm start renders the page at /docs/mcp_tool_search with no build errors
  • Both sidebar locations (MCP Gateway, /mcp - Model Context Protocol) show the new entry between semantic filter and permission management
  • Related-docs links resolve

Walkthrough for the mcp_tool_search / mcp_tool_call virtual tools: quick
start over REST and the MCP Python SDK, config for a proxy-wide default via
default_key_generate_params.object_permission, the token-overlap ranking
algorithm, prerequisites, access-control guarantees, and when to reach for
tool search vs. the semantic filter.
@vercel

vercel Bot commented Jul 1, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
litellm Ready Ready Preview, Comment Jul 1, 2026 3:25am

Request Review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a9302bec5b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread docs/mcp_tool_search.md
-d '{
"object_permission": {
"mcp_tool_search_enabled": true,
"mcp_servers": ["github", "slack"]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Use matching servers in the quick start

With this key scoped to only github and slack, the following quick-start commands search for and call math-add/math-multiply, but the page later states that search only surfaces tools the key can already reach and mcp_tool_call enforces the server allowlist. A reader copying the example as-is will either get no math results or a 403 when calling math-add; the allowed mcp_servers should include the server that owns the demonstrated tools, or the demonstrated tool names should come from github/slack.

Useful? React with 👍 / 👎.

@krrish-berri-2
krrish-berri-2 merged commit 1cba374 into main Jul 1, 2026
2 checks passed
@krrish-berri-2
krrish-berri-2 deleted the claude/funny-banzai-0054d7 branch July 1, 2026 04:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants