Skip to main content
Glama

valuation-api

This connector has been deprecated

Superseded by valuation-api on valuation.finance-tools.io (fresh connector with focused 12-tool set and current TDQS eval)

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.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint. The description goes further by stating 'pure deterministic calculation — no side effects, no network or storage access' and documents the zero-total-value edge case ('returns 0 if total value is 0'). This adds meaningful behavioral context beyond the annotations.

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 longer than average but uses labeled sections (WHEN TO USE, BEHAVIOUR, RETURNS, PARAMETERS) that make it skimmable. Each sentence contributes either a usage rule, formula, or parameter clarification. Slight redundancy with schema parameter descriptions keeps it from a 5.

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

Completeness4/5

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

The description fully covers inputs, formula, edge case, and return object, so an agent can invoke and interpret results correctly. It references calculate_dcf as the alternative, but it does not mention calculate_capm_cost_of_equity, a sibling that could provide the cost_of_equity input. This is a minor gap given the input list is otherwise self-contained.

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% and each parameter already has a description. The description adds value by tying parameters to the formula (E/V x Re + D/V x Rd x (1 - tax_rate)) and by emphasizing the global rule 'All rates are decimals, never percentage points,' which prevents a common invocation error.

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 opens with a precise verb and resource: 'Calculate the Weighted Average Cost of Capital (WACC)' and immediately defines what WACC is. It clearly distinguishes itself from calculate_dcf by noting the tool covers only the discount-rate step, 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' and 'WHEN NOT TO USE' sections give unambiguous selection criteria: use it to derive a DCF discount rate from the listed inputs, avoid it when the discount rate is already known, and defer to calculate_dcf for full valuation. This is model guidance.

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