Skip to main content

Prompt management

The prompt tools are the code-first prompt workflow with local file discovery replaced by inline content: prompt bodies travel as arguments, and the returned key → {promptId, versionId} mapping plus content hashes is the lockfile replacement — persist it client-side. moda prompts init, status, and --watch are local-file workflows and stay CLI-only. The prompt tools accept tenant_id where noted, with the same semantics as the fix tools.

prompts_sync

Pushes prompt definitions (content inline) to the Moda prompt registry, minting new versions for changed content, and returns the server’s synced list plus each prompt’s content hash computed with the CLI’s exact canonicalization. The sync is a full push with no explicit delete list: keys absent from prompts are conveyed as implicitly removed, so send the complete set every time.
Arguments
CLI: moda prompts sync

prompts_diff

Previews what a sync would change by running the same POST /prompts/sync with dryRun forced to true — the server-computed replacement for moda prompts status/diff, which compare local file hashes against a local lockfile. Never writes registry versions.
Arguments
CLI: moda prompts status / diff

prompts_promote

Points a registry label (dev, staging, or prod) at a specific prompt version — the final step after prompts_sync, prompts_ab, or prompts_propose hands you a winning versionId. Promoting overwrites the label’s current assignment, and a prod promotion redirects live traffic immediately, so confirm the version first.
Arguments
CLI: moda prompts promote

prompts_ab

Runs a baseline-vs-candidate prompt comparison over a replay set: both arms travel inline as content strings. The replay set comes from at most one of set_id (reuse), conversation_ids (one case per trace), or auto_generate — the default when all three are omitted. MCP-shaped async: wait defaults to false, returning {replaySetId, runId} to poll with replay_run_status. Deliberate deviation from the CLI: promote_primary defaults to false here (the CLI defaults it to true), so a comparison never promotes the winning arm unless explicitly requested.
Arguments
CLI: moda prompts ab

prompts_propose

Turns a completed A/B run’s failures into a server-generated revised candidate, registered as a new unlabeled prompt version — the CLI’s --out file write becomes the returned content (plus versionId, contentHash, changelog, risks, and repair/holdout case ids). gate: true chains an automatic candidate-vs-baseline replay on the same set: baseline_content is then required inline, and promote_on_win promotes to prod only on a strict candidate win of a completed run. If the gate exceeds max_wait_seconds you get the in-flight status with a warning: finish with replay_run_status, then promote manually with prompts_promote.
Arguments
CLI: moda prompts propose

replay_run_status

Fetches the latest state of a replay-set comparison run — status, per-arm pass counts and rates, per-case results — plus a formatted verdict (strict pass-count delta, same wording as moda prompts ab). Poll it after prompts_ab or prompts_propose returned a queued runId until run.status is completed, skipped, or error.
Arguments
CLI: moda prompts ab (the poll step of --wait)

Skills

Moda distills recurring agent behavior into skill files. The MCP skill tools exchange content inline: they return SKILL.md text and accept it as arguments — installing files (.claude/skills/<id>/SKILL.md, .cursor/rules/<id>.mdc) and pruning via .moda/skills.yml is the client’s job.

skills_gen

Kicks off a tenant-wide skill generation run: it clusters recent SDK sessions, distills candidate skills, and optionally replays and improves them. Every option you omit is left to the backend default (the CLI materializes its own defaults client-side; this tool does not). Generation takes minutes — poll skills_status with the returned run id rather than passing wait_for_completion.
Arguments
CLI: moda skills gen

skills_status

Reports the status, counters, and outcome of a skill generation run: pass run_id for that run’s detail (including event breadcrumbs), or omit it to read the tenant’s latest run. An unknown run_id returns found: false with a warning rather than an error.
Arguments
CLI: moda skills status

skills_list

Fetches the tenant’s generated skills with their full SKILL.md content. This is the server half of moda skills pull: it returns content only — writing files is the client’s job.
Arguments
CLI: moda skills pull

skills_push

Pushes user-authored skills (SKILL.md content inline) to the Moda skill registry, minting new versions for changed content. This is moda skills sync with local .claude/skills/**/SKILL.md discovery replaced by arguments; the CLI’s managed AGENTS.md upsert is a local file write and stays CLI-only. Unchanged content is a server-side no-op.
Arguments
CLI: moda skills sync

skills_proposals

Lists skill proposals — PR-ready skill candidates produced by generation runs — with their status and metadata. status defaults to ready_for_pr on the wire exactly like the CLI, and status: "all" drops the filter entirely.
Arguments
CLI: moda skills proposals

skills_proposal

Fetches a single skill proposal including its full SKILL.md content. This is the fetch half of moda skills proposal apply: the client applies the content itself (write the file, or adapt it for another agent), then acknowledges with skills_proposal_mark_applied.
Arguments
CLI: moda skills proposal apply (fetch step)

skills_proposal_mark_applied

Acknowledges that a skill proposal’s content has been applied client-side, moving it out of the ready queue (the request records appliedBy: "moda-mcp"; the CLI sends moda-cli). Call it only after the client actually wrote the SKILL.md fetched with skills_proposal — marking without applying loses the reminder that the proposal is pending.
Arguments
CLI: moda skills proposal apply (mark-applied step)

Harness

The harness tools cover the server-side halves of the harness workflow: uploading, deleting, and reading hosted analysis runs. Producing the graph and report requires the local repo, so moda harness scan/analyze/approve/validate-report stay CLI-side.

harness_sync

Uploads a harness graph — and optionally an approved analysis report (the CLI’s --from-report form) — to the tenant’s harness registry. The backend’s 2,000,000-byte graph limit is enforced client-side before the POST, and dry_run previews without writing.
Arguments
CLI: moda harness sync

harness_delete

Permanently deletes a harness from the tenant — including every synced version, agent, artifact, and relationship under it — and returns the server’s deleted counts. There is no undo, which is why the CLI demands --yes and this tool demands confirm: true.
Arguments
CLI: moda harness delete

harness_analyze_status

Reads the status, progress, and (when completed) results of a hosted harness analysis run. Starting a remote analysis requires a source snapshot built from the local repo, so kicking one off is CLI-only (moda harness analyze --remote prints the run id this tool takes); this is the read half that moda harness pull uses. Server-controlled progress strings are sanitized of ANSI/control characters before being returned.
Arguments
CLI: moda harness pull

Additional CLI parity entries

CLI-only commands

Deliberate deviations

Fixes

A Fix pairs a candidate change with a replay-gate verdict on held-out production evidence — see Fixes in the dashboard for concepts. The pipeline is advance-on-poll: nothing progresses server-side between requests, so wait: true and fixes_drive drive the pipeline rather than merely watch it. All fix tools accept tenant_id (string, optional): the tenant to operate on, defaulting to the tenant embedded in the signed API key — required only for legacy unsigned keys. Fix mutations are sent exactly once, never retried.

fixes

Lists the tenant’s ranked queue of Fixes (id, MODA-FIX short ref, status, fix type, status reason) with cursor pagination, optionally filtered by status. An empty queue means nothing is drafted yet — create fixes with fix_start or fixes_draft_batch.
Arguments

fixes_draft_batch

Batch-drafts Fixes for the tenant’s top-ranked fixable problems in one server-side call (the backend scans up to 100 ranked problems) and returns the drafted fixes plus per-problem skip reasons. Creation only — drive the drafted fixes with fixes_drive afterwards.
Arguments

fixes_drive

Snapshots the fix queue and round-robins one advance step per active fix per pass — fair progress, so a slow gate never starves the others. Bounded: it runs at most max_passes passes per call and reports stragglers — call it again to continue. coverage_truncated plus warnings report when the snapshot could not be proven complete, with the exact remedy for each case.
Arguments

fix

Reads one Fix — status, gate result, candidate ref, PR info — and, with wait: true, drives the advance-on-poll pipeline (each poll POSTs one advance step, so wait turns the read into a write). Waiting stops at a resting status or at max_wait_seconds, returning the current state with a timed-out warning — call again to continue. data.next_steps points at the status-appropriate follow-up tool.
Arguments

fix_start

Drafts a Fix for one problem and, with wait: true, drives scope → propose → gate to a resting status, attaching the fix packet fail-soft. Without wait it returns the drafted fix immediately — advance it later with fix (wait: true) or fixes_drive.
Arguments

fix_packet

Fetches the moda.fix_packet.v1 document for a fix verbatim — diagnosis, evidence, and any candidate blocks (tool-description rewrite, drafted SKILL.md, or a minimal skill edit), also surfaced as findings. This server writes no files: write the candidate text from the packet payload yourself if you want a diffable copy, then confirm with fix_mark_applied.
Arguments

fix_verify

Enqueues a gate + control run for a fix’s candidate — the stored one, or an inline replacement via candidate_content — then by default drives advance-on-poll until the gate verdict lands. VERIFIED with a pass verdict succeeds; GATE_FAILED returns an error with best-effort per-case findings for the fail-to-pass loop; anything else (inconclusive, blocked, a lapsed wait) is degraded, never a pass. A concurrent verify can supersede this run — a warning flags when the reported verdict belongs to a different gate run.
Arguments

fix_checkout

Resolves a prompt fix’s candidate content and returns everything a local checkout needs: the target path, the full candidate text, the branch convention (moda/fix/<shortref-lowercase>), the PR magic word (Fixes MODA-FIX-<SHORTREF>), and the candidate version id. This server writes nothing — you write content to path and run git yourself. It refuses artifact fixes (TOOL_SCHEMA/SKILL — use fix_packet + fix_mark_applied) and fixes without a proposed candidate, with the recovery path in each error.
Arguments

fix_submit

Hands a fix back for delivery: channel pr has the backend open the draft PR (the response carries prUrl/prBranch — no local git anywhere), while channel local_ref records your own branch name server-side so landing it with the magic word in the PR body confirms the fix via the merge webhook.
Arguments

fix_mark_applied

Confirms you applied a fix’s candidate in your own infrastructure — the no-GitHub delivery path: the fix flips straight to SHIPPED, mark_fixed feedback is posted, and the problem enters fixed-monitoring (HELD after 14 clean days, REGRESSED on reopen). Idempotent server-side: repeating it on a confirmed fix is a duplicate no-op flagged as a warning.
Arguments

fix_dismiss

Dismisses a fix with a required reason, recorded as problem feedback that steers future drafting and ranking. Destructive — dismissal removes it from the active queue; prefer fix_mark_applied when you actually shipped the change.
Arguments

Fix tools

fix is a pure read by default; wait: true turns each poll into an advance POST — the only thing that moves a fix through the pipeline — which is why it is not annotated read-only. fix_checkout performs no server-side write itself, but it is deliberately not annotated read-only so clients gate the checkout-and-deliver flow behind approval.

Fix timeout budgets