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.

4 min readSume
All posts

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.

vercel/ai releases (read 2026-10-03)
Package versionsItem
ai@7.0.127 and ai@6.0.300Tool search with a search() callback to rank deferred tools
ai@7.0.127 and ai@6.0.300Configurable maxResults
ai@7.0.127 and ai@6.0.300UI 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.

Sume hosted MCP groups, from the tools and gates docs (read 2026-10-03)
GroupExamplesGate
Meta and healthmcp_health, tools_list, tools_schemaRead
Jobsjobs_status, jobs_wait, jobs_resultRead
Jobs, mutatingjobs_cancelWrite, idempotency_key
Generationgenerate_image, generate_video, tts_create, music_createPaid, idempotency_key
Avatarsavatars_create, avatar-videos_createPaid, idempotency_key
Crawlcrawl_scrape, crawl_searchRead

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

All Integrations posts

Written by Sume