Prefect · Capability

Prefect Cloud API — SavedSearches

Prefect Cloud API — SavedSearches. 4 operations. Lead operation: Create Saved Search. Self-contained Naftiko capability covering one Prefect business surface.

Run with Naftiko PrefectSavedSearches

What You Can Do

PUT
Createsavedsearchapiaccountsaccountidworkspacesworkspaceidsavedsearchesput — Create Saved Search
/v1/api/accounts/{account-id}/workspaces/{workspace-id}/saved-searches
POST
Readsavedsearchesapiaccountsaccountidworkspacesworkspaceidsavedsearchesfilterpost — Read Saved Searches
/v1/api/accounts/{account-id}/workspaces/{workspace-id}/saved-searches/filter
GET
Readsavedsearchapiaccountsaccountidworkspacesworkspaceidsavedsearchesidget — Read Saved Search
/v1/api/accounts/{account-id}/workspaces/{workspace-id}/saved-searches/{id}
DELETE
Deletesavedsearchapiaccountsaccountidworkspacesworkspaceidsavedsearchesiddelete — Delete Saved Search
/v1/api/accounts/{account-id}/workspaces/{workspace-id}/saved-searches/{id}

MCP Tools

create-saved-search

Create Saved Search

idempotent
read-saved-searches

Read Saved Searches

read-only
read-saved-search

Read Saved Search

read-only idempotent
delete-saved-search

Delete Saved Search

idempotent

Capability Spec

prefect-savedsearches.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Prefect Cloud API — SavedSearches
  description: 'Prefect Cloud API — SavedSearches. 4 operations. Lead operation: Create Saved Search. Self-contained Naftiko
    capability covering one Prefect business surface.'
  tags:
  - Prefect
  - SavedSearches
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    PREFECT_API_KEY: PREFECT_API_KEY
capability:
  consumes:
  - type: http
    namespace: prefect-savedsearches
    baseUri: ''
    description: Prefect Cloud API — SavedSearches business capability. Self-contained, no shared references.
    resources:
    - name: api-accounts-account_id-workspaces-workspace_id-saved_searches
      path: /api/accounts/{account_id}/workspaces/{workspace_id}/saved_searches/
      operations:
      - name: createsavedsearchapiaccountsaccountidworkspacesworkspaceidsavedsearchesput
        method: PUT
        description: Create Saved Search
        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-saved_searches-filter
      path: /api/accounts/{account_id}/workspaces/{workspace_id}/saved_searches/filter
      operations:
      - name: readsavedsearchesapiaccountsaccountidworkspacesworkspaceidsavedsearchesfilterpost
        method: POST
        description: Read Saved Searches
        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-saved_searches-id
      path: /api/accounts/{account_id}/workspaces/{workspace_id}/saved_searches/{id}
      operations:
      - name: readsavedsearchapiaccountsaccountidworkspacesworkspaceidsavedsearchesidget
        method: GET
        description: Read Saved Search
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          description: The saved search 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
      - name: deletesavedsearchapiaccountsaccountidworkspacesworkspaceidsavedsearchesiddelete
        method: DELETE
        description: Delete Saved Search
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          description: The saved search 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-savedsearches-rest
    port: 8080
    description: REST adapter for Prefect Cloud API — SavedSearches. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/api/accounts/{account-id}/workspaces/{workspace-id}/saved-searches
      name: api-accounts-account-id-workspaces-workspace-id-saved-searches
      description: REST surface for api-accounts-account_id-workspaces-workspace_id-saved_searches.
      operations:
      - method: PUT
        name: createsavedsearchapiaccountsaccountidworkspacesworkspaceidsavedsearchesput
        description: Create Saved Search
        call: prefect-savedsearches.createsavedsearchapiaccountsaccountidworkspacesworkspaceidsavedsearchesput
        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}/saved-searches/filter
      name: api-accounts-account-id-workspaces-workspace-id-saved-searches-filter
      description: REST surface for api-accounts-account_id-workspaces-workspace_id-saved_searches-filter.
      operations:
      - method: POST
        name: readsavedsearchesapiaccountsaccountidworkspacesworkspaceidsavedsearchesfilterpost
        description: Read Saved Searches
        call: prefect-savedsearches.readsavedsearchesapiaccountsaccountidworkspacesworkspaceidsavedsearchesfilterpost
        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}/saved-searches/{id}
      name: api-accounts-account-id-workspaces-workspace-id-saved-searches-id
      description: REST surface for api-accounts-account_id-workspaces-workspace_id-saved_searches-id.
      operations:
      - method: GET
        name: readsavedsearchapiaccountsaccountidworkspacesworkspaceidsavedsearchesidget
        description: Read Saved Search
        call: prefect-savedsearches.readsavedsearchapiaccountsaccountidworkspacesworkspaceidsavedsearchesidget
        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: DELETE
        name: deletesavedsearchapiaccountsaccountidworkspacesworkspaceidsavedsearchesiddelete
        description: Delete Saved Search
        call: prefect-savedsearches.deletesavedsearchapiaccountsaccountidworkspacesworkspaceidsavedsearchesiddelete
        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-savedsearches-mcp
    port: 9090
    transport: http
    description: MCP adapter for Prefect Cloud API — SavedSearches. One tool per consumed operation, routed inline through
      this capability's consumes block.
    tools:
    - name: create-saved-search
      description: Create Saved Search
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: prefect-savedsearches.createsavedsearchapiaccountsaccountidworkspacesworkspaceidsavedsearchesput
      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-saved-searches
      description: Read Saved Searches
      hints:
        readOnly: true
        destructive: false
        idempotent: false
      call: prefect-savedsearches.readsavedsearchesapiaccountsaccountidworkspacesworkspaceidsavedsearchesfilterpost
      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-saved-search
      description: Read Saved Search
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: prefect-savedsearches.readsavedsearchapiaccountsaccountidworkspacesworkspaceidsavedsearchesidget
      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: delete-saved-search
      description: Delete Saved Search
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: prefect-savedsearches.deletesavedsearchapiaccountsaccountidworkspacesworkspaceidsavedsearchesiddelete
      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: $.