Skip to navigation

CircleCI

Connect your AI agents to CircleCI.
Ready to connect

Connects with credentials the end user enters, such as an API key, so you don’t need to register an OAuth app.

Authentication: Personal API token. See Magic Link for the runtime auth flow.

Sample use cases

  • Rerun the failed workflow on main for the api project and report which jobs failed.
  • List the flaky tests on the web-app project and how often each one failed.
  • Add an environment variable to the web-app project and trigger a new pipeline.

Available Tools

approve_workflow_job

Approve an on-hold approval job so the workflow continues.

cancel_job

Cancel a running job by UUID. Use list_workflow_jobs to find the job id; rerun with rerun_workflow.

cancel_workflow

Cancel a running workflow and its jobs. Rerun it with rerun_workflow. Use list_pipeline_workflows to find IDs.

continue_pipeline

Continue a dynamic-config pipeline from its setup workflow with generated config.

create_checkout_key

Create an SSH checkout key for a project (a deploy key, or a user key on GitHub OAuth orgs).

create_context

Create a context in an organization. Returns its id; add variables with set_context_env_var.

create_context_restriction

Restrict a context to a project (get_project for its UUID), a group (list_groups) or an expression.

create_group

Create a group in an organization. Use list_collaborations for org_id.

create_organization

Create a CircleCI organization. vcs_type ‘circleci’ makes a standalone org; ‘github’ or ‘bitbucket’ connects an existing VCS org you can access.

create_pipeline_definition

Create a pipeline definition on a GitHub App or standalone project: where config is read from and which repo is checked out.

create_project

Create a project in a GitHub App or standalone (circleci) organization.

create_project_env_var

Create a project environment variable, or overwrite one with the same name.

create_schedule

Create a scheduled pipeline that runs on a UTC timetable.

create_trigger

Add a trigger to a pipeline definition: GitHub events, a custom webhook, or a cron schedule.

create_url_orb_allow_entry

Add a URL prefix to an organization’s URL orb allow-list so config can import orbs from it.

create_usage_export

Start an export of an organization’s credit and compute usage for up to 31 days.

create_webhook

Create an outbound webhook that posts workflow-completed and/or job-completed events for a project to a URL.

delete_checkout_key

Delete a project’s checkout key; builds that clone with it will fail. Use list_checkout_keys to find fingerprints.

delete_context

Delete a context and all its variables. Jobs that use it will fail. Use list_contexts to find IDs.

delete_context_env_var

Remove a variable from a context. Use list_context_env_vars to find names.

delete_context_restriction

Remove a restriction from a context. Use list_context_restrictions to find restriction IDs.

delete_group

Delete a group from an organization. Use list_groups to find group IDs.

delete_org_oidc_claims

Reset an organization’s custom OIDC claims (audience, ttl) to CircleCI’s defaults.

delete_organization

Permanently delete a CircleCI organization and all of its projects, contexts and settings.

delete_pipeline_definition

Delete a pipeline definition and its triggers. Use list_pipeline_definitions to find it.

delete_project

Permanently delete a project with its settings, env vars and history.

delete_project_env_var

Delete a project environment variable. Jobs that read it will no longer see it. Use list_project_env_vars to find names.

delete_project_oidc_claims

Remove a project’s custom OIDC claims so the org-level values apply again.

delete_schedule

Delete a scheduled pipeline; it stops firing. Use list_schedules to find schedule IDs.

delete_trigger

Delete a trigger from a pipeline definition. Use list_triggers to find trigger IDs.

delete_url_orb_allow_entry

Remove an entry from an organization’s URL orb allow-list. Use list_url_orb_allow_list to find entry IDs.

delete_webhook

Delete an outbound webhook; CircleCI stops posting to its URL. Use list_webhooks to find IDs.

get_checkout_key

Get one checkout key by fingerprint. Use list_checkout_keys to find fingerprints.

get_component

Get a deploy component by UUID. Use list_components to find component IDs.

get_context

Get a context by UUID. Use list_contexts to find context IDs.

get_current_user

Get the CircleCI user the API token belongs to: id, login and name.

get_environment

Get a deploy environment by UUID. Use list_environments to find environment IDs.

get_group

Get a group in an organization by UUID. Use list_groups to find group IDs.

get_job

Get a job by UUID: status, number and its project, pipeline and workflow IDs.

get_job_details

Get a job’s details by project slug and job number: status, duration, executor, parallel runs, messages and web URL.

get_job_timeseries

Get per-job run and duration metrics for a workflow bucketed hourly or daily over a date range.

get_org_insights

Get an organization’s Insights summary across projects: runs, success rate, duration and credits, with trends.

get_org_oidc_claims

Get an organization’s custom OIDC token claims (audience, ttl). Use list_collaborations for org_id.

get_organization

Get a CircleCI organization by slug (‘gh/acme’) or UUID. Use list_collaborations to find orgs.

get_pipeline

Get a pipeline by UUID: state, trigger, branch and commit. Use list_project_pipelines to find IDs.

get_pipeline_by_number

Get a pipeline by its project-scoped number, the one shown in the CircleCI UI (e.g. 8200).

get_pipeline_config

Get a pipeline’s config: the source config.yml and the compiled config.

get_pipeline_definition

Get a pipeline definition by UUID. Use list_pipeline_definitions to find it.

get_pipeline_values

Get the pipeline.* values CircleCI resolved for a pipeline (git branch, revision, trigger source).

get_project

Get a project by slug (‘gh/acme/api’): its UUID, org and repository. The UUID is the project_id other tools take.

get_project_env_var

Get one project environment variable by name, value masked. Use list_project_env_vars to find names.

get_project_insights

Get a project’s Insights summary: runs, success rate, duration and credits per workflow and branch, with trends, for a time window.

get_project_oidc_claims

Get a project’s custom OIDC claims, which override the org’s.

get_project_settings

Get a project’s advanced settings (auto-cancel, fork PR builds, PR-only builds, OSS, SSH reruns). Needs project admin.

get_schedule

Get a scheduled pipeline by UUID. Use list_schedules to find schedule IDs.

get_trigger

Get a trigger by UUID. Use list_triggers to find trigger IDs.

get_usage_export

Get a usage export’s state and, once ‘completed’, its CSV download URLs. Start one with create_usage_export.

get_user

Get a CircleCI user by UUID, e.g. the started_by of a workflow. Use get_current_user for yourself.

get_webhook

Get an outbound webhook by UUID. Use list_webhooks to find webhook IDs.

get_workflow

Get a workflow by UUID: name, status, pipeline and timing. Use list_pipeline_workflows to find IDs.

get_workflow_insights

Get one workflow’s metrics and trends (runs, success rate, mttr, p95 duration, credits) for a branch or all branches.

get_workflow_test_metrics

Get test metrics for a workflow: most-failed and slowest tests and per-run test counts.

list_checkout_keys

List the SSH checkout keys CircleCI uses to clone a project’s repository, with fingerprints.

list_collaborations

List the organizations the token’s user belongs to, with each org’s id and slug.

list_component_versions

List a component’s deployed versions with which one is live per environment.

list_components

List an organization’s deploy components (deployable services), optionally for one project.

list_context_env_vars

List the variable names in a context. Values are never returned. Use list_contexts to find IDs.

list_context_restrictions

List the restrictions that limit which projects, groups or pipelines may use a context.

list_contexts

List an organization’s contexts (shared env var sets). Give owner_slug or owner_id from list_collaborations.

list_environments

List an organization’s deploy environments (e.g. staging, production). Use list_collaborations for org_id.

list_flaky_tests

List a project’s flaky tests (tests that both passed and failed on the same commit), with how often they flaked.

list_groups

List the groups in an organization (used for context restrictions and approvals). Use list_collaborations for org_id.

list_insights_branches

List the branches that have Insights data for a project, optionally for one workflow.

list_job_artifacts

List the artifacts a job stored (path and download URL). Use list_workflow_jobs to find job_number.

list_job_tests

List a job’s test results (name, class, result, failure message, run time) from store_test_results.

list_my_pipelines

List the pipelines you triggered in one project, newest first. For everyone’s use list_project_pipelines.

list_pipeline_definitions

List a project’s pipeline definitions (config and checkout source).

list_pipeline_workflows

List a pipeline’s workflows with their status (success, failed, running, on_hold).

list_pipelines

List recent pipelines in an organization, newest first, across the most recently built projects you follow (CircleCI caps it at 250).

list_project_env_vars

List a project’s environment variables. Values come back masked (last 4 characters only).

list_project_pipelines

List a project’s pipelines, newest first, optionally for one branch.

list_schedules

List a project’s scheduled pipelines with their timetables. GitHub App projects use list_triggers instead.

list_triggers

List the triggers on a pipeline definition (repo events, webhooks, cron schedules). Use list_pipeline_definitions first.

list_url_orb_allow_list

List an organization’s URL orb allow-list: the URL prefixes config may import orbs from.

list_webhooks

List a project’s outbound webhooks, optionally only enabled or disabled ones. Use get_project for project_id.

list_workflow_job_metrics

List summary metrics per job in one workflow (runs, success rate, durations, credits), optionally for one job.

list_workflow_jobs

List a workflow’s jobs with status, job_number and id.

list_workflow_metrics

List summary metrics per workflow in a project (runs, success rate, mttr, durations, credits) for a branch or all branches over a time window.

list_workflow_runs

List recent runs of one workflow with status, duration and credits, filtered by branch and date range.

rerun_workflow

Rerun a workflow from the start, from its failed jobs (from_failed=true), or for chosen job IDs.

rollback_project

Roll a component in an environment back to an earlier version.

run_pipeline

Trigger a new pipeline on a project, for a branch or tag, with optional parameters.

set_context_env_var

Add a variable to a context, or overwrite one with the same name. Use list_contexts to find context IDs.

update_org_oidc_claims

Set an organization’s custom OIDC audience and/or token ttl.

update_pipeline_definition

Change a pipeline definition’s name, description, config file path or checkout source.

update_project_oidc_claims

Set a project’s custom OIDC audience and/or ttl, overriding the org’s.

update_project_settings

Change a project’s advanced settings. Only the fields you set are sent; the rest keep their value.

update_schedule

Change a scheduled pipeline’s name, description, timetable, actor or parameters.

update_trigger

Change a trigger’s event filter, refs, cron schedule, parameters, or enable/disable it.

update_webhook

Change a webhook’s name, URL, events, secret, TLS check, or enable/disable it.