Skip to main content
Glama

create_contract_b

Create a reviewed-settlement escrow contract that locks payment, requires worker collateral, and lets you approve or dispute delivery. Solves trust issues for AI agent work needing human judgment.

Instructions

Create a Mode B (Reviewed settlement) Idios escrow contract.

Locks payment from your wallet into escrow. The worker must then call commit_collateral to begin work. After delivery, you review and approve or dispute. If you do nothing within review_window_blocks, the worker can claim via claim_after_timeout.

Use Mode B for any work where a human or agent needs to judge the output: custom AI agents, automation pipelines, consulting, data labelling, model fine-tuning where exact output hash is not known in advance.

Args: job_id: Unique integer ID you choose. Must not already exist on chain. worker_pubkey: Worker's Beam pubkey from their Idios dapp or get_key action. payment: Payment amount in groth (1 BEAM = 100,000,000 groth). asset_id: 0 for BEAM, 47 for NPH (USD-pegged stablecoin). expiry_block: Block height after which the requester can refund. A committed worker who has not delivered by then forfeits their collateral to the treasury. Use current_block + 10000 for ~7 days. review_window_blocks: How long requester has to approve/dispute after delivery. 2000 blocks is roughly 33 hours. Pass 0 (or omit) to use the contract default set at deploy time. dispute_fee: Amount the requester locks if they file a dispute. It pays the voting arbitrators regardless of outcome; neither party gets it back. required_collateral: Minimum collateral in groth the worker must commit. The contract rejects any commit below this floor. 0 (default) = no floor. spec_hash: Optional SHA-256 hash (64 char hex) of the job specification, stored on chain for later reference. Omit or pass "" for none. subnet_id: Subnet identifier (default 1). epoch: Epoch (default 1).

Returns confirmation once contract is on chain, or error message.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
epochNo
job_idYes
paymentYes
asset_idYes
spec_hashNo
subnet_idNo
dispute_feeYes
expiry_blockYes
worker_pubkeyYes
required_collateralNo
review_window_blocksNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

With no annotations, the description fully carries the burden and excels. It discloses key behaviors: locks payment from wallet, worker must commit collateral, timeout review allows worker claim, expiry_block causes collateral forfeiture if no delivery, dispute_fee is non-refundable, and returns confirmation/error. These details go far beyond minimal expectations.

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

Conciseness5/5

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

The description is relatively long but every sentence is value-dense. It is well-structured: main purpose, lifecycle, usage guidance, then parameter list. Front-loaded with the core action and decision-relevant information. No fluff or repetition.

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 an 11-parameter tool with no output schema given, the description is remarkably complete. It covers the entire contract lifecycle, timeout behavior, collateral forfeiture, dispute handling, and return values. It also ties into sibling tools (commit_collateral, claim_after_timeout) and gives practical block-height estimates.

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

Parameters5/5

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

Schema description coverage is 0%, so the description must compensate, and it does comprehensively. Every parameter is explained with units, valid values, defaults, and purpose: payment in groth, asset_id 0/47, expiry_block estimated in days, review_window_blocks conversion, dispute_fee implications, required_collateral floor, optional spec_hash. This is exemplary parameter documentation.

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?

The description opens with 'Create a Mode B (Reviewed settlement) Idios escrow contract' – a specific verb (create) plus resource (Mode B escrow contract). It clearly distinguishes from siblings by detailing the review workflow and explicitly recommending Mode B for work requiring human/agent judgment, unlike other contract types.

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?

Provides explicit use case: 'Use Mode B for any work where a human or agent needs to judge the output: custom AI agents, automation pipelines, consulting, data labelling, model fine-tuning where exact output hash is not known in advance.' This implies when not to use (e.g., when output hash is known, likely Mode A). It also outlines the complete workflow and prerequisites (worker must call commit_collateral).

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/honeytones/idios'

If you have feedback or need assistance with the MCP directory API, please join our Discord server