Skip to content

5.12-a Remote instance (device) read tools (phase 1) #7708

Description

@andypalmi

Parent: #7681 (5.12 Team data and packages)
Tool file: forge/ee/lib/mcp/tools/devices.js (extend)

Read tools for the remote instance (device) resource. Filed in devices.js alongside the existing device 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 team-data and package tools that previously sat under this issue now live with the team resource in teams.js.

readOnlyHint: true.

Tool Endpoint Scope Annotation
platform_get_remote_instance_audit_log GET /devices/:deviceId/audit-log (format: 'json' | 'csv') device:audit-log read
platform_list_team_provisioning_tokens GET /teams/:teamId/devices/provisioning team:device:provisioning-token:list read

Design notes:

  • platform_get_remote_instance_audit_log combines audit read and export via a format: 'json' | 'csv' argument: json reads audit-log entries; csv exports the CSV through the GET /devices/:deviceId/audit-log/export route. This replaces the separate export tool.
  • The remote HTTP-tokens and remote history tools are folded into the generalized platform_list_instance_http_tokens and platform_get_instance_history tools (see feat(mcp): hosted instance read tools #7727). Each takes an instanceType: 'hosted' | 'remote' argument and so serves remote instances (devices) too, so no remote-only variants are needed here. The project:history scope and the remote HTTP-tokens scope move with those tools to feat(mcp): hosted instance read tools #7727.
  • platform_list_team_provisioning_tokens describes device provisioning, so it is filed with the device tools. The summary view omits the token secret (unlike the create route), so it is safe to expose read-only.

Scopes to allow-list (IMPLICIT_TOKEN_SCOPES['user:expert-mcp']) and access-tag (#7445):
device:audit-log (read), team:device:provisioning-token:list (read).

Tests:

  • Read tools allowed for read-only PAT.
  • Provisioning-token list never surfaces the token secret.

Metadata

Metadata

Assignees

No one assigned

    Labels

    storyA user-oriented description of a feature

    Type

    No type

    Projects

    Status
    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions