Skip to main content
Glama

liquidity-leverage

calculate_debt_to_equity

Read-onlyIdempotent

Calculate the debt-to-equity ratio: total debt divided by shareholders’ equity — how much a company relies on debt versus equity financing. Formula: Debt-to-Equity = Total Debt / Shareholders’ Equity. WHEN TO USE: Use to evaluate capital structure and financial risk, compare leverage across peers, or assess covenant headroom. WHEN NOT TO USE: Do NOT compare D/E across industries without context — capital intensity varies widely; a negative ratio (negative equity) indicates distress, not low leverage. BEHAVIOUR: pure deterministic calculation — no side effects, no network or storage access; idempotent and non-destructive; identical inputs always produce identical outputs. Division by zero or non-finite inputs returns an explicit error instead of a number. RETURNS: JSON object { debt_to_equity: number (e.g. 1.5 = 1.5x), inputs }. PARAMETERS: total_debt (required): Total debt (short-term + long-term interest-bearing), e.g. 300000. Must be >= 0. shareholders_equity (required): Total shareholders’ equity, e.g. 200000. May be negative in distress (result will be negative).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
total_debtYesTotal debt (short-term + long-term interest-bearing), e.g. 300000. Must be >= 0.
shareholders_equityYesTotal shareholders’ equity, e.g. 200000. May be negative in distress (result will be negative).

TDQS

A4.6/5.0
Behavior5/5

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

The description goes well beyond the annotations by disclosing that the calculation is pure, deterministic, side-effect-free, idempotent, and non-destructive, and that invalid inputs (division by zero or non-finite values) return an explicit error. This is useful behavioral context that annotations alone do not provide.

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?

The description is well-organized with clear headings and front-loaded purpose, making it easy to scan. However, the PARAMETERS section largely duplicates the input schema, adding some redundancy. Otherwise, every section earns its place and the structure aids agent comprehension.

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 only two parameters and full schema coverage, the description is complete: it states the formula, return shape, error behavior, caveats for negative equity, and when not to use the tool. No critical information is missing for correct invocation.

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 schema fully documents both parameters. The PARAMETERS section in the description mostly restates the schema, adding no significant new meaning beyond what is already structured. The negative-equity nuance is present in the schema too, so this stays at the baseline.

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?

Description names the exact calculation (debt-to-equity = total debt / shareholders' equity) and states the analytical purpose (capital structure, leverage, financial risk). The formula and explicit ratio distinguish it clearly from sibling ratio calculators without relying on the tool name alone.

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 provides explicit WHEN TO USE and WHEN NOT TO USE guidance, including concrete use cases (evaluate capital structure, compare peers, covenant headroom) and a clear exclusion (cross-industry comparison, negative equity misinterpretation). This is strong, actionable context for an agent deciding whether to call this tool.

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.

TDQS

A4.7/5.0
Disambiguation5/5

Each tool computes a distinct, named financial ratio with a unique formula; even the three liquidity ratios are carefully differentiated by strictness and explicit WHEN TO USE/NOT guidance. There is no practical risk of an agent selecting the wrong tool.

Naming Consistency5/5

All tools follow the identical calculate_<metric> pattern in snake_case, making the naming scheme highly predictable. The only minor variation is calculate_defensive_interval instead of ..._ratio, but it still fits the same verb-prefixed convention.

Tool Count5/5

Eight tools is a well-scoped set for a liquidity and leverage ratio calculator: four liquidity measures and four leverage measures, with no redundant or filler tools. The count is manageable for an agent to choose from without being over-conservative.

Completeness5/5

The tool surface covers the standard liquidity ratios (current, quick, cash, defensive interval) and the core leverage/solvency ratios (debt-to-assets, debt-to-equity, equity multiplier, interest coverage). Since each tool is a pure calculation with no stateful workflow, there are no dead-end operations or lifecycle gaps.

Resources