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.
- How to add an MCP server to ChatGPT with developer mode
Turn on ChatGPT developer mode, create an app for the server's URL, and sign in with OAuth. The steps, with Sume's hosted MCP server as the example.
- How to add subtitles to a video in Python
Add subtitles to a video in Python with Requests: POST the video URL to Sume's /v1/video-captions, poll the job, then read the captioned video_url.
- Add Sume to Claude as a custom connector (remote MCP)
Add Sume's hosted MCP server to Claude under Customize > Connectors, see what Sume's OAuth consent grants, and decide whether to allow paid tools.
Written by Sume