Prefect · Capability
Prefect Cloud API — Variables
Prefect Cloud API — Variables. 9 operations. Lead operation: Create Variable. Self-contained Naftiko capability covering one Prefect business surface.
What You Can Do
POST
Createvariableapiaccountsaccountidworkspacesworkspaceidvariablespost
— Create Variable
/v1/api/accounts/{account-id}/workspaces/{workspace-id}/variables
POST
Countvariablesapiaccountsaccountidworkspacesworkspaceidvariablescountpost
— Count Variables
/v1/api/accounts/{account-id}/workspaces/{workspace-id}/variables/count
POST
Readvariablesapiaccountsaccountidworkspacesworkspaceidvariablesfilterpost
— Read Variables
/v1/api/accounts/{account-id}/workspaces/{workspace-id}/variables/filter
GET
Readvariablebynameapiaccountsaccountidworkspacesworkspaceidvariablesnamenameget
— Read Variable By Name
/v1/api/accounts/{account-id}/workspaces/{workspace-id}/variables/name/{name}
PATCH
Updatevariablebynameapiaccountsaccountidworkspacesworkspaceidvariablesnamenamepatch
— Update Variable By Name
/v1/api/accounts/{account-id}/workspaces/{workspace-id}/variables/name/{name}
DELETE
Deletevariablebynameapiaccountsaccountidworkspacesworkspaceidvariablesnamenamedelete
— Delete Variable By Name
/v1/api/accounts/{account-id}/workspaces/{workspace-id}/variables/name/{name}
GET
Readvariableapiaccountsaccountidworkspacesworkspaceidvariablesidget
— Read Variable
/v1/api/accounts/{account-id}/workspaces/{workspace-id}/variables/{id}
PATCH
Updatevariableapiaccountsaccountidworkspacesworkspaceidvariablesidpatch
— Update Variable
/v1/api/accounts/{account-id}/workspaces/{workspace-id}/variables/{id}
DELETE
Deletevariableapiaccountsaccountidworkspacesworkspaceidvariablesiddelete
— Delete Variable
/v1/api/accounts/{account-id}/workspaces/{workspace-id}/variables/{id}
MCP Tools
create-variable
Create Variable
count-variables
Count Variables
read-variables
Read Variables
read-variable-name
Read Variable By Name
read-only
idempotent
update-variable-name
Update Variable By Name
idempotent
delete-variable-name
Delete Variable By Name
idempotent
read-variable
Read Variable
read-only
idempotent
update-variable
Update Variable
idempotent
delete-variable
Delete Variable
idempotent
Capability Spec
naftiko: 1.0.0-alpha2
info:
label: Prefect Cloud API — Variables
description: 'Prefect Cloud API — Variables. 9 operations. Lead operation: Create Variable. Self-contained Naftiko capability
covering one Prefect business surface.'
tags:
- Prefect
- Variables
created: '2026-05-19'
modified: '2026-05-19'
binds:
- namespace: env
keys:
PREFECT_API_KEY: PREFECT_API_KEY
capability:
consumes:
- type: http
namespace: prefect-variables
baseUri: ''
description: Prefect Cloud API — Variables business capability. Self-contained, no shared references.
resources:
- name: api-accounts-account_id-workspaces-workspace_id-variables
path: /api/accounts/{account_id}/workspaces/{workspace_id}/variables/
operations:
- name: createvariableapiaccountsaccountidworkspacesworkspaceidvariablespost
method: POST
description: Create Variable
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-variables-count
path: /api/accounts/{account_id}/workspaces/{workspace_id}/variables/count
operations:
- name: countvariablesapiaccountsaccountidworkspacesworkspaceidvariablescountpost
method: POST
description: Count Variables
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-variables-filter
path: /api/accounts/{account_id}/workspaces/{workspace_id}/variables/filter
operations:
- name: readvariablesapiaccountsaccountidworkspacesworkspaceidvariablesfilterpost
method: POST
description: Read Variables
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-variables-name-name
path: /api/accounts/{account_id}/workspaces/{workspace_id}/variables/name/{name}
operations:
- name: readvariablebynameapiaccountsaccountidworkspacesworkspaceidvariablesnamenameget
method: GET
description: Read Variable By Name
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: name
in: path
type: string
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: updatevariablebynameapiaccountsaccountidworkspacesworkspaceidvariablesnamenamepatch
method: PATCH
description: Update Variable By Name
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: name
in: path
type: string
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: deletevariablebynameapiaccountsaccountidworkspacesworkspaceidvariablesnamenamedelete
method: DELETE
description: Delete Variable By Name
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: name
in: path
type: string
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-variables-id
path: /api/accounts/{account_id}/workspaces/{workspace_id}/variables/{id}
operations:
- name: readvariableapiaccountsaccountidworkspacesworkspaceidvariablesidget
method: GET
description: Read Variable
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
- name: workspace_id
in: path
type: string
required: true
- name: x-prefect-api-version
in: header
type: string
- name: updatevariableapiaccountsaccountidworkspacesworkspaceidvariablesidpatch
method: PATCH
description: Update Variable
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
- 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: deletevariableapiaccountsaccountidworkspacesworkspaceidvariablesiddelete
method: DELETE
description: Delete Variable
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
- name: workspace_id
in: path
type: string
required: true
- name: x-prefect-api-version
in: header
type: string
exposes:
- type: rest
namespace: prefect-variables-rest
port: 8080
description: REST adapter for Prefect Cloud API — Variables. One Spectral-compliant resource per consumed operation, prefixed
with /v1.
resources:
- path: /v1/api/accounts/{account-id}/workspaces/{workspace-id}/variables
name: api-accounts-account-id-workspaces-workspace-id-variables
description: REST surface for api-accounts-account_id-workspaces-workspace_id-variables.
operations:
- method: POST
name: createvariableapiaccountsaccountidworkspacesworkspaceidvariablespost
description: Create Variable
call: prefect-variables.createvariableapiaccountsaccountidworkspacesworkspaceidvariablespost
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}/variables/count
name: api-accounts-account-id-workspaces-workspace-id-variables-count
description: REST surface for api-accounts-account_id-workspaces-workspace_id-variables-count.
operations:
- method: POST
name: countvariablesapiaccountsaccountidworkspacesworkspaceidvariablescountpost
description: Count Variables
call: prefect-variables.countvariablesapiaccountsaccountidworkspacesworkspaceidvariablescountpost
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}/variables/filter
name: api-accounts-account-id-workspaces-workspace-id-variables-filter
description: REST surface for api-accounts-account_id-workspaces-workspace_id-variables-filter.
operations:
- method: POST
name: readvariablesapiaccountsaccountidworkspacesworkspaceidvariablesfilterpost
description: Read Variables
call: prefect-variables.readvariablesapiaccountsaccountidworkspacesworkspaceidvariablesfilterpost
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}/variables/name/{name}
name: api-accounts-account-id-workspaces-workspace-id-variables-name-name
description: REST surface for api-accounts-account_id-workspaces-workspace_id-variables-name-name.
operations:
- method: GET
name: readvariablebynameapiaccountsaccountidworkspacesworkspaceidvariablesnamenameget
description: Read Variable By Name
call: prefect-variables.readvariablebynameapiaccountsaccountidworkspacesworkspaceidvariablesnamenameget
with:
name: rest.name
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: updatevariablebynameapiaccountsaccountidworkspacesworkspaceidvariablesnamenamepatch
description: Update Variable By Name
call: prefect-variables.updatevariablebynameapiaccountsaccountidworkspacesworkspaceidvariablesnamenamepatch
with:
name: rest.name
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: deletevariablebynameapiaccountsaccountidworkspacesworkspaceidvariablesnamenamedelete
description: Delete Variable By Name
call: prefect-variables.deletevariablebynameapiaccountsaccountidworkspacesworkspaceidvariablesnamenamedelete
with:
name: rest.name
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}/variables/{id}
name: api-accounts-account-id-workspaces-workspace-id-variables-id
description: REST surface for api-accounts-account_id-workspaces-workspace_id-variables-id.
operations:
- method: GET
name: readvariableapiaccountsaccountidworkspacesworkspaceidvariablesidget
description: Read Variable
call: prefect-variables.readvariableapiaccountsaccountidworkspacesworkspaceidvariablesidget
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: updatevariableapiaccountsaccountidworkspacesworkspaceidvariablesidpatch
description: Update Variable
call: prefect-variables.updatevariableapiaccountsaccountidworkspacesworkspaceidvariablesidpatch
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: deletevariableapiaccountsaccountidworkspacesworkspaceidvariablesiddelete
description: Delete Variable
call: prefect-variables.deletevariableapiaccountsaccountidworkspacesworkspaceidvariablesiddelete
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-variables-mcp
port: 9090
transport: http
description: MCP adapter for Prefect Cloud API — Variables. One tool per consumed operation, routed inline through this
capability's consumes block.
tools:
- name: create-variable
description: Create Variable
hints:
readOnly: false
destructive: false
idempotent: false
call: prefect-variables.createvariableapiaccountsaccountidworkspacesworkspaceidvariablespost
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-variables
description: Count Variables
hints:
readOnly: false
destructive: false
idempotent: false
call: prefect-variables.countvariablesapiaccountsaccountidworkspacesworkspaceidvariablescountpost
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-variables
description: Read Variables
hints:
readOnly: false
destructive: false
idempotent: false
call: prefect-variables.readvariablesapiaccountsaccountidworkspacesworkspaceidvariablesfilterpost
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-variable-name
description: Read Variable By Name
hints:
readOnly: true
destructive: false
idempotent: true
call: prefect-variables.readvariablebynameapiaccountsaccountidworkspacesworkspaceidvariablesnamenameget
with:
name: tools.name
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-variable-name
description: Update Variable By Name
hints:
readOnly: false
destructive: false
idempotent: true
call: prefect-variables.updatevariablebynameapiaccountsaccountidworkspacesworkspaceidvariablesnamenamepatch
with:
name: tools.name
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-variable-name
description: Delete Variable By Name
hints:
readOnly: false
destructive: true
idempotent: true
call: prefect-variables.deletevariablebynameapiaccountsaccountidworkspacesworkspaceidvariablesnamenamedelete
with:
name: tools.name
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-variable
description: Read Variable
hints:
readOnly: true
destructive: false
idempotent: true
call: prefect-variables.readvariableapiaccountsaccountidworkspacesworkspaceidvariablesidget
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-variable
description: Update Variable
hints:
readOnly: false
destructive: false
idempotent: true
call: prefect-variables.updatevariableapiaccountsaccountidworkspacesworkspaceidvariablesidpatch
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-variable
description: Delete Variable
hints:
readOnly: false
destructive: true
idempotent: true
call: prefect-variables.deletevariableapiaccountsaccountidworkspacesworkspaceidvariablesiddelete
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: $.