Prefect · Capability

Prefect Cloud API — Artifacts

Prefect Cloud API — Artifacts. 9 operations. Lead operation: Create Artifact. Self-contained Naftiko capability covering one Prefect business surface.

Run with Naftiko PrefectArtifacts

What You Can Do

POST
Createartifactapiaccountsaccountidworkspacesworkspaceidartifactspost — Create Artifact
/v1/api/accounts/{account-id}/workspaces/{workspace-id}/artifacts
POST
Countartifactsapiaccountsaccountidworkspacesworkspaceidartifactscountpost — Count Artifacts
/v1/api/accounts/{account-id}/workspaces/{workspace-id}/artifacts/count
POST
Readartifactsapiaccountsaccountidworkspacesworkspaceidartifactsfilterpost — Read Artifacts
/v1/api/accounts/{account-id}/workspaces/{workspace-id}/artifacts/filter
POST
Countlatestartifactsapiaccountsaccountidworkspacesworkspaceidartifactslatestcountpost — Count Latest Artifacts
/v1/api/accounts/{account-id}/workspaces/{workspace-id}/artifacts/latest/count
POST
Readlatestartifactsapiaccountsaccountidworkspacesworkspaceidartifactslatestfilterpost — Read Latest Artifacts
/v1/api/accounts/{account-id}/workspaces/{workspace-id}/artifacts/latest/filter
GET
Readartifactapiaccountsaccountidworkspacesworkspaceidartifactsidget — Read Artifact
/v1/api/accounts/{account-id}/workspaces/{workspace-id}/artifacts/{id}
PATCH
Updateartifactapiaccountsaccountidworkspacesworkspaceidartifactsidpatch — Update Artifact
/v1/api/accounts/{account-id}/workspaces/{workspace-id}/artifacts/{id}
DELETE
Deleteartifactapiaccountsaccountidworkspacesworkspaceidartifactsiddelete — Delete Artifact
/v1/api/accounts/{account-id}/workspaces/{workspace-id}/artifacts/{id}
GET
Readlatestartifactapiaccountsaccountidworkspacesworkspaceidartifactskeylatestget — Read Latest Artifact
/v1/api/accounts/{account-id}/workspaces/{workspace-id}/artifacts/{key}/latest

MCP Tools

create-artifact

Create Artifact

count-artifacts

Count Artifacts

read-artifacts

Read Artifacts

count-latest-artifacts

Count Latest Artifacts

read-only
read-latest-artifacts

Read Latest Artifacts

read-only
read-artifact

Read Artifact

read-only idempotent
update-artifact

Update Artifact

idempotent
delete-artifact

Delete Artifact

idempotent
read-latest-artifact

Read Latest Artifact

read-only idempotent

Capability Spec

prefect-artifacts.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Prefect Cloud API — Artifacts
  description: 'Prefect Cloud API — Artifacts. 9 operations. Lead operation: Create Artifact. Self-contained Naftiko capability
    covering one Prefect business surface.'
  tags:
  - Prefect
  - Artifacts
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    PREFECT_API_KEY: PREFECT_API_KEY
capability:
  consumes:
  - type: http
    namespace: prefect-artifacts
    baseUri: ''
    description: Prefect Cloud API — Artifacts business capability. Self-contained, no shared references.
    resources:
    - name: api-accounts-account_id-workspaces-workspace_id-artifacts
      path: /api/accounts/{account_id}/workspaces/{workspace_id}/artifacts/
      operations:
      - name: createartifactapiaccountsaccountidworkspacesworkspaceidartifactspost
        method: POST
        description: Create Artifact
        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: x-prefect-api-version
          in: header
          type: string
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: api-accounts-account_id-workspaces-workspace_id-artifacts-count
      path: /api/accounts/{account_id}/workspaces/{workspace_id}/artifacts/count
      operations:
      - name: countartifactsapiaccountsaccountidworkspacesworkspaceidartifactscountpost
        method: POST
        description: Count Artifacts
        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: x-prefect-api-version
          in: header
          type: string
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
    - name: api-accounts-account_id-workspaces-workspace_id-artifacts-filter
      path: /api/accounts/{account_id}/workspaces/{workspace_id}/artifacts/filter
      operations:
      - name: readartifactsapiaccountsaccountidworkspacesworkspaceidartifactsfilterpost
        method: POST
        description: Read Artifacts
        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: x-prefect-api-version
          in: header
          type: string
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
    - name: api-accounts-account_id-workspaces-workspace_id-artifacts-latest-count
      path: /api/accounts/{account_id}/workspaces/{workspace_id}/artifacts/latest/count
      operations:
      - name: countlatestartifactsapiaccountsaccountidworkspacesworkspaceidartifactslatestcountpost
        method: POST
        description: Count Latest Artifacts
        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: x-prefect-api-version
          in: header
          type: string
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
    - name: api-accounts-account_id-workspaces-workspace_id-artifacts-latest-filter
      path: /api/accounts/{account_id}/workspaces/{workspace_id}/artifacts/latest/filter
      operations:
      - name: readlatestartifactsapiaccountsaccountidworkspacesworkspaceidartifactslatestfilterpost
        method: POST
        description: Read Latest Artifacts
        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: x-prefect-api-version
          in: header
          type: string
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
    - name: api-accounts-account_id-workspaces-workspace_id-artifacts-id
      path: /api/accounts/{account_id}/workspaces/{workspace_id}/artifacts/{id}
      operations:
      - name: readartifactapiaccountsaccountidworkspacesworkspaceidartifactsidget
        method: GET
        description: Read Artifact
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          description: The ID of the artifact to retrieve.
          required: true
        - name: account_id
          in: path
          type: string
          required: true
        - name: workspace_id
          in: path
          type: string
          required: true
        - name: x-prefect-api-version
          in: header
          type: string
      - name: updateartifactapiaccountsaccountidworkspacesworkspaceidartifactsidpatch
        method: PATCH
        description: Update Artifact
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          description: The ID of the artifact to update.
          required: true
        - name: account_id
          in: path
          type: string
          required: true
        - name: workspace_id
          in: path
          type: string
          required: true
        - name: x-prefect-api-version
          in: header
          type: string
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
      - name: deleteartifactapiaccountsaccountidworkspacesworkspaceidartifactsiddelete
        method: DELETE
        description: Delete Artifact
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          description: The ID of the artifact to delete.
          required: true
        - name: account_id
          in: path
          type: string
          required: true
        - name: workspace_id
          in: path
          type: string
          required: true
        - name: x-prefect-api-version
          in: header
          type: string
    - name: api-accounts-account_id-workspaces-workspace_id-artifacts-key-latest
      path: /api/accounts/{account_id}/workspaces/{workspace_id}/artifacts/{key}/latest
      operations:
      - name: readlatestartifactapiaccountsaccountidworkspacesworkspaceidartifactskeylatestget
        method: GET
        description: Read Latest Artifact
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: key
          in: path
          type: string
          description: The key of the artifact to retrieve.
          required: true
        - name: account_id
          in: path
          type: string
          required: true
        - name: workspace_id
          in: path
          type: string
          required: true
        - name: x-prefect-api-version
          in: header
          type: string
  exposes:
  - type: rest
    namespace: prefect-artifacts-rest
    port: 8080
    description: REST adapter for Prefect Cloud API — Artifacts. One Spectral-compliant resource per consumed operation, prefixed
      with /v1.
    resources:
    - path: /v1/api/accounts/{account-id}/workspaces/{workspace-id}/artifacts
      name: api-accounts-account-id-workspaces-workspace-id-artifacts
      description: REST surface for api-accounts-account_id-workspaces-workspace_id-artifacts.
      operations:
      - method: POST
        name: createartifactapiaccountsaccountidworkspacesworkspaceidartifactspost
        description: Create Artifact
        call: prefect-artifacts.createartifactapiaccountsaccountidworkspacesworkspaceidartifactspost
        with:
          account_id: rest.account_id
          workspace_id: rest.workspace_id
          x-prefect-api-version: rest.x-prefect-api-version
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/accounts/{account-id}/workspaces/{workspace-id}/artifacts/count
      name: api-accounts-account-id-workspaces-workspace-id-artifacts-count
      description: REST surface for api-accounts-account_id-workspaces-workspace_id-artifacts-count.
      operations:
      - method: POST
        name: countartifactsapiaccountsaccountidworkspacesworkspaceidartifactscountpost
        description: Count Artifacts
        call: prefect-artifacts.countartifactsapiaccountsaccountidworkspacesworkspaceidartifactscountpost
        with:
          account_id: rest.account_id
          workspace_id: rest.workspace_id
          x-prefect-api-version: rest.x-prefect-api-version
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/accounts/{account-id}/workspaces/{workspace-id}/artifacts/filter
      name: api-accounts-account-id-workspaces-workspace-id-artifacts-filter
      description: REST surface for api-accounts-account_id-workspaces-workspace_id-artifacts-filter.
      operations:
      - method: POST
        name: readartifactsapiaccountsaccountidworkspacesworkspaceidartifactsfilterpost
        description: Read Artifacts
        call: prefect-artifacts.readartifactsapiaccountsaccountidworkspacesworkspaceidartifactsfilterpost
        with:
          account_id: rest.account_id
          workspace_id: rest.workspace_id
          x-prefect-api-version: rest.x-prefect-api-version
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/accounts/{account-id}/workspaces/{workspace-id}/artifacts/latest/count
      name: api-accounts-account-id-workspaces-workspace-id-artifacts-latest-count
      description: REST surface for api-accounts-account_id-workspaces-workspace_id-artifacts-latest-count.
      operations:
      - method: POST
        name: countlatestartifactsapiaccountsaccountidworkspacesworkspaceidartifactslatestcountpost
        description: Count Latest Artifacts
        call: prefect-artifacts.countlatestartifactsapiaccountsaccountidworkspacesworkspaceidartifactslatestcountpost
        with:
          account_id: rest.account_id
          workspace_id: rest.workspace_id
          x-prefect-api-version: rest.x-prefect-api-version
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/accounts/{account-id}/workspaces/{workspace-id}/artifacts/latest/filter
      name: api-accounts-account-id-workspaces-workspace-id-artifacts-latest-filter
      description: REST surface for api-accounts-account_id-workspaces-workspace_id-artifacts-latest-filter.
      operations:
      - method: POST
        name: readlatestartifactsapiaccountsaccountidworkspacesworkspaceidartifactslatestfilterpost
        description: Read Latest Artifacts
        call: prefect-artifacts.readlatestartifactsapiaccountsaccountidworkspacesworkspaceidartifactslatestfilterpost
        with:
          account_id: rest.account_id
          workspace_id: rest.workspace_id
          x-prefect-api-version: rest.x-prefect-api-version
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/accounts/{account-id}/workspaces/{workspace-id}/artifacts/{id}
      name: api-accounts-account-id-workspaces-workspace-id-artifacts-id
      description: REST surface for api-accounts-account_id-workspaces-workspace_id-artifacts-id.
      operations:
      - method: GET
        name: readartifactapiaccountsaccountidworkspacesworkspaceidartifactsidget
        description: Read Artifact
        call: prefect-artifacts.readartifactapiaccountsaccountidworkspacesworkspaceidartifactsidget
        with:
          id: rest.id
          account_id: rest.account_id
          workspace_id: rest.workspace_id
          x-prefect-api-version: rest.x-prefect-api-version
        outputParameters:
        - type: object
          mapping: $.
      - method: PATCH
        name: updateartifactapiaccountsaccountidworkspacesworkspaceidartifactsidpatch
        description: Update Artifact
        call: prefect-artifacts.updateartifactapiaccountsaccountidworkspacesworkspaceidartifactsidpatch
        with:
          id: rest.id
          account_id: rest.account_id
          workspace_id: rest.workspace_id
          x-prefect-api-version: rest.x-prefect-api-version
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: deleteartifactapiaccountsaccountidworkspacesworkspaceidartifactsiddelete
        description: Delete Artifact
        call: prefect-artifacts.deleteartifactapiaccountsaccountidworkspacesworkspaceidartifactsiddelete
        with:
          id: rest.id
          account_id: rest.account_id
          workspace_id: rest.workspace_id
          x-prefect-api-version: rest.x-prefect-api-version
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/accounts/{account-id}/workspaces/{workspace-id}/artifacts/{key}/latest
      name: api-accounts-account-id-workspaces-workspace-id-artifacts-key-latest
      description: REST surface for api-accounts-account_id-workspaces-workspace_id-artifacts-key-latest.
      operations:
      - method: GET
        name: readlatestartifactapiaccountsaccountidworkspacesworkspaceidartifactskeylatestget
        description: Read Latest Artifact
        call: prefect-artifacts.readlatestartifactapiaccountsaccountidworkspacesworkspaceidartifactskeylatestget
        with:
          key: rest.key
          account_id: rest.account_id
          workspace_id: rest.workspace_id
          x-prefect-api-version: rest.x-prefect-api-version
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: prefect-artifacts-mcp
    port: 9090
    transport: http
    description: MCP adapter for Prefect Cloud API — Artifacts. One tool per consumed operation, routed inline through this
      capability's consumes block.
    tools:
    - name: create-artifact
      description: Create Artifact
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: prefect-artifacts.createartifactapiaccountsaccountidworkspacesworkspaceidartifactspost
      with:
        account_id: tools.account_id
        workspace_id: tools.workspace_id
        x-prefect-api-version: tools.x-prefect-api-version
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: count-artifacts
      description: Count Artifacts
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: prefect-artifacts.countartifactsapiaccountsaccountidworkspacesworkspaceidartifactscountpost
      with:
        account_id: tools.account_id
        workspace_id: tools.workspace_id
        x-prefect-api-version: tools.x-prefect-api-version
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: read-artifacts
      description: Read Artifacts
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: prefect-artifacts.readartifactsapiaccountsaccountidworkspacesworkspaceidartifactsfilterpost
      with:
        account_id: tools.account_id
        workspace_id: tools.workspace_id
        x-prefect-api-version: tools.x-prefect-api-version
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: count-latest-artifacts
      description: Count Latest Artifacts
      hints:
        readOnly: true
        destructive: false
        idempotent: false
      call: prefect-artifacts.countlatestartifactsapiaccountsaccountidworkspacesworkspaceidartifactslatestcountpost
      with:
        account_id: tools.account_id
        workspace_id: tools.workspace_id
        x-prefect-api-version: tools.x-prefect-api-version
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: read-latest-artifacts
      description: Read Latest Artifacts
      hints:
        readOnly: true
        destructive: false
        idempotent: false
      call: prefect-artifacts.readlatestartifactsapiaccountsaccountidworkspacesworkspaceidartifactslatestfilterpost
      with:
        account_id: tools.account_id
        workspace_id: tools.workspace_id
        x-prefect-api-version: tools.x-prefect-api-version
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: read-artifact
      description: Read Artifact
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: prefect-artifacts.readartifactapiaccountsaccountidworkspacesworkspaceidartifactsidget
      with:
        id: tools.id
        account_id: tools.account_id
        workspace_id: tools.workspace_id
        x-prefect-api-version: tools.x-prefect-api-version
      outputParameters:
      - type: object
        mapping: $.
    - name: update-artifact
      description: Update Artifact
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: prefect-artifacts.updateartifactapiaccountsaccountidworkspacesworkspaceidartifactsidpatch
      with:
        id: tools.id
        account_id: tools.account_id
        workspace_id: tools.workspace_id
        x-prefect-api-version: tools.x-prefect-api-version
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: delete-artifact
      description: Delete Artifact
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: prefect-artifacts.deleteartifactapiaccountsaccountidworkspacesworkspaceidartifactsiddelete
      with:
        id: tools.id
        account_id: tools.account_id
        workspace_id: tools.workspace_id
        x-prefect-api-version: tools.x-prefect-api-version
      outputParameters:
      - type: object
        mapping: $.
    - name: read-latest-artifact
      description: Read Latest Artifact
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: prefect-artifacts.readlatestartifactapiaccountsaccountidworkspacesworkspaceidartifactskeylatestget
      with:
        key: tools.key
        account_id: tools.account_id
        workspace_id: tools.workspace_id
        x-prefect-api-version: tools.x-prefect-api-version
      outputParameters:
      - type: object
        mapping: $.