Skip to main content
Glama

valuation-api

calculate_wacc

Read-onlyIdempotent

Calculate the Weighted Average Cost of Capital (WACC): the blended after-tax cost of a company's equity and debt capital, weighted by market values. WHEN TO USE: to determine the discount rate for a DCF valuation from equity market value, debt market value, costs of capital and corporate tax rate. WHEN NOT TO USE: when you already have the discount rate, or for the full valuation itself (use calculate_dcf). BEHAVIOUR: pure deterministic calculation — no side effects, no network or storage access; idempotent and non-destructive. Formula: (E/V) x Re + (D/V) x Rd x (1 - tax_rate), where V = equity_value + debt_value; returns 0 if total value is 0. RETURNS: JSON object { wacc: decimal rounded to 6dp (e.g. 0.105), wacc_percent: percentage rounded to 2dp (e.g. 10.5), inputs }. PARAMETERS: equity_value (market value of equity, >= 0), debt_value (market value of debt, >= 0), cost_of_equity (decimal, e.g. 0.12 = 12%), cost_of_debt (decimal, e.g. 0.06 = 6%), tax_rate (decimal 0-1, e.g. 0.25 = 25%). All rates are decimals, never percentage points.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tax_rateYesCorporate tax rate as a decimal between 0 and 1, e.g. 0.25 = 25%.
debt_valueYesMarket value of debt, >= 0, e.g. 5000000.
cost_of_debtYesCost of debt as a decimal, e.g. 0.06 = 6%. Never pass percentage points.
equity_valueYesMarket value of equity, >= 0, e.g. 10000000.
cost_of_equityYesCost of equity as a decimal, e.g. 0.12 = 12%. Never pass percentage points.

TDQS

A4.9/5.0
Behavior5/5

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

While annotations already declare readOnlyHint, idempotentHint, and destructiveHint, the description adds a dedicated BEHAVIOUR section: 'pure deterministic calculation — no side effects, no network or storage access; idempotent and non-destructive.' It also discloses the edge-case behavior 'returns 0 if total value is 0', which is not present in annotations or schema.

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 long but well-organized into labeled sections (WHEN TO USE, WHEN NOT TO USE, BEHAVIOUR, Formula, RETURNS, PARAMETERS), each earning its place. Key information is front-loaded and scanning-friendly, with no 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?

Despite having no output schema, the description fully specifies the return shape (JSON object with wacc rounded to 6dp and wacc_percent rounded to 2dp). It covers inputs, formula, edge case, and usage boundaries. For a 5-parameter calculation tool, nothing needed for correct invocation 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 100%, so the baseline is 3, but the description adds value by giving a concise parameter rundown with concrete examples and the repeated warning 'All rates are decimals, never percentage points.' It also ties parameters together in the formula (E/V x Re + D/V x Rd x (1 - tax_rate)), clarifying each parameter's role beyond the schema's individual descriptions.

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 opens with a specific verb+resource: 'Calculate the Weighted Average Cost of Capital (WACC)', then defines it as the blended after-tax cost of equity and debt weighted by market values. It distinguishes itself from calculate_dcf and other ratio siblings by stating it produces the discount rate for a DCF, not the full valuation.

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?

Explicit 'WHEN TO USE' section states the exact scenario: determining the discount rate for a DCF valuation from equity/debt market values, costs of capital, and tax rate. 'WHEN NOT TO USE' names the alternative (calculate_dcf) and the condition that selects it (already having the discount rate), leaving no ambiguity.

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.3/5.0
Disambiguation5/5

Every tool targets a distinct financial metric or formula, and the WHEN TO USE / WHEN NOT TO USE guidance clearly separates closely related concepts like DSO vs. receivables turnover, current vs. quick vs. cash ratio, and DPI/RVPI/TVPI. Even the overlapping investment-return tools (NPV, IRR, MOIC, payback) are explicitly differentiated.

Naming Consistency4/5

The overwhelming majority of tools follow a clean calculate_<metric> snake_case pattern, making the set highly predictable. The single exception is irr_sensitivity, which breaks the calculate_ prefix convention but is still readable and not chaotic.

Tool Count2/5

At 52 tools, this far exceeds the 25+ threshold where a tool set becomes too heavy for its scope. Although each tool is a distinct pure calculation, the sheer breadth creates a large navigation and selection burden for agents.

Completeness4/5

The server covers an unusually broad range of valuation workflows: time value of money, DCF/WACC/cost of capital, relative valuation multiples, profitability/liquidity/efficiency ratios, and private equity fund metrics. Minor gaps exist, such as no dedicated free cash flow, net debt, or EBITDA margin calculators, but these are workable around.

Resources