Skip to main content
Glama

liquidate_txn

Construct unsigned transactions to liquidate undercollateralized positions by repaying debt and seizing collateral at a bonus, returning base64-encoded transactions for signing.

Instructions

Build unsigned transactions to liquidate an undercollateralized position. The liquidator repays part of the debt and receives collateral at a bonus. Returns base64-encoded transactions for signing.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chainYesBlockchain network
amountYesAmount of debt to repay in human-readable units
senderYesLiquidator wallet address
borrowerYesAddress of the borrower to liquidate
debt_symbolYesDebt token to repay
collateral_symbolYesCollateral token to seize

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations, the description carries the full disclosure burden and does it well: it reveals that the tool only builds unsigned transactions, that output is base64-encoded and intended for signing, and that the operation repays part of the debt in exchange for collateral at a bonus. It does not cover failure modes (e.g., healthy position or insufficient debt) or whether the result is one transaction or several.

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?

Three sentences and roughly 40 words, with the primary purpose front-loaded in sentence one, the economic mechanism in sentence two, and the output contract in sentence three. Every sentence earns its place; there is no repetition of schema content.

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

Completeness4/5

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

For a 6-parameter transaction builder with no output schema and no annotations, the description covers purpose, mechanism, and return format — the essentials an agent needs to invoke it correctly. Residual gaps, such as whether multiple transactions are returned, prerequisite token availability, and behavior when a position is not actually undercollateralized, keep it from being fully 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%, so the baseline is 3. The description adds marginal nuance: 'part of the debt' frames the amount parameter and 'at a bonus' gives economic meaning to collateral_symbol, but the per-parameter schema descriptions already carry most of the semantic weight.

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

Purpose4/5

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

States a specific verb+resource: 'Build unsigned transactions to liquidate an undercollateralized position.' The second sentence adds the defining economic mechanic (repay debt, receive collateral at a bonus), which conceptually separates it from sibling tx builders like repay_txn, deposit_txn, borrow_txn, and withdraw_txn. It stops short of naming a sibling explicitly, so it misses the top score.

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

Usage Guidelines3/5

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

Usage context is implied: the tool is for liquidators acting on an undercollateralized position, and the bonus mechanism hints at why it differs from repay_txn. However, there is no explicit when-to-use/when-not-to-use guidance, no mention of pairing with get_liquidation_candidates to discover targets, and no prerequisite conditions (e.g., holding the debt token).

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

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/MaidToShelly/DorkFiMCP'

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