Prefect · Capability

Prefect Cloud API — Event Subscriptions

Prefect Cloud API — Event Subscriptions. 5 operations. Lead operation: Create Subscription. Self-contained Naftiko capability covering one Prefect business surface.

Run with Naftiko PrefectEvent Subscriptions

What You Can Do

POST
Createsubscriptionapiaccountsaccountidworkspacesworkspaceideventsubscriptionspost — Create Subscription
/v1/api/accounts/{account-id}/workspaces/{workspace-id}/event-subscriptions
GET
Listsubscriptionsapiaccountsaccountidworkspacesworkspaceideventsubscriptionsget — List Subscriptions
/v1/api/accounts/{account-id}/workspaces/{workspace-id}/event-subscriptions
GET
Readsubscriptionapiaccountsaccountidworkspacesworkspaceideventsubscriptionssubscriptionidget — Read Subscription
/v1/api/accounts/{account-id}/workspaces/{workspace-id}/event-subscriptions/{subscription-id}
PATCH
Updatesubscriptionapiaccountsaccountidworkspacesworkspaceideventsubscriptionssubscriptionidpatch — Update Subscription
/v1/api/accounts/{account-id}/workspaces/{workspace-id}/event-subscriptions/{subscription-id}
DELETE
Deletesubscriptionapiaccountsaccountidworkspacesworkspaceideventsubscriptionssubscriptioniddelete — Delete Subscription
/v1/api/accounts/{account-id}/workspaces/{workspace-id}/event-subscriptions/{subscription-id}

MCP Tools

create-subscription

Create Subscription

list-subscriptions

List Subscriptions

read-only idempotent
read-subscription

Read Subscription

read-only idempotent
update-subscription

Update Subscription

idempotent
delete-subscription

Delete Subscription

idempotent

Capability Spec

prefect-event-subscriptions.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Prefect Cloud API — Event Subscriptions
  description: 'Prefect Cloud API — Event Subscriptions. 5 operations. Lead operation: Create Subscription. Self-contained
    Naftiko capability covering one Prefect business surface.'
  tags:
  - Prefect
  - Event Subscriptions
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    PREFECT_API_KEY: PREFECT_API_KEY
capability:
  consumes:
  - type: http
    namespace: prefect-event-subscriptions
    baseUri: ''
    description: Prefect Cloud API — Event Subscriptions business capability. Self-contained, no shared references.
    resources:
    - name: api-accounts-account_id-workspaces-workspace_id-event-subscriptions
      path: /api/accounts/{account_id}/workspaces/{workspace_id}/event-subscriptions/
      operations:
      - name: createsubscriptionapiaccountsaccountidworkspacesworkspaceideventsubscriptionspost
        method: POST
        description: Create Subscription
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: account_id
          in: path
          type: string
          required: true
        - name: workspace_id
          in: path
          type: string
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
      - name: listsubscriptionsapiaccountsaccountidworkspacesworkspaceideventsubscriptionsget
        method: GET
        description: List Subscriptions
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: account_id
          in: path
          type: string
          required: true
        - name: workspace_id
          in: path
          type: string
          required: true
        - name: resource_id
          in: query
          type: string
        - name: limit
          in: query
          type: integer
        - name: cursor
          in: query
          type: string
    - name: api-accounts-account_id-workspaces-workspace_id-event-subscriptions-subscription
      path: /api/accounts/{account_id}/workspaces/{workspace_id}/event-subscriptions/{subscription_id}
      operations:
      - name: readsubscriptionapiaccountsaccountidworkspacesworkspaceideventsubscriptionssubscriptionidget
        method: GET
        description: Read Subscription
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: account_id
          in: path
          type: string
          required: true
        - name: workspace_id
          in: path
          type: string
          required: true
        - name: subscription_id
          in: path
          type: string
          required: true
      - name: updatesubscriptionapiaccountsaccountidworkspacesworkspaceideventsubscriptionssubscriptionidpatch
        method: PATCH
        description: Update Subscription
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: account_id
          in: path
          type: string
          required: true
        - name: workspace_id
          in: path
          type: string
          required: true
        - name: subscription_id
          in: path
          type: string
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
      - name: deletesubscriptionapiaccountsaccountidworkspacesworkspaceideventsubscriptionssubscriptioniddelete
        method: DELETE
        description: Delete Subscription
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: account_id
          in: path
          type: string
          required: true
        - name: workspace_id
          in: path
          type: string
          required: true
        - name: subscription_id
          in: path
          type: string
          required: true
  exposes:
  - type: rest
    namespace: prefect-event-subscriptions-rest
    port: 8080
    description: REST adapter for Prefect Cloud API — Event Subscriptions. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/api/accounts/{account-id}/workspaces/{workspace-id}/event-subscriptions
      name: api-accounts-account-id-workspaces-workspace-id-event-subscriptions
      description: REST surface for api-accounts-account_id-workspaces-workspace_id-event-subscriptions.
      operations:
      - method: POST
        name: createsubscriptionapiaccountsaccountidworkspacesworkspaceideventsubscriptionspost
        description: Create Subscription
        call: prefect-event-subscriptions.createsubscriptionapiaccountsaccountidworkspacesworkspaceideventsubscriptionspost
        with:
          account_id: rest.account_id
          workspace_id: rest.workspace_id
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: GET
        name: listsubscriptionsapiaccountsaccountidworkspacesworkspaceideventsubscriptionsget
        description: List Subscriptions
        call: prefect-event-subscriptions.listsubscriptionsapiaccountsaccountidworkspacesworkspaceideventsubscriptionsget
        with:
          account_id: rest.account_id
          workspace_id: rest.workspace_id
          resource_id: rest.resource_id
          limit: rest.limit
          cursor: rest.cursor
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/accounts/{account-id}/workspaces/{workspace-id}/event-subscriptions/{subscription-id}
      name: api-accounts-account-id-workspaces-workspace-id-event-subscriptions-subscription
      description: REST surface for api-accounts-account_id-workspaces-workspace_id-event-subscriptions-subscription.
      operations:
      - method: GET
        name: readsubscriptionapiaccountsaccountidworkspacesworkspaceideventsubscriptionssubscriptionidget
        description: Read Subscription
        call: prefect-event-subscriptions.readsubscriptionapiaccountsaccountidworkspacesworkspaceideventsubscriptionssubscriptionidget
        with:
          account_id: rest.account_id
          workspace_id: rest.workspace_id
          subscription_id: rest.subscription_id
        outputParameters:
        - type: object
          mapping: $.
      - method: PATCH
        name: updatesubscriptionapiaccountsaccountidworkspacesworkspaceideventsubscriptionssubscriptionidpatch
        description: Update Subscription
        call: prefect-event-subscriptions.updatesubscriptionapiaccountsaccountidworkspacesworkspaceideventsubscriptionssubscriptionidpatch
        with:
          account_id: rest.account_id
          workspace_id: rest.workspace_id
          subscription_id: rest.subscription_id
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: deletesubscriptionapiaccountsaccountidworkspacesworkspaceideventsubscriptionssubscriptioniddelete
        description: Delete Subscription
        call: prefect-event-subscriptions.deletesubscriptionapiaccountsaccountidworkspacesworkspaceideventsubscriptionssubscriptioniddelete
        with:
          account_id: rest.account_id
          workspace_id: rest.workspace_id
          subscription_id: rest.subscription_id
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: prefect-event-subscriptions-mcp
    port: 9090
    transport: http
    description: MCP adapter for Prefect Cloud API — Event Subscriptions. One tool per consumed operation, routed inline through
      this capability's consumes block.
    tools:
    - name: create-subscription
      description: Create Subscription
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: prefect-event-subscriptions.createsubscriptionapiaccountsaccountidworkspacesworkspaceideventsubscriptionspost
      with:
        account_id: tools.account_id
        workspace_id: tools.workspace_id
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: list-subscriptions
      description: List Subscriptions
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: prefect-event-subscriptions.listsubscriptionsapiaccountsaccountidworkspacesworkspaceideventsubscriptionsget
      with:
        account_id: tools.account_id
        workspace_id: tools.workspace_id
        resource_id: tools.resource_id
        limit: tools.limit
        cursor: tools.cursor
      outputParameters:
      - type: object
        mapping: $.
    - name: read-subscription
      description: Read Subscription
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: prefect-event-subscriptions.readsubscriptionapiaccountsaccountidworkspacesworkspaceideventsubscriptionssubscriptionidget
      with:
        account_id: tools.account_id
        workspace_id: tools.workspace_id
        subscription_id: tools.subscription_id
      outputParameters:
      - type: object
        mapping: $.
    - name: update-subscription
      description: Update Subscription
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: prefect-event-subscriptions.updatesubscriptionapiaccountsaccountidworkspacesworkspaceideventsubscriptionssubscriptionidpatch
      with:
        account_id: tools.account_id
        workspace_id: tools.workspace_id
        subscription_id: tools.subscription_id
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: delete-subscription
      description: Delete Subscription
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: prefect-event-subscriptions.deletesubscriptionapiaccountsaccountidworkspacesworkspaceideventsubscriptionssubscriptioniddelete
      with:
        account_id: tools.account_id
        workspace_id: tools.workspace_id
        subscription_id: tools.subscription_id
      outputParameters:
      - type: object
        mapping: $.