Skip to main content
Glama

Fair Value MCP Server

Cost of capital and discount rates

calculate_discount_rate
Read-onlyIdempotent

Cost-of-capital engine. Compute WACC, cost of equity (CAPM), cost of debt, unlevered/relevered beta, and country or size premiums from an explicit capital structure and market inputs. Use this to derive the discount rate an income-approach valuation needs; it returns a rate, not a valuation, so feed the result to calculate_dcf, or to calculate_residual for IFRS-basis measurement. Methods: wacc: equity_weight, debt_weight, cost_equity, cost_debt, tax_rate; capm: risk_free, beta, market_return; startup_capm: risk_free, beta, market_risk_premium, size_premium, illiquidity_premium; build_up: risk_free, equity_risk_premium, size_premium, industry_premium, specific_premium; currency_adjusted: base_rate, currency_risk_premium, country_risk_premium; country_risk: sovereign_yield, us_risk_free; esg: base_rate, esg_risk_premium, esg_opportunity_discount; portfolio_beta: weights, betas; ibr: risk_free, credit_spread, tenor_years. Supply exactly one method with its declared inputs (no defaults). An unknown method, a missing input, or an extra field returns an error envelope (code INVALID_ARGUMENT) instead of raising.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
betaNoEquity beta (market = 1.0).
betasNoAsset/segment betas aligned with weights.
methodYesFormula to apply; the tool description lists the exact inputs each value requires.
weightsNoWeights that must sum to 1.
tax_rateNoMarginal corporate tax rate as a decimal.
base_rateNoBase rate before currency/country/ESG adjustment (decimal).
cost_debtNoPre-tax cost of debt as a decimal.
risk_freeNoContinuously-compounded risk-free rate (decimal).
cost_equityNoCost of equity as a decimal (0.12 = 12%).
debt_weightNoMarket-value weight of debt (decimal); with equity_weight must sum to 1.
tenor_yearsNoTenor in years (>0).
size_premiumNoSmall-size premium (decimal).
us_risk_freeNoUS Treasury risk-free yield (decimal).
credit_spreadNoCredit spread over the risk-free rate (decimal).
equity_weightNoMarket-value weight of equity (decimal); with debt_weight must sum to 1.
market_returnNoExpected market return (decimal).
sovereign_yieldNoSovereign bond yield (decimal).
esg_risk_premiumNoESG risk premium added to the base rate (decimal).
industry_premiumNoIndustry risk premium (decimal).
specific_premiumNoCompany-specific risk premium (decimal).
equity_risk_premiumNoEquity risk premium (decimal).
illiquidity_premiumNoIlliquidity premium (decimal).
market_risk_premiumNoMarket risk premium (decimal).
country_risk_premiumNoCountry risk premium (decimal).
currency_risk_premiumNoCurrency risk premium (decimal).
esg_opportunity_discountNoESG opportunity discount subtracted from the base rate (decimal).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
errorNoError detail, present only when status='error'.
stepsNoOrdered computation steps, when the method reports them.
valueNoPrimary result: a number for scalar methods, an object for valuation methods.
methodNoMethod or tool name that produced the result.
statusYes'ok' on success, 'error' on failure.
tickerNoTicker the result pertains to, when applicable.
assumptionsNoInputs and assumptions used, echoed for traceability.
formula_refNoFormula or standards reference for the method.
data_timestampNoISO-8601 UTC timestamp of the underlying data, when fetched.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, closed-world), so the bar is lower. The description still adds real behavioral context beyond them: exactly one method with its declared inputs, no defaults applied, and an error-envelope contract (INVALID_ARGUMENT) instead of raising on unknown method, missing input, or extra field. It omits any note on auth, limits, or output shape, but has an output schema covering returns.

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?

Front-loaded with purpose and routing before the dense method table; every sentence carries information. The per-method enumeration is long but necessary given nine modes, though it reads as a run-on and could be structured for faster scanning.

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?

For a 26-parameter, nine-method calculation tool, the description covers purpose, routing, method-to-input mapping, and failure semantics. A return-value explanation is unnecessary because an output schema exists. Nothing an agent needs to call it correctly is missing.

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?

Schema coverage is 100%, so baseline would be 3, but the description goes well beyond it by mapping each of the nine method values to the exact inputs it requires (e.g. wacc: equity_weight, debt_weight, cost_equity, cost_debt, tax_rate; ibr: risk_free, credit_spread, tenor_years). This conditional dependency between method and parameters is not expressible in the flat schema and is the key guidance for correctly invoking the tool.

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?

Opens with a specific verb+resource ('Cost-of-capital engine. Compute WACC, cost of equity (CAPM), cost of debt, unlevered/relevered beta, and country or size premiums'), which is precisely scoped and clearly distinguished from the valuation siblings. The explicit statement that it 'returns a rate, not a valuation' separates it from calculate_dcf/calculate_residual without opening either schema.

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?

States the use case ('derive the discount rate an income-approach valuation needs'), the boundary ('returns a rate, not a valuation'), and names the concrete downstream routing targets (calculate_dcf, calculate_residual for IFRS-basis measurement). An agent knows both when to call it and where its output goes.

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.