Prefect · Capability

Prefect Cloud API — Workspace Roles

Prefect Cloud API — Workspace Roles. 5 operations. Lead operation: Create Workspace Role. Self-contained Naftiko capability covering one Prefect business surface.

Run with Naftiko PrefectWorkspace Roles

What You Can Do

POST
Createworkspaceroleapiaccountsaccountidworkspacerolespost — Create Workspace Role
/v1/api/accounts/{account-id}/workspace-roles
POST
Readworkspacerolesapiaccountsaccountidworkspacerolesfilterpost — Read Workspace Roles
/v1/api/accounts/{account-id}/workspace-roles/filter
PATCH
Updateworkspaceroleapiaccountsaccountidworkspacerolesidpatch — Update Workspace Role
/v1/api/accounts/{account-id}/workspace-roles/{id}
DELETE
Deleteworkspaceroleapiaccountsaccountidworkspacerolesiddelete — Delete Workspace Role
/v1/api/accounts/{account-id}/workspace-roles/{id}
GET
Readworkspaceroleapiaccountsaccountidworkspacerolesidget — Read Workspace Role
/v1/api/accounts/{account-id}/workspace-roles/{id}

MCP Tools

create-workspace-role

Create Workspace Role

read-workspace-roles

Read Workspace Roles

update-workspace-role

Update Workspace Role

idempotent
delete-workspace-role

Delete Workspace Role

idempotent
read-workspace-role

Read Workspace Role

read-only idempotent

Capability Spec

prefect-workspace-roles.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Prefect Cloud API — Workspace Roles
  description: 'Prefect Cloud API — Workspace Roles. 5 operations. Lead operation: Create Workspace Role. Self-contained Naftiko
    capability covering one Prefect business surface.'
  tags:
  - Prefect
  - Workspace Roles
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    PREFECT_API_KEY: PREFECT_API_KEY
capability:
  consumes:
  - type: http
    namespace: prefect-workspace-roles
    baseUri: ''
    description: Prefect Cloud API — Workspace Roles business capability. Self-contained, no shared references.
    resources:
    - name: api-accounts-account_id-workspace_roles
      path: /api/accounts/{account_id}/workspace_roles/
      operations:
      - name: createworkspaceroleapiaccountsaccountidworkspacerolespost
        method: POST
        description: Create Workspace Role
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: account_id
          in: path
          type: string
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: api-accounts-account_id-workspace_roles-filter
      path: /api/accounts/{account_id}/workspace_roles/filter
      operations:
      - name: readworkspacerolesapiaccountsaccountidworkspacerolesfilterpost
        method: POST
        description: Read Workspace Roles
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: account_id
          in: path
          type: string
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
    - name: api-accounts-account_id-workspace_roles-id
      path: /api/accounts/{account_id}/workspace_roles/{id}
      operations:
      - name: updateworkspaceroleapiaccountsaccountidworkspacerolesidpatch
        method: PATCH
        description: Update Workspace Role
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: account_id
          in: path
          type: string
          required: true
        - name: id
          in: path
          type: string
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
      - name: deleteworkspaceroleapiaccountsaccountidworkspacerolesiddelete
        method: DELETE
        description: Delete Workspace Role
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: account_id
          in: path
          type: string
          required: true
        - name: id
          in: path
          type: string
          required: true
      - name: readworkspaceroleapiaccountsaccountidworkspacerolesidget
        method: GET
        description: Read Workspace Role
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          required: true
        - name: account_id
          in: path
          type: string
          required: true
  exposes:
  - type: rest
    namespace: prefect-workspace-roles-rest
    port: 8080
    description: REST adapter for Prefect Cloud API — Workspace Roles. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/api/accounts/{account-id}/workspace-roles
      name: api-accounts-account-id-workspace-roles
      description: REST surface for api-accounts-account_id-workspace_roles.
      operations:
      - method: POST
        name: createworkspaceroleapiaccountsaccountidworkspacerolespost
        description: Create Workspace Role
        call: prefect-workspace-roles.createworkspaceroleapiaccountsaccountidworkspacerolespost
        with:
          account_id: rest.account_id
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/accounts/{account-id}/workspace-roles/filter
      name: api-accounts-account-id-workspace-roles-filter
      description: REST surface for api-accounts-account_id-workspace_roles-filter.
      operations:
      - method: POST
        name: readworkspacerolesapiaccountsaccountidworkspacerolesfilterpost
        description: Read Workspace Roles
        call: prefect-workspace-roles.readworkspacerolesapiaccountsaccountidworkspacerolesfilterpost
        with:
          account_id: rest.account_id
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/accounts/{account-id}/workspace-roles/{id}
      name: api-accounts-account-id-workspace-roles-id
      description: REST surface for api-accounts-account_id-workspace_roles-id.
      operations:
      - method: PATCH
        name: updateworkspaceroleapiaccountsaccountidworkspacerolesidpatch
        description: Update Workspace Role
        call: prefect-workspace-roles.updateworkspaceroleapiaccountsaccountidworkspacerolesidpatch
        with:
          account_id: rest.account_id
          id: rest.id
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: deleteworkspaceroleapiaccountsaccountidworkspacerolesiddelete
        description: Delete Workspace Role
        call: prefect-workspace-roles.deleteworkspaceroleapiaccountsaccountidworkspacerolesiddelete
        with:
          account_id: rest.account_id
          id: rest.id
        outputParameters:
        - type: object
          mapping: $.
      - method: GET
        name: readworkspaceroleapiaccountsaccountidworkspacerolesidget
        description: Read Workspace Role
        call: prefect-workspace-roles.readworkspaceroleapiaccountsaccountidworkspacerolesidget
        with:
          id: rest.id
          account_id: rest.account_id
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: prefect-workspace-roles-mcp
    port: 9090
    transport: http
    description: MCP adapter for Prefect Cloud API — Workspace Roles. One tool per consumed operation, routed inline through
      this capability's consumes block.
    tools:
    - name: create-workspace-role
      description: Create Workspace Role
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: prefect-workspace-roles.createworkspaceroleapiaccountsaccountidworkspacerolespost
      with:
        account_id: tools.account_id
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: read-workspace-roles
      description: Read Workspace Roles
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: prefect-workspace-roles.readworkspacerolesapiaccountsaccountidworkspacerolesfilterpost
      with:
        account_id: tools.account_id
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: update-workspace-role
      description: Update Workspace Role
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: prefect-workspace-roles.updateworkspaceroleapiaccountsaccountidworkspacerolesidpatch
      with:
        account_id: tools.account_id
        id: tools.id
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: delete-workspace-role
      description: Delete Workspace Role
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: prefect-workspace-roles.deleteworkspaceroleapiaccountsaccountidworkspacerolesiddelete
      with:
        account_id: tools.account_id
        id: tools.id
      outputParameters:
      - type: object
        mapping: $.
    - name: read-workspace-role
      description: Read Workspace Role
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: prefect-workspace-roles.readworkspaceroleapiaccountsaccountidworkspacerolesidget
      with:
        id: tools.id
        account_id: tools.account_id
      outputParameters:
      - type: object
        mapping: $.