Skip to main content
Glama

refund_contract

Recover your payment from an expired contract if the worker never committed collateral or failed to deliver. The refund is included in the transaction itself, so no separate claim is needed.

Instructions

Refund an expired Idios contract as the requester (Alice).

Valid in two situations, both requiring the contract's expiry_block to have passed:

  • Open (worker never committed collateral): your payment is returned.

  • Active (worker committed collateral but never delivered): your payment is returned, and the worker's collateral is forfeited to the protocol treasury as a non-delivery penalty. You never receive the worker's collateral yourself, so a tight expiry cannot be used to seize their stake.

Funds are returned in the refund transaction itself. No separate claim is needed afterwards. Refund is not possible once a delivery has been submitted (AwaitingApproval or later); use approve, dispute, or the dispute resolution flow instead.

Args: job_id: The contract ID to refund.

Returns confirmation of refund, or error message.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
job_idYes

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 full responsibility for behavioral disclosure. It explains exactly what happens to the requester's payment, what happens to the worker's collateral (forfeited to treasury, not to requester), and that funds are returned in the refund transaction itself. These are non-obvious state-changing behaviors disclosed clearly.

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 well-structured and front-loaded: purpose, valid conditions, effects, exclusions, and argument/return summary. Despite its length, every sentence contributes meaningful behavioral or usage information, and the formatting with bullets and clear paragraphs enhances scannability.

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?

The tool has complex state-transition logic involving expiry, collateral forfeiture, and exclusion windows. The description covers all relevant scenarios, the return behavior, and the error conditions. Even though an output schema exists, the description explicitly states that it returns a confirmation or error, which is adequate for a refund action.

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?

The schema only provides 'job_id' as an integer with title 'Job Id'. The description adds 'The contract ID to refund,' which is minimal but sufficient for a single parameter. Given the low schema coverage, the description compensates by at least indicating the semantic role of the parameter.

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 and resource: 'Refund an expired Idios contract as the requester (Alice).' This clearly identifies the tool's role and actor, and the detailed lifecycle conditions distinguish it from siblings like mutual_cancel, claim_funds, and dispute_delivery.

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?

The description explicitly enumerates the two valid situations, requires expiry_block to have passed, and states when refund is not possible (after delivery submission). It also names alternatives ('use approve, dispute, or the dispute resolution flow instead'), making the when-to-use decision unmistakable.

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