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).

Schema Changelog

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

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint, but the description adds non-redundant behavioral detail: pure deterministic calculation, no network or storage access, identical inputs always produce identical outputs, and explicit error handling for undefined mathematical combinations. This goes well beyond the annotation bits, and it does not contradict them.

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 with scannable sections (formula, when to use, when not, behavior, returns, parameters) and front-loads the core formula. It earns most of its sentences, but the parameters section duplicates the schema descriptions almost word-for-word, which adds length without additional value. Still, overall information density is high and no fluff is present.

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?

There is no output schema, yet the description explicitly documents the return shape (JSON with cost_of_equity, cost_of_equity_pct, inputs) and gives examples. Combined with the formula, usage guidance, and error behavior, an agent has everything needed to call this tool correctly. The description is fully self-contained.

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%, and the parameter text in the description is nearly verbatim identical to the schema property descriptions (e.g., beta's 'levered, if the company has debt' and unit examples). It reinforces the decimal-vs-percentage warning, but adds no new information beyond what the schema already provides. The baseline 3 applies.

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 specific verb and resource ('Calculate the cost of equity using CAPM') and includes the exact formula, leaving no ambiguity about what the tool computes. It also differentiates from siblings by explicitly naming its role as an input to WACC and DCF, making it clear this is not one of the valuation multiples or cash-flow tools.

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 'WHEN TO USE' section gives concrete applications (WACC input, DCF discount rate, standalone hurdle), and the 'WHEN NOT TO USE' section names the exact alternative tools (calculate_unlever_beta / calculate_relever_beta) and the condition (private companies without a traded beta) that should route the agent elsewhere. This is explicit and actionable.

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