CircleCI ACTION
Trigger a Pipeline
Trigger a pipeline given a pipeline definition ID. Supports all integrations except GitLab. See the documentation
- Action
- Writes data
- API key
- SDK
- MCP
IMPLEMENTATION
Call this tool
Connect a user's CircleCI account once, then configure and run Trigger a Pipeline from your backend or agent.
import { PipedreamClient } from "@pipedream/sdk"
const pd = new PipedreamClient({
projectId: process.env.PIPEDREAM_PROJECT_ID!,
clientId: process.env.PIPEDREAM_CLIENT_ID!,
clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
projectEnvironment: "production",
})
const result = await pd.actions.run({
id: "circleci-trigger-pipeline",
externalUserId: "{external_user_id}", // any stable ID for this user in your system
configuredProps: {
circleci: { authProvisionId: "apn_xxxxxxx" },
projectSlug: "Project Slug",
definitionId: "Definition ID",
},
})
console.log(result)curl -X POST https://api.pipedream.com/v1/connect/{project_id}/actions/run \
-H "Content-Type: application/json" \
-H "X-PD-Environment: production" \
-H "Authorization: Bearer {access_token}" \
-d '{
"external_user_id": "{external_user_id}",
"id": "circleci-trigger-pipeline",
"configured_props": {
"circleci": { "authProvisionId": "apn_xxxxxxx" },
"projectSlug": "Project Slug",
"definitionId": "Definition ID"
}
}'// accessToken: mint a short-lived token with the Connect SDK — see the MCP guide
const transport = new StreamableHTTPClientTransport(
new URL("https://remote.mcp.pipedream.net/v3"),
{
requestInit: {
headers: {
Authorization: `Bearer ${accessToken}`,
"x-pd-project-id": "{project_id}",
"x-pd-environment": "production",
"x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
"x-pd-app-slug": "circleci",
},
},
},
)
const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)
const { tools } = await mcp.listTools()
// listTools() hands your model this tool's input schema, so it can
// fill the arguments itself:
const result = await mcp.callTool({
name: "circleci-trigger-pipeline",
arguments: {
projectSlug: "Project Slug",
definitionId: "Definition ID",
},
})SCHEMA
Inputs
Pipedream supplies the connected account. Your application provides the operation-specific values below. Dynamic inputs are resolved against that user's account.
| Property | Type | Description |
|---|---|---|
projectSlug Project Slug | string | Project slug in the form vcs-slug/org-name/repo-name (found in Project Settings) Required |
definitionId Definition ID | string | The unique ID for the pipeline definition. This can be found in the page Project Settings > Pipelines. Required |
configBranch Config Branch | string | The branch that should be used to fetch the config file. Note that branch and tag are mutually exclusive. To trigger a pipeline for a PR by number use pull//head for the PR ref or pull//merge for the merge ref (GitHub only) Optional |
configTag Config Tag | string | The tag that should be used to fetch the config file. The commit that this tag points to is used for the pipeline. Note that branch and tag are mutually exclusive. Optional |
checkoutBranch Checkout Branch | string | The branch that should be used to check out code on a checkout step. Note that branch and tag are mutually exclusive. To trigger a pipeline for a PR by number use pull//head for the PR ref or pull//merge for the merge ref (GitHub only) Optional |
checkoutTag Checkout Tag | string | The tag that should be used to check out code on a checkout step. The commit that this tag points to is used for the pipeline. Note that branch and tag are mutually exclusive. Optional |
parameters Parameters | object | An object containing pipeline parameters and their values. Pipeline parameters have the following size limits: 100 max entries, 128 maximum key length, 512 maximum value length. Optional |
REFERENCE
Tool details
Behavior hints are published with the component in the Pipedream registry and surface as MCP tool annotations, so an agent can reason about a tool before it calls it.
- Registry key
- circleci-trigger-pipeline
- Version
- 0.0.3
- App
- CircleCI
- Authentication
- API key
- Read-only
- No
- Destructive
- No
- Open world
- Yes
- Source
- View on GitHub ↗