Skip to main content

Discovery

These tools are always available (locked) and read-only. They help AI agents understand what’s in the project before making changes.

ap_list_flows

List all flows in the current project.
InputTypeRequiredDescription
No inputs required

ap_flow_structure

Get the structure of a flow: step tree, configuration status, and valid insert locations.
InputTypeRequiredDescription
flowIdstringYesThe flow ID

ap_list_pieces

List available pieces with their actions and triggers. Required before adding or updating steps.
InputTypeRequiredDescription
searchQuerystringNoFilter pieces by name
includeActionsbooleanNoInclude action details
includeTriggersbooleanNoInclude trigger details

ap_list_connections

List OAuth/app connections in the project. Required before adding steps that need authentication.
InputTypeRequiredDescription
No inputs required

ap_list_ai_models

List configured AI providers and their available models. Use this to discover valid aiProviderModel values for configuring Run Agent steps.
InputTypeRequiredDescription
providerstringNoFilter by provider (openai, anthropic, google, azure, openrouter, activepieces, cloudflare-gateway, custom)

ap_list_tables

List all tables in the project with their fields (name, type, id) and row counts.
InputTypeRequiredDescription
No inputs required

ap_find_records

Query records from a table with optional filtering.
InputTypeRequiredDescription
tableIdstringYesThe table ID
filtersarrayNoFilter conditions (fieldName, operator, value)
limitnumberNoMax records (default 50, max 500)
Filter operators: eq, neq, gt, gte, lt, lte, co (contains), exists, not_exists

ap_list_runs

List recent flow runs with optional filters.
InputTypeRequiredDescription
flowIdstringNoFilter by flow
statusstringNoFilter by status (SUCCEEDED, FAILED, RUNNING, etc.)
limitnumberNoMax runs (default 10, max 50)

ap_get_run

Get detailed results of a flow run including step-by-step outputs, errors, and durations.
InputTypeRequiredDescription
flowRunIdstringYesThe run ID

ap_setup_guide

Get step-by-step instructions for setting up connections or AI providers. Returns instructions for the user to follow in the UI — credentials are never handled through MCP.
InputTypeRequiredDescription
topicstringYesconnection or ai_provider
pieceNamestringNoFor connections: which piece needs auth

Flow Management

Create and manage flows.

ap_create_flow

Create a new empty flow.
InputTypeRequiredDescription
flowNamestringYesDisplay name for the flow

ap_rename_flow

Rename an existing flow.
InputTypeRequiredDescription
flowIdstringYesThe flow ID
displayNamestringYesNew name

ap_change_flow_status

Enable or disable a flow.
InputTypeRequiredDescription
flowIdstringYesThe flow ID
statusstringYesENABLED or DISABLED

ap_lock_and_publish

Publish the current draft of a flow. Validates all steps are configured.
InputTypeRequiredDescription
flowIdstringYesThe flow ID

Flow Building

Add, configure, and remove steps in a flow.

ap_update_trigger

Set or update the trigger for a flow.
InputTypeRequiredDescription
flowIdstringYesThe flow ID
pieceNamestringYesPiece name (e.g., @activepieces/piece-gmail)
pieceVersionstringYesPiece version (e.g., ~0.11.6)
triggerNamestringYesTrigger name from the piece
inputobjectNoTrigger configuration
authstringNoConnection externalId
displayNamestringNoDisplay name for the trigger step

ap_add_step

Add a new step to a flow. Creates a skeleton — configure it with ap_update_step.
InputTypeRequiredDescription
flowIdstringYesThe flow ID
parentStepNamestringYesStep to insert after/into
stepLocationRelativeToParentstringYesAFTER, INSIDE_LOOP, or INSIDE_BRANCH
stepTypestringYesCODE, PIECE, LOOP_ON_ITEMS, or ROUTER
displayNamestringYesStep display name
pieceNamestringNoFor PIECE steps
pieceVersionstringNoFor PIECE steps
actionNamestringNoFor PIECE steps
branchIndexnumberNoFor INSIDE_BRANCH

ap_update_step

Update an existing step’s settings. Auto-fills default values for optional properties.
InputTypeRequiredDescription
flowIdstringYesThe flow ID
stepNamestringYesStep name (e.g., step_1)
displayNamestringNoNew display name
inputobjectNoStep configuration
authstringNoConnection externalId
actionNamestringNoFor PIECE steps
loopItemsstringNoFor LOOP steps
skipbooleanNoSkip this step
Use {{stepName.output.field}} syntax in input values to reference data from previous steps.

ap_delete_step

Delete a step from a flow.
InputTypeRequiredDescription
flowIdstringYesThe flow ID
stepNamestringYesStep to delete

Router & Branching

Manage conditional branches in router steps.

ap_add_branch

Add a conditional branch to a router step.
InputTypeRequiredDescription
flowIdstringYesThe flow ID
stepNamestringYesThe router step name

ap_delete_branch

Delete a branch from a router step.
InputTypeRequiredDescription
flowIdstringYesThe flow ID
stepNamestringYesThe router step name
branchIndexnumberYesWhich branch to delete

Annotations

ap_manage_notes

Add, update, or delete canvas notes on a flow.
InputTypeRequiredDescription
flowIdstringYesThe flow ID
operationstringYesADD, UPDATE, or DELETE
noteIdstringNoRequired for UPDATE/DELETE
contentstringNoNote text (required for ADD)
colorstringNoNote color
positionobjectNo{x, y} canvas position
sizeobjectNo{width, height} note dimensions (default 200x200)

Tables

Full CRUD operations for the built-in Tables feature. Use field names (not IDs) when inserting or updating records.

ap_create_table

Create a new table with an initial set of fields.
InputTypeRequiredDescription
namestringYesTable name
fieldsarrayYesFields: {name, type, options?}
Field types: TEXT, NUMBER, DATE, STATIC_DROPDOWN (requires options array)

ap_delete_table

Permanently delete a table and all its data.
InputTypeRequiredDescription
tableIdstringYesThe table ID

ap_manage_fields

Add, rename, or delete fields on a table.
InputTypeRequiredDescription
tableIdstringYesThe table ID
operationstringYesADD, UPDATE, or DELETE
fieldIdstringNoRequired for UPDATE/DELETE
namestringNoRequired for ADD/UPDATE
typestringNoRequired for ADD
optionsarrayNoFor STATIC_DROPDOWN

ap_insert_records

Insert one or more records into a table.
InputTypeRequiredDescription
tableIdstringYesThe table ID
recordsarrayYes1-50 records, each mapping field names to values

ap_update_record

Update specific cells in a record. Only specified fields are changed.
InputTypeRequiredDescription
tableIdstringYesThe table ID
recordIdstringYesThe record ID
fieldsobjectYesField names to new values

ap_delete_records

Permanently delete one or more records.
InputTypeRequiredDescription
recordIdsarrayYesRecord IDs to delete

Testing & Runs

Test flows, inspect results, and retry failures. Test tools poll for up to 120 seconds and return step-by-step results.

ap_test_flow

Test a flow end-to-end in the test environment using saved sample data.
InputTypeRequiredDescription
flowIdstringYesThe flow ID
The flow must have a configured trigger. The tool validates this before running and returns a clear error if not.

ap_test_step

Test a single step within a flow. Runs all steps up to and including the target step.
InputTypeRequiredDescription
flowIdstringYesThe flow ID
stepNamestringYesStep to test

ap_retry_run

Retry a failed flow run.
InputTypeRequiredDescription
flowRunIdstringYesThe failed run ID
strategystringYesFROM_FAILED_STEP or ON_LATEST_VERSION
  • FROM_FAILED_STEP: Resume from where it failed, keeping previous step outputs
  • ON_LATEST_VERSION: Re-run the entire flow with the current published version