feat(web): improve agent performance, MCP tools, and much more#1014
Merged
brendan-kellam merged 48 commits intomainfrom Mar 23, 2026
Merged
feat(web): improve agent performance, MCP tools, and much more#1014brendan-kellam merged 48 commits intomainfrom
brendan-kellam merged 48 commits intomainfrom
Conversation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR is effectively a re-work of the tools we ship in our MCP server & ask agent. There are many details & changes in this PR, most of which are covered in the changelog. In terms of the impact of this PR:
search_codeto look like grep (also renamed it togrep). Agents have a much easier time using understanding and using the grep syntax over our custom search syntax. Impact: The agent will be able to search and find things much more effectively and efficiently.groupByRepotogrep(prev.search_code) to allow agents to get compact responses that aggregate search results by repo. Impact: Agents are able to get a high-level overview of what terms exist in which repositories without blowing up their context window. This is really helpful when searching over a large number of repos since it gives the agent the ability to narrow down it's search to only repositories that are relevant.glob, andlistTreetools. Impact: the agent has additional mechanisms for exploring repositories.Fixes #911
Fixes #848
Summary
ToolDefinition<TName, TShape, TMetadata>abstraction infeatures/tools/with a unifiedexecute(input, context)signature andToolResult<TMetadata>return shaperead_file,list_commits,list_repos,search_code,find_symbol_references,find_symbol_definitions,list_tree) are now defined once and registered with both the Vercel AI agent and the MCP server viatoVercelAIToolandregisterMcpTooladapterssource: 'agent'orsource: 'mcp') into every tool executionisReadOnlyandisIdempotenthints are declared on each tool definition and forwarded to MCPannotationsviaregisterMcpTooltoolNamesconstant eliminated in favour ofxDefinition.namelist_treetool to the Vercel AI agent with a UI component in the details cardrepository→repo);webUrladded tosearch_codeoutputlogger.tsfor tools; debug logging added to all tools using consistent snake_case nameslist_reposdiscovery,webUrllinking)ToolHeaderso all tool components get it for free