Skip to main content
Glama

create_contract_a

Create a Mode A escrow contract that locks payment and releases it instantly when the worker submits the pre-agreed SHA-256 hash, enabling trustless settlement for deterministic deliverables.

Instructions

Create a Mode A (Hash-verified settlement) Idios escrow contract.

Locks payment from your wallet. The expected output hash is locked in at creation time. When the worker submits the same hash, the contract auto-settles and releases payment. No human approval needed.

Use Mode A for deterministic outputs where the exact deliverable is agreed before the contract starts: a specific model file, dataset, or any output with a known SHA-256 hash.

Both parties must agree on result_hash before the contract is created. The worker should send you the hash of their deliverable in advance for you to verify before locking it in.

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. result_hash: SHA-256 hash of the expected deliverable file (64-char hex string). 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
result_hashYes
expiry_blockYes
worker_pubkeyYes
required_collateralNo

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 carries the full burden and does so thoroughly. It discloses auto-settlement on hash match, no human approval needed, refund/expiry behavior, collateral forfeiture, and that the function returns a confirmation or error. This gives the agent a complete picture of the tool's side effects.

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 efficiently structured: summary, behavior explanation, usage guidance, and a numbered Args list. No sentence is wasted; the prose is tight and the parameter descriptions are concise yet complete.

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 complex 10-parameter creation tool with no annotations, the description provides all necessary context: what the tool does, when to use it, prerequisites, detailed parameter semantics, and return behavior. There are no obvious gaps.

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 coverage is 0%, so the description must explain all parameters. It does, with units (groth), defaults (subnet_id, epoch, required_collateral, spec_hash), constraints (job_id uniqueness, 64-char hex hash), and practical examples (asset_id 0/47, expiry_block = current_block + 10000). This fully compensates for the schema's lack of descriptions.

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 a specific verb+resource: 'Create a Mode A (Hash-verified settlement) Idios escrow contract.' It clearly explains what the tool does and differentiates it from Mode B (create_contract_b) by detailing the hash-verified auto-settlement mechanism.

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?

The description provides explicit usage guidance: 'Use Mode A for deterministic outputs where the exact deliverable is agreed before the contract starts.' It also states a prerequisite (both parties must agree on result_hash). However, it does not explicitly mention when not to use this tool or name alternative tools like batch_create_contracts.

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