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.

Schema Changelog

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

  1. First observed

TDQS

A5/5.0
Behavior5/5

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

Beyond the annotations, the description adds valuable behavioral context: it is a pure deterministic calculation with no side effects, no network/storage access, and returns 0 if total value is 0. It also discloses the exact formula and output rounding behavior, which the annotations do not cover.

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 well-structured with labeled sections for usage, behavior, formula, returns, and parameters. Every section adds necessary operational information, and the purpose is front-loaded in the first sentence.

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?

With no output schema present, the description fully specifies the return shape including field names, rounding precision, and example values. It also covers the edge case of zero total value, making the tool safe to invoke without external documentation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Although the schema already covers all five parameters, the description adds crucial usage meaning such as 'all rates are decimals, never percentage points' and concrete examples like '0.12 = 12%'. This reduces the risk of misinterpreting the numeric format for cost_of_equity and cost_of_debt.

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 states a specific verb ('Calculate') and resource ('Weighted Average Cost of Capital') with a clear definition and formula. It also explicitly distinguishes this tool from calculate_dcf by saying it is not for the full valuation itself, making it easy for an agent to select correctly among siblings.

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 the condition for using calculate_dcf instead. This leaves no ambiguity about when the tool is appropriate and names the key alternative.

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

Each tool maps to a distinct financial formula or calculation, and the when-to-use/when-not-to-use guidance cleanly separates closely related cash-flow metrics like NPV, IRR, and MOIC as well as CAPM, WACC, and DCF. There is no pair of tools that appears to perform the same operation.

Naming Consistency4/5

The overwhelming majority of tools follow a consistent calculate_<metric> snake_case pattern with descriptive names. irr_sensitivity breaks the pattern by omitting the calculate_ prefix, and mixing expanded names like cost_of_equity with abbreviations like wacc and moic is a minor deviation.

Tool Count5/5

Twelve tools is well within the ideal range for a focused financial-calculations server. Each tool covers a distinct valuation, discount-rate, or return-metric need without redundancy, so the count feels appropriately scoped.

Completeness4/5

The tool set covers the core valuation workflow: cost of equity, beta unlevering/relevering, WACC, DCF, enterprise-value multiples, and investment return metrics. It lacks a reverse equity-value calculation and an equity-side multiple like P/E, but those are workable gaps rather than severe dead ends.

Resources