Skip to main content
Glama

calculate_health_factor

Calculate resulting health factor for lending positions after supply, borrow, withdraw, or repay actions. Assess risk of liquidation by comparing collateral, debt, and liquidation threshold.

Instructions

Calculate health factor after a potential action

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionYesAction type
amountYesAction amount in USD
currentDebtYesCurrent debt in USD
currentCollateralYesCurrent collateral in USD
liquidationThresholdYesLiquidation threshold (e.g., '0.85')
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It only says 'calculate,' giving no information about side effects, whether it simulates state changes, or what the result represents. It does not contradict annotations because none exist, but it provides minimal insight.

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 a single concise sentence of seven words, conveying the core purpose without any waste. It is front-loaded and every word earns its place.

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

Completeness3/5

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

Although the schema fully documents parameters, the description lacks context about the return value, formula, or edge cases (e.g., liquidation). For a calculation tool with no output schema, a bit more explanation of what the health factor indicates would be helpful, but the tool is simple enough that the current state is minimally viable.

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?

The input schema has 100% coverage with descriptions for all five parameters, including the action enum and amount in USD. The description adds no additional parameter semantics, so the baseline score of 3 is appropriate since the schema already handles parameter meaning.

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 clearly states the tool calculates a health factor after a potential action, using a specific verb and resource. It distinguishes itself from siblings by focusing on the lending health factor concept, and the phrase 'after a potential action' indicates simulation, which is unique among the listed tools.

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

Usage Guidelines2/5

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

No guidance is provided on when to use this tool versus alternatives. The phrase 'after a potential action' implies simulation before executing a lending operation, but there is no explicit context, exclusions, or alternative tool names given.

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/nirholas/universal-crypto-mcp'

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