Skip to main content
Glama

prepare_inputs

Prepares private witness inputs for zero-knowledge proof submission, handling wallet approval or credential signing and returning prepared_inputs_id or request/scope details for verification.

Instructions

Step 1 of the step-by-step flow. WITH ACTION: human wallet approval is required; returns awaiting_approval until resumed with approval_id. Approved action witnesses stay in private local storage; pass the returned prepared_inputs_id to submit_proof. The action hash is public: an action whose proof is shown off-chain should not contain the wallet's address. WITHOUT ACTION: the credential key signs signal_hash = keccak256(scope ++ circuitId ++ request_id), no wallet address; the first result block is the inputs for submit_proof, the second names request_id and scope for the verifier. Handle private witness inputs only in trusted local code, never expose them to the dApp, model or logs. Call this BEFORE request_challenge. For oidc_domain provide jwt and scope.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "circuit": "<circuit>",
      "scope": "<scope>"
    },
    "name": "prepare_inputs"
  }
}

Input Schema

NameRequiredDescriptionDefault
jwtNoOIDC JWT token (id_token) for oidc_domain circuit
chainNoRequired for human_passport: the chain id the Human Passport score is recorded on -- 8453 Base, 10 OP Mainnet, 42161 Arbitrum One, 59144 Linea, 534352 Scroll, 324 zkSync Era. Ask the user; there is no default.
scopeYesRequired: what the proof is for within the service, e.g. "myapp:membership". There is no default. Wallet circuits: 1 to 256 UTF-8 bytes, no control or format characters; the nullifier is one per wallet per (oprf_domain, scope). For oidc_domain, the domain scope string.
actionNoThe EIP-712 action to authorise. Optional for coinbase_kyc, coinbase_country, giwa_attestation and human_passport; rejected for other circuits. Any structure is provable: the circuit hashes it without reading it, so a deposit, a grant of authority or an agreement in prose all work. The wallet signs exactly these fields, and the proof carries their hash.
circuitYesWhich circuit to use
providerNoOIDC provider. "google" (default) for Google Workspace, "microsoft" for Microsoft 365.
min_scoreNoRequired for human_passport: the Human Passport score threshold in points (e.g. 20; above 0, at most four decimals). The server finds the wallet's score on the chain named by `chain` and refuses, before payment, a wallet with none or below it.
request_idNoThe id of the request this proof answers, when the party that will verify it issued one (ASCII letters, digits and "-", at most 128 characters). Without an action the wallet signs signal_hash = keccak256(scope ++ circuitId ++ request_id), which contains no wallet address, so the verifier can recompute it. Omit it and a fresh UUID is minted; it is returned as request_id / requestId -- hand it, with the scope, to whoever verifies the proof. Not used by oidc_domain.
approval_idNoResume the SAME original action request using the approval_id returned with awaiting_approval. Keep all original parameters unchanged.
is_includedNotrue = prove country IS in list, false = prove NOT in list. Required for coinbase_country circuit.
oprf_domainNoRequired for every wallet circuit (coinbase_kyc, coinbase_country, giwa_attestation, human_passport): the name of the service the proof is for, usually its host (e.g. "app.example.com"). The nullifier is one per wallet per (oprf_domain, scope), so two services cannot link one wallet's proofs. 1 to 256 UTF-8 bytes, no control or format characters, used exactly as given. Required here: this server never fills it in. Ask the user or the verifying service. Hand it, with the scope, to whoever verifies the proof. Not used by oidc_domain.
country_listNoISO 3166-1 alpha-2 country codes. Required for coinbase_country circuit.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv0.2.52
    • addedInput schema / properties / oprf_domain
      Added value: +{
      +  "description": "Required for every wallet circuit (coinbase_kyc, coinbase_country, giwa_attestation, human_passport): the name of the service the proof is for, usually its host (e.g. \"app.example.com\"). The nullifier is one per wallet per (oprf_domain, scope), so two services cannot link one wallet's proofs. 1 to 256 UTF-8 bytes, no control or format characters, used exactly as given. Required here: this server never fills it in. Ask the user or the verifying service. Hand it, with the scope, to whoever verifies the proof. Not used by oidc_domain.",
      +  "type": "string"
      +}
    • addedInput schema / properties / request_id
      Added value: +{
      +  "description": "The id of the request this proof answers, when the party that will verify it issued one (ASCII letters, digits and \"-\", at most 128 characters). Without an action the wallet signs signal_hash = keccak256(scope ++ circuitId ++ request_id), which contains no wallet address, so the verifier can recompute it. Omit it and a fresh UUID is minted; it is returned as request_id / requestId -- hand it, with the scope, to whoever verifies the proof. Not used by oidc_domain.",
      +  "type": "string"
      +}
    • changedInput schema / properties / scope / description
      Previous value: -"Scope string for nullifier derivation. Defaults to \"proofport\" if omitted. For oidc_domain circuit, this is the domain scope string."New value: +"Required: what the proof is for within the service, e.g. \"myapp:membership\". There is no default. Wallet circuits: 1 to 256 UTF-8 bytes, no control or format characters; the nullifier is one per wallet per (oprf_domain, scope). For oidc_domain, the domain scope string."
    • changedInput schema / required
      Previous value: -[
      -  "circuit"
      -]New value: +[
      +  "circuit",
      +  "scope"
      +]
  2. Changed2 schema fields changedv0.2.50
    • addedInput schema / properties / chain
      Added value: +{
      +  "description": "Required for human_passport: the chain id the Human Passport score is recorded on -- 8453 Base, 10 OP Mainnet, 42161 Arbitrum One, 59144 Linea, 534352 Scroll, 324 zkSync Era. Ask the user; there is no default.",
      +  "type": "number"
      +}
    • changedInput schema / properties / min_score / description
      Previous value: -"Required for human_passport: the Human Passport score threshold in points (e.g. 20; above 0, at most four decimals). The server finds the wallet's score on Base and refuses, before payment, a wallet with none or below it."New value: +"Required for human_passport: the Human Passport score threshold in points (e.g. 20; above 0, at most four decimals). The server finds the wallet's score on the chain named by `chain` and refuses, before payment, a wallet with none or below it."
  3. Changed3 schema fields changedv0.2.49
    • changedInput schema / properties / action / description
      Previous value: -"The EIP-712 action to authorise. Optional for coinbase_kyc, coinbase_country and giwa_attestation; rejected for other circuits. Any structure is provable: the circuit hashes it without reading it, so a deposit, a grant of authority or an agreement in prose all work. The wallet signs exactly these fields, and the proof carries their hash."New value: +"The EIP-712 action to authorise. Optional for coinbase_kyc, coinbase_country, giwa_attestation and human_passport; rejected for other circuits. Any structure is provable: the circuit hashes it without reading it, so a deposit, a grant of authority or an agreement in prose all work. The wallet signs exactly these fields, and the proof carries their hash."
    • changedInput schema / properties / circuit / enum
      Previous value: -[
      -  "coinbase_kyc",
      -  "coinbase_country",
      -  "oidc_domain",
      -  "giwa_attestation"
      -]New value: +[
      +  "coinbase_kyc",
      +  "coinbase_country",
      +  "oidc_domain",
      +  "giwa_attestation",
      +  "human_passport"
      +]
    • addedInput schema / properties / min_score
      Added value: +{
      +  "description": "Required for human_passport: the Human Passport score threshold in points (e.g. 20; above 0, at most four decimals). The server finds the wallet's score on Base and refuses, before payment, a wallet with none or below it.",
      +  "type": "number"
      +}
  4. Changed1 schema field changedv0.2.48
    • changedInput schema / properties / action / description
      Previous value: -"The EIP-712 action to authorise. Optional for giwa_attestation; rejected for other circuits. Any structure is provable: the circuit hashes it without reading it, so a deposit, a grant of authority or an agreement in prose all work. The wallet signs exactly these fields, and the proof carries their hash."New value: +"The EIP-712 action to authorise. Optional for coinbase_kyc, coinbase_country and giwa_attestation; rejected for other circuits. Any structure is provable: the circuit hashes it without reading it, so a deposit, a grant of authority or an agreement in prose all work. The wallet signs exactly these fields, and the proof carries their hash."
  5. Changed2 schema fields changedv0.2.46
    • changedInput schema / properties / action / description
      Previous value: -"The EIP-712 action to authorise. Optional for arc_eligibility and giwa_attestation; rejected for other circuits. Any structure is provable: the circuit hashes it without reading it, so a deposit, a grant of authority or an agreement in prose all work. The wallet signs exactly these fields, and the proof carries their hash."New value: +"The EIP-712 action to authorise. Optional for giwa_attestation; rejected for other circuits. Any structure is provable: the circuit hashes it without reading it, so a deposit, a grant of authority or an agreement in prose all work. The wallet signs exactly these fields, and the proof carries their hash."
    • changedInput schema / properties / circuit / enum
      Previous value: -[
      -  "coinbase_kyc",
      -  "coinbase_country",
      -  "oidc_domain",
      -  "arc_eligibility",
      -  "giwa_attestation"
      -]New value: +[
      +  "coinbase_kyc",
      +  "coinbase_country",
      +  "oidc_domain",
      +  "giwa_attestation"
      +]
  6. Changed1 schema field changedv0.2.45
    • addedInput schema / properties / approval_id
      Added value: +{
      +  "description": "Resume the SAME original action request using the approval_id returned with awaiting_approval. Keep all original parameters unchanged.",
      +  "type": "string"
      +}
  7. Changed2 schema fields changedv0.2.44
    • changedInput schema / properties / action / description
      Previous value: -"The EIP-712 action to authorise. Required for arc_eligibility and rejected for every other circuit. Any structure is provable: the circuit hashes it without reading it, so a deposit, a grant of authority or an agreement in prose all work. The wallet signs exactly these fields, and the proof carries their hash."New value: +"The EIP-712 action to authorise. Optional for arc_eligibility and giwa_attestation; rejected for other circuits. Any structure is provable: the circuit hashes it without reading it, so a deposit, a grant of authority or an agreement in prose all work. The wallet signs exactly these fields, and the proof carries their hash."
    • changedInput schema / properties / circuit / enum
      Previous value: -[
      -  "coinbase_kyc",
      -  "coinbase_country",
      -  "oidc_domain",
      -  "arc_eligibility"
      -]New value: +[
      +  "coinbase_kyc",
      +  "coinbase_country",
      +  "oidc_domain",
      +  "arc_eligibility",
      +  "giwa_attestation"
      +]
  8. Changed2 schema fields changedv0.2.43
    • addedInput schema / properties / action
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "The EIP-712 action to authorise. Required for arc_eligibility and rejected for every other circuit. Any structure is provable: the circuit hashes it without reading it, so a deposit, a grant of authority or an agreement in prose all work. The wallet signs exactly these fields, and the proof carries their hash.",
      +  "properties": {
      +    "domain": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "chainId": {
      +          "type": "number"
      +        },
      +        "name": {
      +          "type": "string"
      +        },
      +        "verifyingContract": {
      +          "type": "string"
      +        },
      +        "version": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "name",
      +        "version",
      +        "chainId",
      +        "verifyingContract"
      +      ],
      +      "type": "object"
      +    },
      +    "message": {
      +      "additionalProperties": {},
      +      "type": "object"
      +    },
      +    "primaryType": {
      +      "type": "string"
      +    },
      +    "types": {
      +      "additionalProperties": {
      +        "items": {
      +          "additionalProperties": false,
      +          "properties": {
      +            "name": {
      +              "type": "string"
      +            },
      +            "type": {
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "name",
      +            "type"
      +          ],
      +          "type": "object"
      +        },
      +        "type": "array"
      +      },
      +      "type": "object"
      +    }
      +  },
      +  "required": [
      +    "domain",
      +    "types",
      +    "primaryType",
      +    "message"
      +  ],
      +  "type": "object"
      +}
    • changedInput schema / properties / circuit / enum
      Previous value: -[
      -  "coinbase_kyc",
      -  "coinbase_country",
      -  "oidc_domain"
      -]New value: +[
      +  "coinbase_kyc",
      +  "coinbase_country",
      +  "oidc_domain",
      +  "arc_eligibility"
      +]
  9. First observedv0.2.9

TDQS

A4.1/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full behavioral burden and does so richly: it discloses human wallet approval and awaiting_approval, private witness storage, public action hash risks, the credential-key signing formula, and warnings not to expose witness inputs to the dApp, model, or logs.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized for a 12-parameter, nested-schema tool and uses WITH ACTION / WITHOUT ACTION markers to organize the two flows. It is dense as a single paragraph and starts with a somewhat vague 'Step 1' framing, but the security and sequencing sentences generally earn their place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity, the exhaustive input schema, no output schema, and no annotations, the description covers invocation flow, approval behavior, privacy constraints, and return routing to submit_proof. It does not fully enumerate all return fields or error conditions, so a small completeness gap remains.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3 even with limited parameter discussion in the description. The description adds cross-parameter flow context such as approval_id resumption and oidc_domain's jwt+scope, but most parameter meaning is already in the schema rather than newly explained.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description frames this as 'Step 1' and explains both the WITH ACTION and WITHOUT ACTION paths, making clear it prepares inputs consumed by submit_proof. It does not open with a single specific verb+resource statement, so the purpose is clear but not maximally front-loaded.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives explicit sequencing: 'Call this BEFORE request_challenge' and says to pass the returned prepared_inputs_id to submit_proof. It also explains approval_id resumption and oidc_domain requirements. There is no explicit when-not/exclusion guidance, which keeps this below a 5.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.