Skip to content

Comments

refactor: consolidate MCP tools from 15 to 10 using manage_* pattern#89

Merged
masnwilliams merged 8 commits intomainfrom
mason/add-missing-tools
Feb 24, 2026
Merged

refactor: consolidate MCP tools from 15 to 10 using manage_* pattern#89
masnwilliams merged 8 commits intomainfrom
mason/add-missing-tools

Conversation

@masnwilliams
Copy link
Collaborator

@masnwilliams masnwilliams commented Feb 19, 2026

Summary

Rewrites the MCP server's tool set based on research from Block (60+ MCP servers), Phil Schmid, Docker, and Anthropic on MCP best practices:

  • LLM accuracy degrades after 20-25 tools
  • Design for agent workflows, not API endpoints ("outcomes over operations")
  • Consistent patterns reduce cognitive load
  • Use a single tool per feature domain with an action parameter

This PR consolidates 15 existing tools + adds new capabilities = 10 total tools using a consistent manage_* pattern, plus upgrades @onkernel/sdk to ^0.35.0.

The 10 tools

manage_ tools (one per feature domain)*

Tool Actions Replaces
manage_browsers create, list, get, delete create_browser, get_browser, list_browsers, delete_browser
manage_profiles setup, list, delete setup_profile, list_profiles, delete_profile
manage_browser_pools create, list, get, delete, flush, acquire, release (new)
manage_proxies create, list, delete (new)
manage_extensions list, delete (new)
manage_apps list_apps, invoke, get_deployment, list_deployments, get_invocation list_apps, invoke_action, get_deployment, list_deployments, get_invocation

Standalone tools

Tool What it does Replaces
computer_action click, type, press_key, scroll, move, get_position, screenshot take_screenshot + (new)
execute_playwright_code Run Playwright code with replay (unchanged)
exec_command Shell commands in VM with decoded output (new)
search_docs Documentation search (unchanged)

New capabilities added

  • Computer controls -- full mouse/keyboard interaction for computer-use agents
  • Browser pools -- pre-warmed browser management (create, acquire, release, flush)
  • Proxies -- datacenter/ISP/residential/mobile/custom proxy config
  • Extensions -- list and delete browser extensions
  • VM shell access -- run commands inside browser VMs

New resource

  • browser_pools:// -- list/get browser pools

Test plan

  • TypeScript compilation passes (tsc --noEmit)
  • Prettier formatting passes
  • Verify 10 tools appear in MCP client after deploy
  • Smoke test manage_browsers (create, list, get, delete)
  • Smoke test computer_action (click, type, screenshot)
  • Smoke test manage_browser_pools (create, acquire, release, delete)
  • Smoke test exec_command

Note

Medium Risk
Large surface-area API change: tool names/signatures and workflows change substantially and could break existing MCP client integrations. New VM command execution and computer-control capabilities increase operational impact if misused, though still gated by auth.

Overview
Refactors the MCP tool API from many endpoint-style tools into 10 total tools centered on manage_* tools with an action parameter, replacing the prior browser/profile/app/deployment/invocation tool set with consolidated manage_browsers, manage_profiles, manage_apps, plus new manage_browser_pools, manage_proxies, and manage_extensions.

Adds new capabilities: a computer_action tool for mouse/keyboard controls and screenshots (superseding take_screenshot), an exec_command tool to run shell commands inside the browser VM with decoded stdout/stderr, and a new browser_pools:// resource for listing/retrieving pools. Updates search_docs error handling/formatting, refreshes docs/examples/troubleshooting language to the new tool names, and bumps @onkernel/sdk to ^0.35.0 (plus next-env.d.ts route types path update).

Written by Cursor Bugbot for commit f7b13f7. This will update automatically on new commits. Configure here.

…em, proxies, extensions, and process execution

Brings the MCP server up to parity with the latest Kernel API. Updates
@onkernel/sdk from ^0.30.0 to ^0.35.0.

New tools:
- Browser Pools: create, list, get, acquire, release, delete
- Computer Controls: click, type_text, press_key, scroll, move_mouse, get_mouse_position
- Proxies: create, list, delete
- Extensions: list, delete
- Filesystem: read_file, write_file, list_files
- Process: exec_command

New resource: browser_pools://

Co-authored-by: Cursor <cursoragent@cursor.com>
@vercel
Copy link

vercel bot commented Feb 19, 2026

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

Project Deployment Actions Updated (UTC)
mcp Ready Ready Preview, Comment Feb 24, 2026 6:54pm

Applies MCP best practices from Block, Anthropic, and ecosystem research.
LLM accuracy degrades after 20-25 tools; we now have 10.

6 manage_* tools (one per feature domain):
- manage_browsers: create/list/get/delete
- manage_profiles: setup/list/delete
- manage_browser_pools: create/list/get/delete/flush/acquire/release
- manage_proxies: create/list/delete
- manage_extensions: list/delete
- manage_apps: list_apps/invoke/get_deployment/list_deployments/get_invocation

4 standalone tools:
- computer_action: click/type/press_key/scroll/move/get_position/screenshot
- execute_playwright_code (unchanged)
- exec_command (new, replaces read_file/write_file/list_files)
- search_docs (unchanged)

Co-authored-by: Cursor <cursoragent@cursor.com>
@masnwilliams masnwilliams changed the title feat: add 21 new tools to catch up with latest API refactor: consolidate MCP tools from 15 to 10 using manage_* pattern Feb 19, 2026
The executable goes in `command`, arguments go in `args` (e.g.,
command: "cat", args: ["/etc/resolv.conf"]).

Co-authored-by: Cursor <cursoragent@cursor.com>
…e mapping

Agents receive scaled-down screenshot images but need to use the actual
viewport coordinate space (default 1920x1080) for click/scroll/move.
The screenshot action now fetches browser info in parallel and returns
the viewport dimensions alongside the image.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
const blob = await screenshotResponse.blob();
const buffer = Buffer.from(await blob.arrayBuffer());
const viewport = browserInfo.viewport;
return {
Copy link

Choose a reason for hiding this comment

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

computer_action screenshot can crash on missing browser

Medium Severity

In computer_action action "screenshot", browserInfo from client.browsers.retrieve is assumed non-null and browserInfo.viewport is accessed unguarded, so a null/undefined retrieve result can throw after the screenshot succeeds.

Fix in Cursor Fix in Web

Restore the detailed SSH port forwarding explanations, activity timeout
warning, and install links that were dropped during the consolidation.
Re-add partial region argument validation for computer_action screenshot
so it errors instead of silently falling back to full screenshot.

Co-authored-by: Cursor <cursoragent@cursor.com>
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 8 potential issues.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

/// <reference types="next" />
/// <reference types="next/image-types/global" />
import "./.next/types/routes.d.ts";
import "./.next/dev/types/routes.d.ts";
Copy link

Choose a reason for hiding this comment

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

Auto-generated file incorrectly modified with dev-only path

Medium Severity

The next-env.d.ts file references .next/dev/types/routes.d.ts, which is generated only during next dev and filtered out during builds. Next.js 16 generates both .next/dev/types (dev mode) and .next/types (build mode), with production builds expecting the latter. This file explicitly states it should not be edited and appears to be an accidentally committed auto-generated file from a dev environment, potentially causing TypeScript errors during production builds.

Fix in Cursor Fix in Web

Co-authored-by: Cursor <cursoragent@cursor.com>
@masnwilliams masnwilliams merged commit fc28a70 into main Feb 24, 2026
4 checks passed
@masnwilliams masnwilliams deleted the mason/add-missing-tools branch February 24, 2026 18:55
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.

1 participant