Prefect · Capability

Prefect Cloud API — Flow Run States

Prefect Cloud API — Flow Run States. 2 operations. Lead operation: Read Flow Run States. Self-contained Naftiko capability covering one Prefect business surface.

Run with Naftiko PrefectFlow Run States

What You Can Do

GET
Readflowrunstatesapiaccountsaccountidworkspacesworkspaceidflowrunstatesget — Read Flow Run States
/v1/api/accounts/{account-id}/workspaces/{workspace-id}/flow-run-states
GET
Readflowrunstateapiaccountsaccountidworkspacesworkspaceidflowrunstatesidget — Read Flow Run State
/v1/api/accounts/{account-id}/workspaces/{workspace-id}/flow-run-states/{id}

MCP Tools

read-flow-run-states

Read Flow Run States

read-only idempotent
read-flow-run-state

Read Flow Run State

read-only idempotent

Capability Spec

prefect-flow-run-states.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Prefect Cloud API — Flow Run States
  description: 'Prefect Cloud API — Flow Run States. 2 operations. Lead operation: Read Flow Run States. Self-contained Naftiko
    capability covering one Prefect business surface.'
  tags:
  - Prefect
  - Flow Run States
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    PREFECT_API_KEY: PREFECT_API_KEY
capability:
  consumes:
  - type: http
    namespace: prefect-flow-run-states
    baseUri: ''
    description: Prefect Cloud API — Flow Run States business capability. Self-contained, no shared references.
    resources:
    - name: api-accounts-account_id-workspaces-workspace_id-flow_run_states
      path: /api/accounts/{account_id}/workspaces/{workspace_id}/flow_run_states/
      operations:
      - name: readflowrunstatesapiaccountsaccountidworkspacesworkspaceidflowrunstatesget
        method: GET
        description: Read Flow Run States
        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: flow_run_id
          in: query
          type: string
          required: true
        - name: x-prefect-api-version
          in: header
          type: string
    - name: api-accounts-account_id-workspaces-workspace_id-flow_run_states-id
      path: /api/accounts/{account_id}/workspaces/{workspace_id}/flow_run_states/{id}
      operations:
      - name: readflowrunstateapiaccountsaccountidworkspacesworkspaceidflowrunstatesidget
        method: GET
        description: Read Flow Run State
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          description: The flow run state id
          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-flow-run-states-rest
    port: 8080
    description: REST adapter for Prefect Cloud API — Flow Run States. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/api/accounts/{account-id}/workspaces/{workspace-id}/flow-run-states
      name: api-accounts-account-id-workspaces-workspace-id-flow-run-states
      description: REST surface for api-accounts-account_id-workspaces-workspace_id-flow_run_states.
      operations:
      - method: GET
        name: readflowrunstatesapiaccountsaccountidworkspacesworkspaceidflowrunstatesget
        description: Read Flow Run States
        call: prefect-flow-run-states.readflowrunstatesapiaccountsaccountidworkspacesworkspaceidflowrunstatesget
        with:
          account_id: rest.account_id
          workspace_id: rest.workspace_id
          flow_run_id: rest.flow_run_id
          x-prefect-api-version: rest.x-prefect-api-version
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/accounts/{account-id}/workspaces/{workspace-id}/flow-run-states/{id}
      name: api-accounts-account-id-workspaces-workspace-id-flow-run-states-id
      description: REST surface for api-accounts-account_id-workspaces-workspace_id-flow_run_states-id.
      operations:
      - method: GET
        name: readflowrunstateapiaccountsaccountidworkspacesworkspaceidflowrunstatesidget
        description: Read Flow Run State
        call: prefect-flow-run-states.readflowrunstateapiaccountsaccountidworkspacesworkspaceidflowrunstatesidget
        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: $.
  - type: mcp
    namespace: prefect-flow-run-states-mcp
    port: 9090
    transport: http
    description: MCP adapter for Prefect Cloud API — Flow Run States. One tool per consumed operation, routed inline through
      this capability's consumes block.
    tools:
    - name: read-flow-run-states
      description: Read Flow Run States
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: prefect-flow-run-states.readflowrunstatesapiaccountsaccountidworkspacesworkspaceidflowrunstatesget
      with:
        account_id: tools.account_id
        workspace_id: tools.workspace_id
        flow_run_id: tools.flow_run_id
        x-prefect-api-version: tools.x-prefect-api-version
      outputParameters:
      - type: object
        mapping: $.
    - name: read-flow-run-state
      description: Read Flow Run State
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: prefect-flow-run-states.readflowrunstateapiaccountsaccountidworkspacesworkspaceidflowrunstatesidget
      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: $.