blacksmith

v0.1.1
io.github.grahamnotgrant/blacksmith Checked 2 days ago Published 10 months ago

MCP server for Blacksmith CI - query runs, analyze test failures, detect flaky tests.

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

list_orgs

List all Blacksmith organizations accessible to your account. Use this first to see available orgs.

get_org_status

Get the status of the current organization (personal org, onboarding, runner region).

list_runs

List workflow runs with filtering. Filter by status (success/failure/cancelled/skipped/in_progress), branch, workflow name, actor, or PR number. Example: list_runs(status="failure") to find failed runs.

ParameterTypeDescription
actorstringFilter by actor (GitHub username who triggered the run)
branchstringFilter by branch name
end_datestringEnd date (YYYY-MM-DD)
limitnumberMaximum number of runs to return
pr_numbernumberFilter by pull request number
start_datestringStart date (YYYY-MM-DD)
statusstringFilter by run status: success, failure, cancelled, skipped, or in_progress
workflow_namestringFilter by workflow name

get_run

Get details of a specific workflow run by ID. Includes list of jobs.

ParameterTypeDescription
run_id *stringGitHub Actions workflow run ID

list_jobs

List all jobs for a specific workflow run. Use this to get job IDs for get_job, get_job_logs, and get_job_tests.

ParameterTypeDescription
run_id *stringGitHub Actions workflow run ID

get_job

Get details of a specific job including steps, runner info, and timing.

ParameterTypeDescription
job_id *stringGitHub Actions job ID
run_id *stringGitHub Actions workflow run ID

get_job_logs

Get the logs for a specific job. Returns raw log output.

ParameterTypeDescription
job_id *stringGitHub Actions job ID
limitnumberMaximum number of log lines (default: 1000)
vm_idstringVM ID for the job (optional)

get_job_tests

Get test results for a job. Optionally filter by status (pass/fail/skip).

ParameterTypeDescription
job_id *stringGitHub Actions job ID
run_id *stringGitHub Actions workflow run ID
include_testsbooleanInclude individual test details (default: false, returns summary only)
limitnumberMaximum number of tests to return when include_tests is true (default: 50)
statusstringFilter by test status

get_failed_tests

Get failed tests for a job with full error details. Use error_lines param to control stack trace length. Returns all failures by default (no limit).

ParameterTypeDescription
job_id *stringGitHub Actions job ID
run_id *stringGitHub Actions workflow run ID
error_linesnumberNumber of error lines to include per test (default: 5, max: 50)
limitnumberMaximum number of failed tests to return (default: all)
suitestringFilter by test suite name (e.g., "FeatureFlags Middleware")

get_failures_by_pattern

Group failed tests by error pattern (e.g., "is not a function", "Cannot read properties"). Shows count, affected suites/files, and sample error for each pattern. Best for quickly identifying root causes.

ParameterTypeDescription
job_id *stringGitHub Actions job ID
run_id *stringGitHub Actions workflow run ID
top_nnumberNumber of top error patterns to return (default: 10)

compare_test_runs

Compare test failures between two runs to identify regressions. Shows new failures, fixed tests, and persistent failures. If base_run_id not provided, compares against most recent prior run.

ParameterTypeDescription
job_name *stringJob name to compare (e.g., "Test (Blacksmith/Self-Hosted)")
run_id *stringCurrent GitHub Actions workflow run ID
base_run_idstringBase run ID to compare against. If not provided, compares against most recent prior run.

get_flaky_tests

Detect flaky tests by analyzing pass/fail patterns across recent runs. Returns tests that fail intermittently (e.g., "failed 3 of 10 runs"). Killer feature for CI stability.

ParameterTypeDescription
job_name *stringJob name to analyze (e.g., "Test (Blacksmith/Self-Hosted)")
daysnumberNumber of days to analyze (default: 7)
min_runsnumberMinimum number of runs a test must appear in to be considered (default: 3)
thresholdnumberFlakiness threshold 0-1, e.g., 0.2 means test failed 20%+ of runs (default: 0.1)

get_slow_tests

Find tests exceeding a duration threshold. Shows slowest tests, their percentage of total test time, and average duration stats.

ParameterTypeDescription
job_id *stringGitHub Actions job ID
run_id *stringGitHub Actions workflow run ID
limitnumberMaximum number of slow tests to return (default: 20)
threshold_msnumberDuration threshold in milliseconds (default: 5000ms = 5s)

get_test_history

Get the failure history for a specific test across recent runs. Shows when it passed/failed, on which branches, and error messages for failures.

ParameterTypeDescription
job_name *stringJob name to search in (e.g., "Test (Blacksmith/Self-Hosted)")
test_name *stringName of the test to look up
limitnumberNumber of historical results to return (default: 10)
suitestringTest suite name (helps disambiguate if multiple tests have same name)

get_current_usage

Get current core usage snapshot (active cores vs max cores).

get_invoice_amount

Get the current billing period invoice amount.

get_usage_summary

Get usage summary showing billable minutes vs free tier allowance. Shows remaining free minutes and overage.

get_cache_stats

Get Blacksmith cache statistics: total size, hit rate, entries by repository. Shows how effectively caching is being used.

ParameterTypeDescription
include_historybooleanInclude historical cache data (default: false)

get_cache_entries

Get detailed cache entries for a repository. Shows cache keys, sizes, scopes (branches), and last hit times. Useful for debugging cache issues.

ParameterTypeDescription
repository *stringRepository name - try short name first (e.g., "votion"), or full name (e.g., "Votion-Platform/votion") if needed
limitnumberMaximum number of entries to return (default: 20)

search_logs

Search logs across all jobs. Filter by query (e.g., "error", "timeout"), log level (INFO/WARN/ERROR/DEBUG), and time range. Great for finding issues across runs.

ParameterTypeDescription
hoursnumberNumber of hours to search back (default: 1, max: 24)
levelstringFilter by log level
limitnumberMaximum number of logs to return (default: 100)
querystringSearch query (e.g., "error", "timeout", "failed"). Leave empty to get all logs.