Vercel AI SDK tool search maxResults and Sume tool groups
ai@7.0.127 tool search ranks deferred tools with a search() callback and maxResults. How to split Sume's hosted MCP tools into always-on and deferred groups.

Keep Sume's discovery and job tools always loaded, and defer the generation tools behind tool search. The vercel/ai releases page lists tool search in ai@7.0.127 and ai@6.0.300, with a search() callback that ranks deferred tools and a configurable maxResults, so the model sees a few relevant tools instead of the whole catalog.
Sume's hosted MCP catalog is large enough to benefit, and its tools fall into groups with different safety gates, which makes the split easy to reason about.
What the release page lists
Only the tool-search items are relevant here.
| Package versions | Item |
|---|---|
| ai@7.0.127 and ai@6.0.300 | Tool search with a search() callback to rank deferred tools |
| ai@7.0.127 and ai@6.0.300 | Configurable maxResults |
| ai@7.0.127 and ai@6.0.300 | UI stream fixes on consumer disconnect |
Sume tool groups
The hosted inventory is grouped, and the gate on each group tells you whether it should be loaded up front. Read tools are visible under OAuth mcp:read. Write and paid tools need mcp:write or an API key, and require an idempotency_key.
| Group | Examples | Gate |
|---|---|---|
| Meta and health | mcp_health, tools_list, tools_schema | Read |
| Jobs | jobs_status, jobs_wait, jobs_result | Read |
| Jobs, mutating | jobs_cancel | Write, idempotency_key |
| Generation | generate_image, generate_video, tts_create, music_create | Paid, idempotency_key |
| Avatars | avatars_create, avatar-videos_create | Paid, idempotency_key |
| Crawl | crawl_scrape, crawl_search | Read |
A split that works
Always load what the agent needs to look around and to follow a job to the end. Defer everything that spends money, so the model has to search for it by intent first.
- Always on:
tools_list,tools_schema,jobs_status,jobs_wait,jobs_result. - Deferred and searchable: the generation tools, avatar tools and media tools, each with a clear one-line description.
- Small
maxResults: a ranked list of three or four is enough when each tool name describes one task.
Descriptions are your ranking signal
A ranking callback can only work with the text it is given. Sume tool names are already task-shaped, and the live contract is available from tools_schema, so index the name plus a sentence of your own about when to use it. For example, say that generate_image makes stills and generate_video makes clips, and that both omit payload.model to route to sume/auto unless the user named a family.
Keep the gate in the description too. A line such as "paid; needs idempotency_key; preview with dry_run" helps both the ranker and the model choose a dry run first.
Stable ordering
Sume's own docs make the same point from the server side: the live contract comes from tools_list and tools_schema, and an agent should not assume it from memory or from the HTTP API. A deferred-tool index that is rebuilt from tools_list at startup stays correct when the catalog changes, while a hand-copied list drifts.
Whatever order you hand tools to the model, keep it stable between turns. A catalog that reorders on every call defeats any prompt caching you rely on and makes agent behavior harder to compare across runs. Sort by name before registering.
Sources
Related posts
More in Integrations
- Vercel AI Gateway's new tools and models, and where Sume media fits
AI Gateway added Browserbase tools and audio models. A planner model can route through a gateway while Sume handles the paid media jobs; where to draw the line.
- VS Code 1.140 portable MCP config: where to put the Sume server URL
VS Code 1.140 can save MCP servers to a global file or a workspace .mcp.json. Add Sume's hosted URL once and keep API keys out of the shared file.
- Webflow MCP v2 needs no Designer session: pair it with Sume MCP
Webflow MCP v2.0 dropped the Designer requirement for most element, style and variable work. How to run it beside Sume's hosted MCP in one coding agent.
- Workflow protections GA: keep the Sume key off fork PR runs
GitHub's workflow execution protections are GA. Pair them with a Sume workflow that only runs on push, schedule or dispatch, so a fork PR never sees the key.
Written by Sume