Skip to main content
Glama

Build an unsigned Indigo close-CDP transaction

close_cdp

Creates an unsigned transaction to close an Indigo CDP, burning iAsset debt and reclaiming ADA collateral. Returns CBOR hex and summary for agent signing.

Instructions

Build a transaction that closes an Indigo CDP: burn the minted iAsset debt and withdraw the ADA collateral. Identify the CDP by the out-ref from get_position (protocol "indigo"). Returns an UNSIGNED transaction as CBOR hex with an empty witness set, plus a human-readable summary. This server never signs, never submits and never holds keys or funds — the agent signs it (CIP-30 signTx) and submits it. Requires BLOCKFROST_PROJECT_ID and INDIGO_SYSTEM_PARAMS_URL.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
txHashYescdpOutRef.txHash from get_position
addressYesBech32 Cardano address that owns the CDP
outputIndexYescdpOutRef.outputIndex from get_position

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior5/5

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

The description discloses important behavior beyond annotations: the server never signs, never submits, never holds keys or funds, and returns an unsigned transaction with an empty witness set plus a summary. This clarifies the exact execution boundary and what the agent must do next.

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 compact and front-loaded with the core operation, then covers identification, return value, safety boundary, and prerequisites. Every sentence carries useful information without filler.

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?

There is no output schema, so the description appropriately explains the return payload: CBOR-hex unsigned transaction, empty witness set, and human-readable summary. It also names required environment variables and the CIP-30 signing handoff, making the full call context complete.

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%, and the schema already documents that txHash and outputIndex come from cdpOutRef in get_position and that address is the Bech32 CDP owner. The description reinforces this provenance but does not add meaning beyond the schema.

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 states a specific action and resource: building a transaction that closes an Indigo CDP, with concrete sub-effects (burn iAsset debt, withdraw ADA collateral). This clearly distinguishes it from siblings like open_cdp and build_swap_tx.

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?

It explicitly ties the CDP to an out-ref from get_position with protocol "indigo", giving the agent a clear input source and workflow. It does not explicitly say 'use this only when closing an Indigo CDP, not for other operations', but the close-specific wording makes the intended use clear.

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