# prove_circuit

Generate a Groth16 proof (and locally verify it) for a circuit, optionally saving the artifacts to disk. Bundle source: a repo circuit's circuit_bundle/ by name (falling back to the published registry bundle), an explicit bundleDir, or a published rootHash fetched into the cache. Input validation errors describe the exact expected input schema. Proving runs wherever this tool executes — the witness never leaves that machine.

Agent View of the PolicyLayer registry record for `prove_circuit`. HTML page: https://policylayer.com/tools/0gzk-mcp/prove-circuit

## Facts

- Tool: `prove_circuit`
- Server: 0gzk (`@0gzk/mcp`) — https://policylayer.com/tools/0gzk-mcp.md
- Install: `npx -y @0gzk/mcp`
- Homepage: https://www.npmjs.com/package/@0gzk/mcp
- Risk category: Read (Low risk)
- Registry record: grade B, identity unverified
- Server rate-limited: no
- Parameters: 8
- Recommended policy verdict: Allowed

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `name` | string | no | Circuit name (repo circuit_bundle/ preferred, registry fallback) |
| `chain` | string | no | Registry/storage chain for fetches (default base) |
| `inputs` | object | no | Circuit inputs keyed by signal name (field elements as decimal strings) |
| `outDir` | string | no | Directory for proof.json, public.json and result.json. Defaults to ~/.0gzk/proofs/<circuit>-<timestamp>/. The absolute path is always returned as saved.outDir. |
| `verify` | boolean | no |  |
| `rootHash` | string | no | Published bundle rootHash (0x...) |
| `bundleDir` | string | no | Directory containing an extracted bundle |
| `inputFile` | string | no | Path to a JSON file of inputs, read locally — use instead of `inputs` to keep values off the wire |

Parameters from the server's own tool schema.

## Example call (MCP tools/call, JSON-RPC 2.0)

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "prove_circuit",
    "arguments": {}
  }
}
```

## Why prove_circuit is rated Low

Even though prove_circuit only reads data, uncontrolled read access leaks sensitive information and racks up API costs: an agent caught in a retry loop can make thousands of calls a minute without anyone noticing.

## Use case

AI agents call prove_circuit to retrieve information from 0gzk without modifying anything. It is typically the context-gathering step in research, monitoring, and reporting workflows, before the agent takes action elsewhere.

## Recommended policy (PolicyLayer)

Verdict: **Allowed**. Enforced by the PolicyLayer MCP gateway (https://policylayer.com/mcp-gateway) before a call reaches 0gzk:

```json
{
  "version": "1",
  "default": "deny",
  "tools": {
    "prove_circuit": {}
  }
}
```

## Other tools on 0gzk (7)

- `get_circuit` — Read — https://policylayer.com/tools/0gzk-mcp/get-circuit.md
- `get_example_input` — Read — https://policylayer.com/tools/0gzk-mcp/get-example-input.md
- `list_circuits` — Read — https://policylayer.com/tools/0gzk-mcp/list-circuits.md
- `read_input_file` — Read — https://policylayer.com/tools/0gzk-mcp/read-input-file.md
- `search_circuits` — Read — https://policylayer.com/tools/0gzk-mcp/search-circuits.md
- `validate_inputs` — Read — https://policylayer.com/tools/0gzk-mcp/validate-inputs.md
- `resolve_circuit` — Write — https://policylayer.com/tools/0gzk-mcp/resolve-circuit.md

## For agents

This record is a snapshot. Live verdicts and the full registry:

- Check every server in your MCP config at once: `npx -y policylayer stack`
- Vet a server before you add it: install the mcp-precheck skill — `npx skills add https://policylayer.com` (skill text: https://policylayer.com/skill.md)
- Query the registry over MCP: endpoint `https://api.policylayer.com/mcp` — tools `check_mcp_server`, `check_mcp_stack`, `check_tool`, `search_registry`, `get_change_events`

---

Source: the PolicyLayer MCP registry — one continuously verified record per MCP server. Full record: https://policylayer.com/registry?q=0gzk-mcp · API: https://policylayer.com/registry/api · Policy library: https://policylayer.com/policies/0gzk-mcp
