You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Read tools for the hosted instance resource: per-instance configuration surfaces plus instance observability and the team-scoped instance lists. Filed in instances.js alongside the existing hosted instance tools, following the one-file-per-resource convention (a tool lives in the file for the noun it is about, regardless of the URL's first path segment). The HTTP-token and history reads are generalized here to serve both hosted and remote instances via an instanceType argument, so the remote-only variants that previously sat under #7726 are not needed.
readOnlyHint: true.
Tool
Endpoint
Scope
Annotation
platform_get_instance_config
GET /projects/:id/ha, GET /projects/:id/protectInstance, GET /projects/:id/autoUpdateStack (per sections)
project:read
read
platform_get_instance_custom_hostname
GET /projects/:id/customHostname (plus /customHostname/status when includeStatus)
project:edit
read
platform_list_instance_files
GET /projects/:id/files/_/:path
project:files:list
read
platform_list_instance_http_tokens
GET /projects/:id/httpTokens (instanceType hosted or remote)
project:edit
read
platform_get_hosted_instance_audit_log
GET /projects/:id/audit-log (format: json), GET /projects/:id/audit-log/export (format: csv)
project:audit-log
read
platform_get_instance_history
GET /projects/:id/history (instanceType hosted or remote)
project:history, device:history
read
platform_get_hosted_instance_resources
GET /projects/:id/resources
project:read
read
platform_list_team_dashboard_instances
GET /teams/:teamId/dashboard-instances
team:read
read
Design notes:
Plan-gated per team (not per user role): HA (feature key ha), custom hostnames (customHostnames), protected instance (protectedInstance), files (staticAssets), http tokens (route checks teamHttpSecurity; httpBearerTokens is the registered feature name), instance history (projectHistory, defaults to enabled), instance resources (instanceResources, default disabled). When the plan does not include the feature the route returns a 404 independent of the PAT's permissions; the tool surfaces a clear "feature not enabled for this team" message rather than a bare not-found.
The auto-update-stack route has no feature-flag preHandler, so no plan-gate 404 applies to that section of platform_get_instance_config (only the standard project/membership checks).
Custom-hostname GET (and its status route) and the HTTP-token list use project:edit (not project:read). These are still read tools for MCP purposes: allow-list/annotate accordingly and set readOnlyHint: true.
GET /projects/:id/resources/stream is a WebSocket, not suited to a request/response MCP tool; only the point-in-time /resources snapshot is exposed.
platform_list_team_dashboard_instances hangs off a team URL but lists hosted instances, so it is filed with the instance tools.
Consolidation:
Config sections: the separate ha, protection, and autoUpdateStack getters are merged into platform_get_instance_config, which takes a sections array (subset of ha / protection / autoUpdateStack, defaults to all) and returns each requested section independently.
Hostname plus status: the custom-hostname read and its status read are merged into platform_get_instance_custom_hostname via an includeStatus boolean.
Audit format: the audit read and export are merged; platform_get_hosted_instance_audit_log gains a format argument (json reads entries, csv uses the export route), and the separate export tool is dropped.
Instance-type twins: platform_list_instance_http_tokens and platform_get_instance_history (renamed from platform_get_hosted_instance_history) take an instanceType (hosted or remote) and serve remote instances too, so the remote-only variants under feat(mcp): remote instance (device) read tools #7726 are removed.
Team listing: platform_list_team_projects is dropped; its name filtering, sorting, and pagination are folded into platform_list_hosted_instances, which gained sort, dir, and orderByMostRecentFlows.
Shared schema: platform_list_hosted_instances reuses the shared fragments (teamId, applicationId, searchQuery, sortParams.dir) from forge/ee/lib/mcp/schemas.js (basePagination, searchQuery, sortParams); its bespoke limit (max 10) and sort enum stay inline.
Scopes to allow-list (IMPLICIT_TOKEN_SCOPES['user:expert-mcp']) and access-tag (#7445): project:edit (custom-hostname/http-token reads), project:files:list (read), project:audit-log (read), project:history (hosted history read), device:history (remote history read). project:read and team:projects:list are already present; team:read is already present from the shipped team tools.
Tests:
Read tools allowed for read-only PAT.
Feature-disabled instance returns the descriptive gate error per config/observability surface.
Parent: #7680 (5.11 Instance configuration)
Tool file:
forge/ee/lib/mcp/tools/instances.js(extend)Read tools for the hosted instance resource: per-instance configuration surfaces plus instance observability and the team-scoped instance lists. Filed in
instances.jsalongside the existing hosted instance tools, following the one-file-per-resource convention (a tool lives in the file for the noun it is about, regardless of the URL's first path segment). The HTTP-token and history reads are generalized here to serve both hosted and remote instances via aninstanceTypeargument, so the remote-only variants that previously sat under #7726 are not needed.readOnlyHint: true.platform_get_instance_configGET /projects/:id/ha,GET /projects/:id/protectInstance,GET /projects/:id/autoUpdateStack(persections)project:readplatform_get_instance_custom_hostnameGET /projects/:id/customHostname(plus/customHostname/statuswhenincludeStatus)project:editplatform_list_instance_filesGET /projects/:id/files/_/:pathproject:files:listplatform_list_instance_http_tokensGET /projects/:id/httpTokens(instanceTypehosted or remote)project:editplatform_get_hosted_instance_audit_logGET /projects/:id/audit-log(format: json),GET /projects/:id/audit-log/export(format: csv)project:audit-logplatform_get_instance_historyGET /projects/:id/history(instanceTypehosted or remote)project:history,device:historyplatform_get_hosted_instance_resourcesGET /projects/:id/resourcesproject:readplatform_list_team_dashboard_instancesGET /teams/:teamId/dashboard-instancesteam:readDesign notes:
ha), custom hostnames (customHostnames), protected instance (protectedInstance), files (staticAssets), http tokens (route checksteamHttpSecurity;httpBearerTokensis the registered feature name), instance history (projectHistory, defaults to enabled), instance resources (instanceResources, default disabled). When the plan does not include the feature the route returns a 404 independent of the PAT's permissions; the tool surfaces a clear "feature not enabled for this team" message rather than a bare not-found.platform_get_instance_config(only the standard project/membership checks).project:edit(notproject:read). These are still read tools for MCP purposes: allow-list/annotate accordingly and setreadOnlyHint: true.GET /projects/:id/resources/streamis a WebSocket, not suited to a request/response MCP tool; only the point-in-time/resourcessnapshot is exposed.platform_list_team_dashboard_instanceshangs off a team URL but lists hosted instances, so it is filed with the instance tools.Consolidation:
ha,protection, andautoUpdateStackgetters are merged intoplatform_get_instance_config, which takes asectionsarray (subset ofha/protection/autoUpdateStack, defaults to all) and returns each requested section independently.platform_get_instance_custom_hostnamevia anincludeStatusboolean.platform_get_hosted_instance_audit_loggains aformatargument (jsonreads entries,csvuses the export route), and the separate export tool is dropped.platform_list_instance_http_tokensandplatform_get_instance_history(renamed fromplatform_get_hosted_instance_history) take aninstanceType(hostedorremote) and serve remote instances too, so the remote-only variants under feat(mcp): remote instance (device) read tools #7726 are removed.platform_list_team_projectsis dropped; its name filtering, sorting, and pagination are folded intoplatform_list_hosted_instances, which gainedsort,dir, andorderByMostRecentFlows.platform_list_hosted_instancesreuses the shared fragments (teamId,applicationId,searchQuery,sortParams.dir) fromforge/ee/lib/mcp/schemas.js(basePagination,searchQuery,sortParams); its bespokelimit(max 10) andsortenum stay inline.Scopes to allow-list (
IMPLICIT_TOKEN_SCOPES['user:expert-mcp']) and access-tag (#7445):project:edit(custom-hostname/http-token reads),project:files:list(read),project:audit-log(read),project:history(hosted history read),device:history(remote history read).project:readandteam:projects:listare already present;team:readis already present from the shipped team tools.Tests: