Skip to main content
Glama

prepare_inputs

Prepares private witness inputs for zero-knowledge proofs, manages any required wallet approval, and returns a prepared_inputs_id to pass to submit_proof before requesting a challenge.

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. WITHOUT ACTION: retains the existing credential-key signature and private witness result. 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.

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.
scopeNoScope string for nullifier derivation. Defaults to "proofport" if omitted. For oidc_domain circuit, this is 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.
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.
country_listNoISO 3166-1 alpha-2 country codes. Required for coinbase_country circuit.

Schema Changelog

Changes observed during successful MCP inspections.

  1. 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."
  2. 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"
      +}
  3. 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."
  4. 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"
      +]
  5. 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"
      +}
  6. 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"
      +]
  7. 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"
      +]
  8. First observedv0.2.9

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does substantial work: it discloses that human wallet approval is required for actions, that the call returns awaiting_approval until resumed with approval_id, that approved witnesses persist in private local storage, and that witness data must never reach the dApp, model, or logs. It stops short of stating whether the call itself performs work eagerly (e.g. wallet interaction timing) or any limits on repeated calls.

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?

Front-loaded with the flow position, then cleanly separated into WITH ACTION and WITHOUT ACTION blocks, each sentence carrying distinct information. The privacy warning is appended last rather than integrated, and several clauses are compressed into semicolon-chained sentences, but there is little waste.

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?

For a 10-parameter tool with nested objects, no annotations, and no output schema, the description covers the state machine (approval, resume, handoff), the privacy constraint, and the ordering constraint. Adequate overall, though it does not explain how the returned prepared_inputs_id relates to circuits or what happens if the call is repeated without approval_id.

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 description coverage is 100%, so per-parameter meaning, defaults, and enum semantics are already documented in the schema. The description adds only the oidc_domain pairing of jwt with scope, which the schema already specifies, so the baseline of 3 applies.

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 establishes the tool's role as step 1 of a flow and branches its behavior on WITH ACTION vs WITHOUT ACTION, returning prepared_inputs_id for submit_proof. It never states plainly what the tool produces in the no-action case beyond 'retains the existing credential-key signature', which leaves the purpose slightly implicit relative to its name.

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?

Explicit sequencing: 'Call this BEFORE request_challenge' and 'pass the returned prepared_inputs_id to submit_proof', plus the resume condition using approval_id rather than a fresh call. It does not name the get_action_approval sibling as the source of approval_id, so the routing to that tool is left implicit.

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