Skip to content

5.13-c Delete and destructive tools (phase 2) #7713

Description

@andypalmi

Parent: #7682 (5.13 Broker and MQTT (special review))
Tool file: new forge/ee/lib/mcp/tools/broker.js

destructiveHint: true. Contingent on a product decision to allow broker mutation over MCP. Neither tool mints credentials, so #7513 does not block them. One tool per delete endpoint.

Tool Endpoint Scope Annotation
platform_delete_broker_topic DELETE /teams/:teamId/brokers/:brokerId/topics/:topicId broker:topics:write destructive
platform_delete_broker_client DELETE /teams/:teamId/broker/client/:username broker:clients:delete destructive

Design notes:

  • The topic delete route uses a plain needsPermission('broker:topics:write') (it is not dual-gated, unlike GET/POST topics), and its path is a single :topicId param, not a wildcard.
  • delete_broker_client (broker:clients:delete, Owner) removes a broker client. It does not issue credentials, so it is not in the Scoped PATs - Block Broker Credential Issuance for PAT-Authenticated Requests #7513 class; it belongs with the rest of the contingent broker write/delete surface.
  • The whole surface is gated by the enterprise license tier and the per-team teamBroker feature flag.

Scopes to allow-list + access-tag (#7445, only if writes approved):
broker:topics:write (write), broker:clients:delete (write).

Tool definitions (description + zod inputSchema):

platform_delete_broker_topic: {
  description: 'Deletes a broker topic.',
  inputSchema: z.object({
    teamId: z.string().describe('team hashid'),
    brokerId: z.string().describe("broker id: either the literal 'team-broker' or a 3rd-party broker hashid"),
    topicId: z.string().describe('topic hashid')
  })
},
platform_delete_broker_client: {
  description: 'Deletes a team broker client.',
  inputSchema: z.object({
    teamId: z.string().describe('team hashid'),
    username: z.string().describe('Username of the broker client to delete')
  })
}

Tests (only if writes approved):

  • The tool carries destructiveHint: true.
  • Read-only PAT rejected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    storyA user-oriented description of a feature

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    Status
    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions