Skip to main content
Glama

set_liquidation_alert

Arm a liquidation alert: notify when a lending obligation's health factor falls to or below threshold.

protocol: kamino | marginfi (marginfi_account required for marginfi). threshold is the HF level (e.g. 1.2 warns before the <1.0 liquidation point). Evaluated every 30s by Celery beat; webhook_url is POSTed on trip.

Workflow: MONITOR step -- arm after opening a leveraged/borrow position so a deteriorating obligation loops you back to repay/de-risk. Pairs with get_health_factor. See get_trading_workflow.

Permission mode: a configuration write -- allowed in every permission_mode, observe included; the ladder gates value-bearing actions, not config.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
marketNo
protocolYes
caller_idNo
thresholdYes
webhook_urlNo
wallet_addressYes
marginfi_accountNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Adds substantial context beyond annotations: the 30s Celery-beat evaluation cadence, the webhook POST-on-trip behavior, and the permission-mode note that this config write is allowed even in observe mode. These are non-obvious operational traits the annotations (readOnly=false, openWorld=true) do not convey.

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

Conciseness4/5

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

Front-loaded with the core action, then structured into labeled sections (protocol, workflow, permission mode) that each earn their place. Slightly dense, but every line adds decision-relevant information rather than 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?

Given an output schema exists (so return values need not be described) and 7 parameters, the description covers the behavioral profile, the conditional parameter requirement, the workflow placement, and the permission implications. Nothing an agent needs to invoke it correctly is missing.

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?

Schema coverage is 0%, so the description must carry the load, and it does explain the tricky parameters: threshold as an HF level with a concrete example (1.2 vs the <1.0 liquidation point), protocol enum values, the marginfi_account requirement conditioned on protocol, and webhook_url semantics. It leaves market, caller_id, and wallet_address unexplained, so it is strong but not complete.

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?

States a specific verb+resource ('Arm a liquidation alert') and immediately scopes it to lending-obligation health factors, which separates it from the generic sibling set_alert and set_perp_tpsl. An agent can identify the operation without opening the schema.

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?

Explicitly frames it as a MONITOR-step action to arm after opening a leveraged/borrow position and names the pairing tool (get_health_factor) and the broader workflow reference (get_trading_workflow). It gives clear when-to-use context but does not explicitly contrast with the generic set_alert sibling.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources