Semaphore CI MCP by usefulapi

v1.1.0
io.usefulapi/semaphore-ci Checked 7 hours ago Published 8 days ago

Read pipelines, job logs, agents and flaky tests; rebuild, stop or terminate runs in Semaphore CI.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

semaphore_get_pipeline Get a pipeline

Get one pipeline: its state, result, branch, blocks and jobs. Set detailed=true only when you need full block and job detail (costly). GET /pipelines/{pipeline_id}.

ParameterTypeDescription
pipeline_id *stringThe id (UUID or name) from another tool's output.
detailedbooleanInclude all blocks and jobs (default false).

semaphore_list_pipelines List pipelines

List pipelines for a project or a workflow, newest first, with filters by branch, creation and finish time. Give project_id or wf_id. GET /pipelines.

ParameterTypeDescription
branch_namestringBranch name filter.
created_afterintegerUnix timestamp in seconds.
created_beforeintegerUnix timestamp in seconds.
done_afterintegerUnix timestamp in seconds.
done_beforeintegerUnix timestamp in seconds.
next_page_urlstringnext_page_url from the previous response. Pass it alone to get the next page; the other filters are then ignored.
project_idstringProject id (required unless wf_id is given).
wf_idstringWorkflow id (required unless project_id is given).
yml_file_pathstringOnly pipelines from this YAML file.

semaphore_list_plumber_workflows List workflows

List workflows (runs started by a commit, branch or pull request) for a project. GET /plumber-workflows?project_id=.

ParameterTypeDescription
branch_namestringBranch name filter.
created_afterintegerUnix timestamp in seconds.
created_beforeintegerUnix timestamp in seconds.
next_page_urlstringnext_page_url from the previous response. Pass it alone to get the next page; the other filters are then ignored.
project_idstringProject id (required unless next_page_url is given).

semaphore_get_plumber_workflow Get a workflow

Get one workflow run by id: its commit, branch, trigger and pipeline list. GET /plumber-workflows/{workflow_id}.

ParameterTypeDescription
workflow_id *stringThe id (UUID or name) from another tool's output.

semaphore_list_promotions List promotions

List the promotions (manual or automatic deployment steps) of one pipeline. GET /promotions?pipeline_id=.

ParameterTypeDescription
pipeline_id *stringThe id (UUID or name) from another tool's output.

semaphore_get_job Get a job

Get one job: its name, state, result, machine type and timing. GET /jobs/{job_id}.

ParameterTypeDescription
job_id *stringThe id (UUID or name) from another tool's output.

semaphore_get_job_logs Get job logs

Get the log events of one job (command output, timestamps, exit codes). Use it to explain a failed job. GET /logs/{job_id}.

ParameterTypeDescription
job_id *stringThe id (UUID or name) from another tool's output.

semaphore_list_agents List agents

List running agents (cloud and self-hosted), optionally for one agent type. Use the cursor from the response for the next page. GET /agents.

ParameterTypeDescription
agent_typestringOnly agents of this agent type.
cursorstringCursor from the previous response.
page_sizeintegerAgents per page (default 200).

semaphore_get_agent Get an agent

Get one agent by name: its state, agent type, version and current job. GET /agents/{agent_name}.

ParameterTypeDescription
agent_name *stringAgent name (from semaphore_list_agents).

semaphore_list_self_hosted_agent_types List self-hosted agent types

List the self-hosted agent types of the organization and their settings. GET /self_hosted_agent_types.

semaphore_get_self_hosted_agent_type Get a self-hosted agent type

Get one self-hosted agent type and its settings. GET /self_hosted_agent_types/{agent_type_name}.

ParameterTypeDescription
agent_type_name *stringAgent type name, e.g. s1-aws-small.

semaphore_list_members List organization members

List organization members: users by default, or service accounts or groups with member_type. Paginated. GET /members.

ParameterTypeDescription
member_typestringSubject type (default: human users).
page_nointegerPage number, starting at 0.
page_sizeintegerItems per page.

semaphore_list_project_members List project members

List the members and their project roles for one project. GET /projects/{project_id}/members.

ParameterTypeDescription
project_id *stringThe id (UUID or name) from another tool's output.
page_nointegerPage number, starting at 0.
page_sizeintegerItems per page.

semaphore_list_roles List roles

List the organization and project roles and the permissions each role grants. GET /roles.

semaphore_get_role Get a role

Get one role and its permissions. GET /roles/{role_id}.

ParameterTypeDescription
role_id *stringThe id (UUID or name) from another tool's output.

semaphore_list_permissions List permissions

List the permissions available at organization or project scope. GET /permissions?scope=.

ParameterTypeDescription
scopestringScope (default org).

semaphore_list_groups List groups

List the groups of the organization and their members. Paginated. GET /groups.

ParameterTypeDescription
page_nointegerPage number, starting at 0.
page_sizeintegerItems per page.

semaphore_list_service_accounts List service accounts

List the service accounts of the organization (names and state, never tokens). GET /service_accounts.

ParameterTypeDescription
page_sizeintegerAccounts per page (default 100).
page_tokenstringnext_page_token from the previous response.

semaphore_list_deployment_targets List deployment targets

List the deployment targets of one project (for example production or staging). GET /deployment_targets?project_id=.

ParameterTypeDescription
project_id *stringThe id (UUID or name) from another tool's output.

semaphore_get_deployment_target Get a deployment target

Get one deployment target: its rules, active state and environment variable names. GET /deployment_targets/{target_id}.

ParameterTypeDescription
target_id *stringThe id (UUID or name) from another tool's output.

semaphore_get_deployment_target_history Get deployment history

Get the deployment history of one target: who deployed what, from which git reference and when. Use the cursor fields to page. GET /deployment_targets/{target_id}/history.

ParameterTypeDescription
target_id *stringThe id (UUID or name) from another tool's output.
cursor_typestringWhere to start: FIRST, AFTER or BEFORE.
cursor_valuestringUnix microsecond timestamp for AFTER or BEFORE.
git_ref_labelstringFilter by git reference label, e.g. a branch name.
git_ref_typestringFilter by git reference type.
triggered_bystringFilter by the user who triggered the deployment.

semaphore_get_pre_flight_checks Get pre-flight checks

Get the pre-flight checks (setup commands run before each job) of a project, or of the organization when project_id is omitted. GET /pre_flight_checks.

ParameterTypeDescription
project_idstringProject id (omit for the organization setting).

semaphore_list_artifacts List artifacts

List the artifact files and folders under a project, workflow or job scope. Lists only; it returns no download link. GET /artifacts.

ParameterTypeDescription
scope *stringArtifact scope.
scope_id *stringThe id (UUID or name) from another tool's output.
pathstringFolder inside the scope (default: root).

semaphore_list_flaky_tests List flaky tests

List the flaky tests of a project: tests whose pass rate is below a threshold on a branch. GET /projects/{project_id}/test_results/flaky_tests.

ParameterTypeDescription
project_id *stringThe id (UUID or name) from another tool's output.
branchstringBranch name filter.
labelstringComma-separated labels; tests must carry all of them.
pass_ratestringThreshold with operator, e.g. >=80 or <=50 (percent).

semaphore_get_flaky_test Get a flaky test

Get one flaky test record: its pass rate and history. GET /projects/{project_id}/test_results/flaky_tests/{id}.

ParameterTypeDescription
flaky_test_id *stringFlaky test record id (from semaphore_list_flaky_tests).
project_id *stringThe id (UUID or name) from another tool's output.

semaphore_get_performance_insights Get pipeline performance

Get the run time of one pipeline file over time (per day or per range). GET /projects/{project_id}/insights/performance.

ParameterTypeDescription
pipeline_file *stringPipeline YAML path in the repository, e.g. .semaphore/semaphore.yml.
project_id *stringThe id (UUID or name) from another tool's output.
aggregatestringAggregation window (default daily).
branchstringBranch name filter.
fromstringDate, YYYY-MM-DD.
tostringDate, YYYY-MM-DD.

semaphore_get_reliability_insights Get pipeline reliability

Get the pass rate of one pipeline file over time. Stopped pipelines are excluded. GET /projects/{project_id}/insights/reliability.

ParameterTypeDescription
pipeline_file *stringPipeline YAML path in the repository, e.g. .semaphore/semaphore.yml.
project_id *stringThe id (UUID or name) from another tool's output.
aggregatestringAggregation window (default daily).
branchstringBranch name filter.
fromstringDate, YYYY-MM-DD.
tostringDate, YYYY-MM-DD.

semaphore_get_frequency_insights Get pipeline frequency

Get how often one pipeline file ran over time. GET /projects/{project_id}/insights/frequency.

ParameterTypeDescription
pipeline_file *stringPipeline YAML path in the repository, e.g. .semaphore/semaphore.yml.
project_id *stringThe id (UUID or name) from another tool's output.
aggregatestringAggregation window (default daily).
branchstringBranch name filter.
fromstringDate, YYYY-MM-DD.
tostringDate, YYYY-MM-DD.

semaphore_partial_rebuild_pipeline Rebuild failed pipeline jobs

Start a partial rebuild of a pipeline: only failed and blocked parts run again. It uses machine time. Reuse the same request_token to retry safely. POST /pipelines/{pipeline_id}/partial_rebuild.

ParameterTypeDescription
pipeline_id *stringThe id (UUID or name) from another tool's output.
request_token *stringIdempotency token, typically a UUID. Reuse it when retrying the same request.

semaphore_stop_job Stop a job

Stop one running job. The job ends with a stopped result and cannot resume. POST /jobs/{job_id}/stop.

ParameterTypeDescription
job_id *stringThe id (UUID or name) from another tool's output.

semaphore_terminate_workflow Terminate a workflow

Terminate one workflow run: all its pipelines stop. It cannot resume. POST /plumber-workflows/{workflow_id}/terminate.

ParameterTypeDescription
workflow_id *stringThe id (UUID or name) from another tool's output.