Add admin/app/proxy cleanup parity tools#113
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Firetiger deploy monitoring skipped This PR didn't match the auto-monitor filter configured on your GitHub connection:
Reason: PR is from the To monitor this PR anyway, reply with |
Expose the remaining small SDK passthroughs for project limits, deployment deletion/version filters, proxy checks, and paginated profile lookup while keeping the handlers on shared response helpers for clearer agent output.
99bedc0 to
0f021bb
Compare
Add shared list and pagination response helpers for MCP tool output. Use them across the PR 113 admin parity handlers so the new actions do not keep repeating hand-built JSON/text response boilerplate.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 8fbfcf4. Configure here.
| return paginatedJsonResponse( | ||
| page, | ||
| "No profiles found. Use manage_profiles with action 'setup' to create one.", | ||
| ); |
There was a problem hiding this comment.
Empty page shows zero-profile text
Medium Severity
The new paginated manage_profiles list action passes a fixed emptyText into paginatedJsonResponse. Any empty page—including when offset is past the last profile—returns that plain-text “no profiles” setup hint instead of JSON with empty items and has_more/next_offset, which breaks paging and misstates whether profiles exist.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 8fbfcf4. Configure here.


Summary
Adds the small MCP parity cleanup slice after browser pools:
manage_appsdelete_deploymentversionthrough to deployment listing as the SDK'sapp_versionfilterquerysearch onlist_appsapp_name, matching the SDK/API requirementmanage_proxiesgetcheckwith optionalcheck_urlcheck_urlas HTTP(S) at the MCP boundarymanage_profilesgetquery,limit, andoffsetfor paginated listing instead of forcing agents to enumerate every profilemanage_projectsget_limitsandupdate_limitsfor per-project capsmanage_extensionsReview Question
The main question for this PR is not whether the SDK calls work; it is whether we want this functionality exposed through MCP at all.
My current read:
get/check, profileget/search pagination, and app deployment list/delete because they map to concrete agent workflows: prepare a browser with a working proxy, reuse the right profile, and clean up an app deployment after testing.manage_projectsget_limits/update_limitsis the most admin-passthrough-shaped part of this PR. Keep it if we want MCP to support lightweight project administration; split or drop it if we want this MCP to stay strictly browser/workflow-oriented.If accepted, I would treat this as the last small parity/admin cleanup slice, not as precedent that every SDK endpoint automatically deserves MCP exposure.
Why
These are the remaining small SDK passthroughs that do not belong in the managed-auth PR. They close agent-facing gaps without adding another large workflow surface:
Agent Experience / Flow
Typical app cleanup flow:
manage_apps { action: "list_apps", query: "..." }to find the app/version.manage_apps { action: "list_deployments", app_name, version }to narrow to the deployment for that app version.manage_apps { action: "get_deployment", deployment_id }before destructive action.manage_apps { action: "delete_deployment", deployment_id }.Typical proxy verification flow:
manage_proxies { action: "list" }orgetto identify the proxy.manage_proxies { action: "check", proxy_id, check_url: "https://target.example" }when site-specific reachability matters.Typical profile discovery flow:
manage_profiles { action: "list", query, limit }instead of pulling every profile.manage_profiles { action: "get", profile_name }before reuse or deletion.setuponly when the desired profile does not already exist, or withupdate_existing: truewhen intentionally refreshing it.Typical admin limit flow:
manage_projects { action: "get", project_id }to confirm the target project.manage_projects { action: "get_limits", project_id }to inspect current caps.update_limitsonly with the specific cap fields requested by the user; omitted fields are left unchanged.Implementation Notes
textResponse,jsonResponse, anderrorMessagehelpers are used in touched handlers to keep tool output consistent.Verification
bunx prettier --check README.md src/lib/mcp/tools/apps.ts src/lib/mcp/tools/proxies.ts src/lib/mcp/tools/profiles.ts src/lib/mcp/tools/projects.ts src/lib/mcp/tools/extensions.tsgit diff --checkbun run buildwith dummy auth env. Build passes; network access was needed because Next/Turbopack fetches Google Fonts during build.http://localhost:3002/mcpwith dummy bearer token:tools/listreturned 15 toolsmanage_apps,manage_proxies,manage_profiles,manage_projects, andmanage_extensionsapp_name, deployment delete withoutdeployment_id, proxy check withoutproxy_id, profile get without profile identifier, projectget_limitswithoutproject_id, and non-HTTP(S)check_urlschema rejection.Note
Medium Risk
Adds destructive operations (delete_deployment) and admin limit updates, but changes are bounded SDK passthroughs with input validation at the MCP layer.
Overview
This PR extends several
manage_*MCP tools with SDK parity actions and refactors their responses through shared helpers inresponses.ts(jsonListResponse,paginatedJsonResponse,textResponse,errorMessage).manage_appsgainsdelete_deployment, appqueryonlist_apps, and deployment listing filtered byversion(mapped toapp_version) with validation thatapp_nameis required when filtering by version.manage_proxiesaddsgetandcheck(optional HTTP(S)check_urlvalidated at the schema boundary).manage_profilesaddsget, paginated/searchablelist(query,limit,offset), and uses profile search during setup’s duplicate-name check instead of full enumeration.manage_projectsaddsget_limitsandupdate_limitsfor per-project concurrency and pool caps.manage_extensionsbehavior is unchanged; list/delete now use the shared response helpers.The README is updated to document the 15-tool surface and the expanded capabilities above.
Reviewed by Cursor Bugbot for commit 8fbfcf4. Bugbot is set up for automated code reviews on this repo. Configure here.