Clarx

MCP Tools Reference

Inputs, outputs, and behavior of every tool exposed by the Clarx MCP server.

MCP Tools Reference

@clarxai/mcp exposes up to five tools. The first three always register; the AI tools register only when ANTHROPIC_API_KEY is set in the server environment.

ToolPurposeRequires
analyze_manifestScore a CLAUDE.md / AGENTS.md manifest
analyze_clarx_manifestValidate clarx-manifest.json against the engine schema
get_ci_workflowGenerate a GitHub Actions PR gate
suggest_manifest_fixAI-write one manifest sectionANTHROPIC_API_KEY
generate_manifest_draftAI-draft a full manifest from the READMEANTHROPIC_API_KEY

analyze_manifest

Scores manifest content with the same rules as the Clarx Cloud manifest studio — identical input produces identical scores.

Input

ParameterTypeNotes
contentstringFull markdown body. Pass this or file_path, not both
file_pathstringPreferred — the server reads the file locally instead of inlining it into agent context
include_outlinebooleanHeading outline with line numbers (default true)

Outputoverall_score (0–100), score_type: "manifest_quality_estimate", pillar_scores (Discoverability, Boundary clarity, Context efficiency, Operational guidance, Edit safety), findings (rule, severity, line, description, section_key), sections checklist, and the outline.


analyze_clarx_manifest

Validates a clarx-manifest.json machine manifest.

Inputcontent or file_path (one required, as above).

Output

{
  "valid": true,
  "errors": [],
  "keys_recognized": ["generated", "verificationCommands"],
  "suggestions": [
    "Consider adding \"highFanIn\": Files many modules import — agents edit these with extra care."
  ]
}

Unknown keys and malformed thresholds overrides are reported; malformed overrides are ignored by the engine and can never disable a rule.


get_ci_workflow

Generates the GitHub Actions workflow described in CI Integration.

Input

ParameterDefaultNotes
min_score80Fail the check below this overall score
min_pillar_scorenullOptional per-pillar floor
upload_sariffalseFindings as Code Scanning annotations
upload_artifacttrueMarkdown report artifact
ignore_patterns[]Globs to exclude
cli_versionlatest pinned@clarxai/cli version to pin

Output{ "filename": ".github/workflows/clarx.yml", "yaml": "…" }. The agent writes the file; commit it and set up branch protection.


suggest_manifest_fix

Writes one well-formed markdown section to close an analyze_manifest finding. Runs against your ANTHROPIC_API_KEY (bring-your-own-key; requests go directly from your machine to the Anthropic API).

Inputsection_key (e.g. build, testing, architecture — any section from the analyzer checklist), current_content or file_path, optional doc_path, repo_name, repo_description, repo_readme for grounding.

Output{ "section_markdown": "## Build\n…", "section_key": "build", "pillar": "O" }. The generated section satisfies the analyzer's validator rules (minimum words, required code blocks, required structure) so the finding actually closes.


generate_manifest_draft

First-draft manifest grounded in the repository README and description.

Inputfilename (CLAUDE.md | AGENTS.md | GEMINI.md), plus repo_readme (preferred) and/or repo_description, optional repo_name.

Output{ "filename": "AGENTS.md", "markdown": "…" }. Claims the model cannot ground in the provided context are marked as <!-- TODO: … --> comments — resolve them before committing.


Hosted tools (Clarx Cloud token)

Create an API token in your Clarx Cloud org settings and set it as CLARX_MCP_TOKEN in the server environment. Four additional tools register, all org-scoped and enforced server-side:

ToolPurpose
list_reposConnected repositories with latest AI-readiness scores
get_scanLatest scan summary, or full drill-down via scan_id
list_findingsFindings + recommended actions from the latest scan
get_remediation_promptThe structured fix prompt behind the dashboard's "Copy AI prompt"

list_repos

No input. Returns repo_id, full_name, latest_score, latest_scan_at, threshold per repository the token can access.

get_scan

Inputrepo_id or repo_full_name (both accepted everywhere below); optional scan_id for the full detail of one scan.

Output — latest scan summary (overall score, pillar scores, confidence) with score_type: "repo_ai_readiness".

list_findings

Input — repo reference, optional severity array and pillar filters, limit (default 50, max 200), compact (default true — id/rule/severity/title/path only, so results don't crowd out your agent's context).

Output — findings, top_affected_modules, recommended_actions (whose ids feed get_remediation_prompt), and review_status.

get_remediation_prompt

Input — repo reference; action_id from recommended_actions (defaults to the top action); format: "prompt" | "brief"; combine_all: true to merge every action into one prompt.

Output{ prompt, action, working_set_files }. The prompt is identical to what the dashboard generates for the same scan — hand it to your coding agent and it will scope the patch to the working set.