Skip to main content
Glama

Evaluate Escrow Work

evaluate_escrow_work
Destructive

Submit proof of completed work against an existing escrow vault. Vaults with proof gates also need nft_token_id (and optionally nft_wallet) and/or vc_jwt.

On PASS, payment releases automatically — no EscrowFinish needed. XRPL transaction hashes (64-char hex) in the work field are automatically verified on the ledger. Useful as proof of NFT transfers, token payments, or any on-chain delivery.

Evaluation pipeline (when the vault has structured criteria):

  1. Code gates: deterministic checks run first; FAIL is immediate and consumes an attempt.

  2. Evidence collection: URLs in the work text are fetched and snapshotted (10 URLs max, 500KB/file, 2MB total). Evidence criteria require a verbatim quote from fetched content.

  3. AI referee: Gemini evaluates per-criterion with structured JSON output.

  4. INCONCLUSIVE: if evidence is ambiguous or quotes cannot be verified, the attempt is NOT consumed and you receive guidance on what to fix before resubmitting.

Response shape on PASS:

{
  "verdict":          "PASS",
  "status":           "approved",
  "score":            0-100,
  "summary":          "explanation",
  "criteria_results": [{"criterion_id": "c1", "verdict": "PASS", ...}],
  "auto_finish_queued": True,
  "model_used":       "gemini-3.5-flash-lite"
}

Response shape on FAIL:

{
  "verdict":           "FAIL",
  "status":            "rejected",
  "score":             0-100,
  "summary":           "explanation",
  "criteria_results":  [{"criterion_id": "c1", "verdict": "FAIL", "reasoning": "..."}],
  "attempts_remaining": 2,
  "model_used":        "gemini-3.5-flash-lite"
}

Response shape on INCONCLUSIVE (attempt NOT consumed):

{
  "status":         "inconclusive",
  "verdict":        "INCONCLUSIVE",
  "verdict_detail": {...},
  "guidance":       "what to fix before resubmitting",
  "attempts_used":  0
}

Response shape on HELD (testnet only — AI selected but capped/disabled/unavailable; nothing released, attempt NOT consumed):

{"status": "held", "verdict": "HELD", "ai": {"status": "capped", "message": "..."}}

Every response also carries "verdict_detail" (full verdict object), "checks_run", "ai" {requested, status, model, message} and "criteria_results" with a "type" per row.

Attempt limits: workers get 3 attempts by default. Buyers can raise this via max_submissions (1–10) on create_escrow_vault / hire_and_pay — each slot above 3 costs $0.05 extra at creation time. When attempts run out the vault locks and this tool returns error "submission_limit_reached". Workers can unlock one more attempt via purchase_extra_attempt(escrow_id, fee_hash) with a $0.05 fee.

On FAIL: read criteria_results (or criteria_failed) for actionable feedback. Resubmit by calling evaluate_escrow_work again with the same escrow_id.

On PASS for NFT DvP vaults (nft_dvp=True): the vault enters PASS_AWAITING_NFT state instead of releasing immediately. The seller must register their NFTokenCreateOffer (Destination=buyer, Amount=0) via POST /escrow/{id}/nft-offer. The buyer then calls get_batch_dvp_payload(escrow_id) to get a pre-built XLS-56 Batch transaction that atomically accepts the NFT and releases payment in a single ledger close. Both legs succeed or both revert.

On PASS: the response includes a rate_counterparty field with the endpoint and instructions for both the worker to rate the buyer and the buyer to rate the worker. Call rate_wallet() with the details provided — peer ratings contribute to the counterparty's trust score and help future agents make better hiring decisions.

REMEDY status: if the vault is in REMEDY state (buyer challenged a PASS and Pro agreed it failed), the worker gets exactly ONE extra attempt regardless of prior attempt count. A PASS on the remedy releases immediately with no challenge window. A FAIL on the remedy cancels the escrow.

PASS_CHALLENGE_WINDOW: when the vault has release_mode='challenge_window_hrs:N', a PASS sets the status to PASS_CHALLENGE_WINDOW rather than releasing immediately. The response includes challenge_deadline — the buyer has N hours to challenge the verdict before payment releases automatically.

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": {
      "escrow_id": "<escrow_id>",
      "work": "<work>"
    },
    "name": "evaluate_escrow_work"
  }
}

Input Schema

NameRequiredDescriptionDefault
workYesWork submission or proof of completion. XRPL tx hashes (64-char hex) are auto-verified on the ledger.
vc_jwtNoW3C Verifiable Credential (JWT) for vaults that require a VC proof (required_vc_issuer_did).
escrow_idYesThe receipt code provided by the buyer when creating the vault.
nft_walletNoWallet holding the NFT. Must be the vault's worker or buyer wallet; defaults to the worker wallet.
nft_token_idNoProof for vaults with require_nft_proof or required_nft_issuer: the 64-char NFTokenID, checked on the vault's own network (testnet or mainnet).
task_categoryNoEvaluation rubric. One of: default, creative, code, data, data_analysis, bug_bounty, legal, supply_chain.default
evaluate_tokenNoThe evaluate_token returned by create_escrow_vault() or hire_and_pay(). The buyer must share this with the worker before submission. Required for vaults created after v2.8.0.
evidence_linksNoUp to 3 URLs that are fetched and snapshotted at submission time as supporting evidence.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / properties / nft_token_id
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Proof for vaults with require_nft_proof or required_nft_issuer: the 64-char NFTokenID, checked on the vault's own network (testnet or mainnet).",
      +  "title": "NFT Token ID"
      +}
    • addedInput schema / properties / nft_wallet
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Wallet holding the NFT. Must be the vault's worker or buyer wallet; defaults to the worker wallet.",
      +  "title": "NFT Wallet"
      +}
    • addedInput schema / properties / vc_jwt
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "W3C Verifiable Credential (JWT) for vaults that require a VC proof (required_vc_issuer_did).",
      +  "title": "Verifiable Credential JWT"
      +}
  2. Changed1 schema field changed
    • removedInput schema / properties / require_consensus
      Removed value: -{
      -  "default": false,
      -  "description": "Require two AI models to agree before returning PASS. Recommended for high-stakes jobs.",
      -  "type": "boolean"
      -}
  3. Changed2 schema fields changed
    • addedInput schema / properties / escrow_id / title
      Added value: +"Escrow ID"
    • addedInput schema / properties / work / title
      Added value: +"Completed Work"
  4. Changed1 schema field changed
    • addedInput schema / properties / evaluate_token
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "The evaluate_token returned by create_escrow_vault() or hire_and_pay(). The buyer must share this with the worker before submission. Required for vaults created after v2.8.0."
      +}
  5. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations only say destructive/openWorld/non-idempotent; the description goes far beyond by explaining that each call consumes an attempt, that the vault locks at submission_limit_reached, that PASS auto-releases payment with no EscrowFinish, that INCONCLUSIVE/HELD do not consume attempts, and that URL fetches plus a Gemini referee run server-side. This is unusually complete disclosure of side effects, costs, and state transitions.

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

Conciseness3/5

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

Well front-loaded and sectioned by state, but it is very long and reproduces four full JSON response shapes even though an output schema already exists, which is duplicated structured data. The rate_counterparty and attempt-limit prose also repeats concepts stated elsewhere, costing density.

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

Completeness5/5

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

For a high-stakes destructive, non-idempotent tool with eight parameters, every consequential edge case is covered: proof-gate prerequisites, attempt economics, remedy semantics, challenge-window holds, DvP handoff, and held/capped AI states. Nothing an agent must know before calling it is missing.

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

Parameters4/5

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

Schema coverage is 100%, so the schema already documents each field; the description adds conditional meaning ('vaults with proof gates also need nft_token_id and/or vc_jwt') and clarifies that 64-char hex in the work field is auto-verified on-ledger. It does not cover task_category rubric selection or evaluate_token prerequisites beyond what the schema states, so it sits above baseline but not at the ceiling.

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

Purpose5/5

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

Opens with a specific verb and resource: "Submit proof of completed work against an existing escrow vault." The scope (existing vault, not creation) plus the immediate pointer to create_escrow_vault for max_submissions and to get_batch_dvp_payload for DvP makes it unmistakable versus siblings.

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

Usage Guidelines5/5

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

Explicit routing: resubmit by calling this tool again on FAIL, use purchase_extra_attempt when submissions are exhausted, follow get_batch_dvp_payload for NFT DvP passes, and rate via rate_wallet. It also states the distinct REMEDY and PASS_CHALLENGE_WINDOW conditions under which outcomes differ, which is exactly the when-to-use context an agent needs.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.