Circom — 123 Operations for AI Agents

Circom circuits are where zero-knowledge proofs get real: signals, constraints, templates. act101 maps circuit structure directly, so agents audit constraint logic without manually tracing template instantiations.

This page is the canonical reference an AI coding agent uses to refactor, query, and analyze Circom code through the act MCP server. 123 operations available: 49 refactor, 18 query, 42 analysis, 14 verification. Each operation is callable from Claude Code, Cursor, Codex, OpenCode, or any MCP-compatible agent host. Click any operation for a stable anchor link suitable for citation.

Premium language. Operations on Circom require an Elite license or above. See pricing.

18Query
49Refactor
42Analysis
14Verify

Query

18 query tools, the same on every supported language. Descriptions live in the shared reference: /docs/query-tools.

callers control_flow data_flow definition diagnostics effect_closure effect_summary fix_auto get_type graph import_organize interface mutations references repo_outline skeleton symbols symbols_batch

Refactor

Operation Description
add-parameter Add a parameter to a Circom template and update call sites
add-public-input Add a Circom input signal to the main component public list
add-public-output Add a Circom signal to the main component public list
add-range-check Add a Num2Bits range check for a Circom signal
add-signal Add a signal declaration to a Circom template
change-parameter Rename a Circom template parameter and optionally update call arguments
convert-assignment-to-constraint Convert a Circom assignment operator to a constraint operator
convert-constraint-to-assignment Convert a Circom constraint operator to a constrained assignment operator
convert-to-custom-gate Extract a Circom assignment into a custom-gate template
convert-to-input Convert a Circom signal declaration to input visibility
convert-to-intermediate Convert a Circom input or output signal declaration to intermediate visibility
convert-to-output Convert a Circom signal declaration to output visibility
convert-to-parallel-loop Add the Circom parallel qualifier to selected calls
convert-to-sequential-loop Remove the Circom parallel qualifier from selected calls
extract-common-subexpression Extract repeated Circom expression nodes into an intermediate signal
extract-constraint Extract a Circom constraint RHS into an intermediate signal
extract-template Extract selected Circom template statements into a new template
extract_function Extract a code selection into a new function — automatically infers parameters, return types, and inserts the call site. Use instead of manually cutting/pasting code. Works without LSP; LSP improves type inference. Params: file (string), new_name (string), start_line (u32), start_column (u32), end_line (u32), end_column (u32) [, preview (bool), receipt (bool)]
extract_variable Extract an expression into a named variable — inserts the declaration and replaces the expression with the variable name. Works without LSP. Params: file (string), new_name (string), start_line (u32), start_column (u32), end_line (u32), end_column (u32) [, preview (bool)]
fix-circular-dependency Break a direct Circom component instantiation cycle
fix-non-quadratic-constraint Introduce intermediate signals for a non-quadratic Circom constraint
fix-signal-type-mismatch Correct a Circom signal declaration to the expected visibility
fix-template-parameter-mismatch Fix a Circom component call whose argument count does not match its template
fix-undefined-signal Declare a Circom signal that is already referenced but missing
gen-boolean-circuit Generate a reusable boolean gate template
gen-comparator-circuit Generate a reusable comparator template
gen-hash-circuit Generate a Poseidon or MiMC hash wrapper template
gen-membership-circuit Generate a reusable set-membership proof template
gen-merkle-tree-circuit Generate a Merkle inclusion proof template
gen-range-check-circuit Generate a standalone Num2Bits range-check template
gen-selective-swap Generate a reusable selective-swap template
gen-signature-verification-circuit Generate a reusable EdDSA signature-verification wrapper
gen-test-scaffold Generate a companion test scaffold comment for a template
gen-verifier-template Generate a verifier-result composition template
inline Inline a variable, function, or method — replace every usage with its definition body, then remove the original. The inverse of extract. Works without LSP (single-file); LSP enables cross-file inlining. Params: file (string), symbol (string) [, line (u32), preview (bool), receipt (bool)]
inline-template Inline a single-use Circom component template at its call site
insert_body Replace a function's implementation body with new code. AST-validated — rejects if the result has parse errors, so you can't accidentally break syntax. Use instead of manual text editing for function rewrites. Params: file (string), symbol (string), code (string) [, commit (bool)]
linearize-expression Break a non-quadratic multiplication constraint into quadratic Circom constraints
merge-templates Merge a single-use Circom helper template into a target template
move_symbol Move a function, class, or type to a different file and automatically update all imports across the codebase. Use instead of manually cut/paste + fixing imports. Works without LSP (single-file); LSP enables cross-file import updates. Params: file (string), symbol (string), destination (string) [, preview (bool), receipt (bool)]
optimize-signal-count Inline a single-use Circom intermediate signal
recipe_run Run a codemod recipe: declarative match → transform → optional verify across modeled grammars. Preview lists matches; apply writes with optional E7 receipts and all-or-nothing rollback. Returns a per-site report.
remove-parameter Remove an unused Circom template parameter and update call sites
remove-signal Remove an unused Circom signal declaration
rename Rename a symbol and automatically update ALL references across the codebase. Safer and faster than find-and-replace — AST-aware, won't rename strings or comments. Works without LSP (single-file); LSP enables cross-file renames. Params: file (string), old_name (string), new_name (string) [, line (u32), column (u32), preview (bool), receipt (bool)]
rename-component Rename a Circom component instance in a template scope
rename-signal Rename a Circom signal in a template scope
rename-template Rename a Circom template and update template call targets
split-template Split selected Circom template statements into a child template

Analysis

42 analysis tools, the same on every supported language. Descriptions live in the shared reference: /docs/analysis-tools.

analyze_api_diff analyze_chokepoints analyze_clones analyze_clusters analyze_cohesion analyze_conformance analyze_coupling analyze_cycle_risk analyze_cycles analyze_dead_code analyze_depth analyze_entry_points analyze_export analyze_extraction analyze_fan_balance analyze_features analyze_hotspots analyze_impact analyze_inconsistencies analyze_inheritance analyze_interface_bloat analyze_interfaces analyze_layers analyze_orphan_types analyze_patterns analyze_platform_deps analyze_readiness analyze_roles analyze_seams analyze_stability analyze_surface analyze_test_gaps analyze_thickness analyze_type_completeness churn_hotspots co_change_clusters coverage_overlay ownership_map profile_overlay simulate split_module trace_overlay

Verify

14 verify tools, the same on every supported language. Descriptions live in the shared reference: /docs/verification.

bisect_regression gate generate_test_harness scan secret_surface summarize_pr taint_flow unsafe_surface verify_behavioral_equivalence verify_contract_preserved verify_diff_semantics verify_port_parity verify_side_effects verify_test_impact

← Cap'n ProtoClarity →