> For the complete documentation index, see [llms.txt](https://docs.pyck.cloud/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pyck.cloud/graphql-api/types/actiondefinition.md).

# ActionDefinition

Describes a single workflow query or update and whether it is currently callable

Audience: Programmer

Describes a single registered action on a workflow execution. An action is either a Temporal workflow **query** (read-only) or an **update** (can modify workflow state). The type is used by the [`workflowActions`](/graphql-api/queries/workflowactions.md) query to report what clients can currently invoke on a running workflow.

## Fields

| Field         | Type       | Required | Description                                                        |
| ------------- | ---------- | -------- | ------------------------------------------------------------------ |
| `name`        | `String!`  | Yes      | The name under which the action is registered on the workflow      |
| `description` | `String`   | No       | Optional human-readable description of what the action does        |
| `enabled`     | `Boolean!` | Yes      | Whether the action is currently callable on the workflow execution |

## Description

Workflows expose named handlers that clients can invoke. Which handlers exist, and which of them are currently callable, depends on the workflow's state: a handler may be registered but temporarily disabled while the workflow is in a particular step or waiting for a precondition to be met.

`ActionDefinition` captures this information in a single record:

* **`name`** identifies the action when invoking it.
* **`description`** is optional metadata that the workflow author provided at registration time. It is safe to display in UIs.
* **`enabled`** reflects whether an invocation would be accepted right now. Clients should disable controls when this is `false`.

## Example

```json
{
  "name": "confirmPick",
  "description": "Confirm that a pick has been completed",
  "enabled": true
}
```

A disabled action might look like:

```json
{
  "name": "cancelPick",
  "description": "Cancel the current pick and release the reservation",
  "enabled": false
}
```

## Usage

`ActionDefinition` values are returned inside the [`GetWorkflowActionsResponse`](/graphql-api/types/getworkflowactionsresponse.md) `queries` and `updates` lists:

```graphql
query {
  workflowActions(
    input: {
      workflowId: "order-processing-workflow-123"
      workflowExecutionId: "run-456-xyz"
    }
  ) {
    queries {
      name
      description
      enabled
    }
    updates {
      name
      description
      enabled
    }
  }
}
```

## Notes

* The same action name may appear on different workflow types with different semantics, so always interpret actions in the context of the workflow that exposes them.
* `description` may be `null` if the workflow author did not provide one at registration time.
* Treat `enabled` as a hint valid at the moment of the query: between the time the response is received and the time the action is invoked, the workflow may have transitioned to a state where the action is no longer callable.

## Related

* Query: [workflowActions](/graphql-api/queries/workflowactions.md)
* Type: [GetWorkflowActionsResponse](/graphql-api/types/getworkflowactionsresponse.md)
* Input: [GetWorkflowActionsInput](/graphql-api/inputs/getworkflowactionsinput.md)
* Input: [WorkflowActionsWhereInput](/graphql-api/inputs/workflowactionswhereinput.md)

## Service

This type is defined in the **workflow** service as part of the federated GraphQL schema.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.pyck.cloud/graphql-api/types/actiondefinition.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
