Skip to main content
Glama

valuation-api

calculate_capm_cost_of_equity

Read-onlyIdempotent

Calculate the cost of equity using the Capital Asset Pricing Model (CAPM): the risk-free rate plus beta times the market risk premium. Formula: Re = Rf + beta x (Rm - Rf). WHEN TO USE: Use to estimate the required return on equity — an input to WACC (calculate_wacc) and DCF discount rates, or as a standalone return hurdle. WHEN NOT TO USE: Do NOT use for companies where beta is a poor risk measure (private companies without a traded beta — consider building up from comparable betas via calculate_unlever_beta / calculate_relever_beta first). 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, non-finite inputs, or mathematically undefined combinations return an explicit error instead of a number. RETURNS: JSON object { cost_of_equity: decimal (e.g. 0.115 = 11.5%), cost_of_equity_pct: number (e.g. 11.5), inputs }. PARAMETERS: risk_free_rate (required): Risk-free rate as a decimal, e.g. 0.04 = 4% (typically the 10-year government bond yield; never pass percentage points). beta (required): Equity beta (levered, if the company has debt), e.g. 1.2. Use unlevered/relevered betas when comparing capital structures. market_return (required): Expected market return (Rm) as a decimal, e.g. 0.10 = 10% (never pass percentage points). The market risk premium is computed internally as Rm - Rf.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
betaYesEquity beta (levered, if the company has debt), e.g. 1.2. Use unlevered/relevered betas when comparing capital structures.
market_returnYesExpected market return (Rm) as a decimal, e.g. 0.10 = 10% (never pass percentage points). The market risk premium is computed internally as Rm - Rf.
risk_free_rateYesRisk-free rate as a decimal, e.g. 0.04 = 4% (typically the 10-year government bond yield; never pass percentage points).

TDQS

A4.6/5.0
Behavior5/5

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

The description discloses that the calculation is pure, deterministic, idempotent, non-destructive, and fault-tolerant with explicit errors for invalid inputs. This meaningfully extends the annotations, especially the error behavior and no side effects.

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-structured and front-loaded with the formula and purpose. Though the PARAMETERS section duplicates the input schema descriptions, the other sections are focused and free of 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?

With no output schema, the description compensates by documenting the exact return shape with examples. It also covers input constraints, error behavior, and typical use cases, making the tool fully actionable for an AI agent.

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 already documents each parameter in detail. The description's PARAMETERS section largely repeats the schema text rather than adding new meaning, which keeps this 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?

The description clearly states the tool calculates cost of equity using CAPM, gives the exact formula, and names the formula components. It explicitly distinguishes itself by mentioning CAPM, a specific model, unlike the many generic sibling calculators.

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?

Includes explicit WHEN TO USE and WHEN NOT TO USE sections. It names concrete alternatives (calculate_unlever_beta, calculate_relever_beta) and describes the exact condition (private companies with poor beta) where this tool should not be used.

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