Skip to main content
Glama
simonmak-ascent

io.github.simonmak-ascent/fair-value

Weighted average cost of capital

calculate_wacc
Read-onlyIdempotent

Compute WACC from capital weights and component costs, including the tax shield on debt. Use when weights and costs are known; returns WACC and equity/debt contributions.

Instructions

Compute WACC = weke + wdkd*(1 - tax) from capital weights and costs. Use this when you already have the weights and component costs; to derive them from market data use get_valuation_summary first. Returns the WACC and its equity/debt contributions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tax_rateNoMarginal corporate tax rate as a decimal.
cost_debtYesPre-tax cost of debt as a decimal.
cost_equityYesCost of equity as a decimal (e.g. 0.10 for 10%).
debt_weightYesMarket-value weight of debt (decimals summing to 1 with equity_weight).
equity_weightYesMarket-value weight of equity (decimals summing to 1 with debt_weight).

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 tools, an object for valuation tools.
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 declare readOnly, idempotent, non-destructive and closed-world, so the safety profile is covered. The description adds the computation semantics (the after-tax debt shield in the formula) and notes the return payload, but does not discuss validation behavior for weights not summing to 1 or null tax handling.

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?

Three sentences, front-loaded with the operation and formula, then the usage condition, then the return shape. Every sentence carries distinct information and there is no padding.

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?

An output schema exists, so return values need not be spelled out, yet the description still summarizes the WACC plus equity/debt contributions. Combined with full schema coverage and a clear alternative-tool pointer, nothing an agent needs to call this correctly is missing.

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%, so the baseline is 3, but the formula adds genuine meaning the schema does not: it shows how the four required parameters combine and that tax_rate is applied only to the debt term as (1 - tax). That clarifies the optional parameter's role beyond 'marginal corporate tax rate'.

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?

States a specific verb (Compute) plus the exact resource (WACC) and even the formula, so the agent knows precisely what is produced. It explicitly distinguishes itself from get_valuation_summary, which handles the upstream data-derivation step, so sibling disambiguation is done in the description itself.

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?

Gives an explicit precondition ('when you already have the weights and component costs') and an explicit alternative with its selecting condition ('to derive them from market data use get_valuation_summary first'). Nothing about when-to-use versus the 30+ siblings is left to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.