Skip to main content
Glama

profitability-market

Server Details

Deterministic profitability and market-value analysis tools for AI agents — margins, ROA, ROE, ROCE, ROIC, EPS, P/E, P/B, dividend yield and payout ratio via Model Context Protocol. Useful for corporate finance, equity analysis, financial analysis, quantitative analysis, financial formulas and financial modeling.

Ownership verified
Status
Healthy
Uptime
100.0% over the last 24 hours
Last Tested
Transport
Streamable HTTP · MCP 2024-11-05
URL
ChatGPT
–
Claude
–

TDQS

A4.6/5.0

Scored across 14 tools

Disambiguation5/5

Each tool computes a distinct, well-defined financial ratio with a unique formula and clear WHEN TO USE/NOT guidance. Margin tools (gross, operating, net, EBITDA) and return tools (ROA, ROE, ROCE, ROIC) are similar families but are unambiguously differentiated by their inputs and purpose. No two tools do the same thing.

Naming Consistency5/5

All 14 tools follow the same snake_case calculate_<metric> pattern, e.g. calculate_pe_ratio, calculate_return_on_equity. This is fully predictable and consistent throughout.

Tool Count5/5

14 tools is well within the ideal range for a financial ratio calculator suite. Each ratio is a genuinely distinct operation that earns its place, and the set is not bloated or redundant.

Completeness4/5

The surface covers profitability margins, returns on capital/equity/assets, and key market valuation ratios (P/E, P/B, P/S) plus dividend metrics. Minor gaps exist for a 'profitability-market' server: common valuation metrics like EV/EBITDA, PEG, and leverage/liquidity ratios are absent, but core workflows are well served.

Available Tools

14 tools
calculate_dividend_yieldA
Read-onlyIdempotent
Inspect

Calculate dividend yield: annual dividends per share divided by share price — the cash return a shareholder receives from dividends. Formula: Dividend Yield = Annual Dividends Per Share / Share Price. WHEN TO USE: Use to compare income return against bond yields or peer dividend policies; a yield far above peers can signal a depressed price or unsustainable payout. WHEN NOT TO USE: Do NOT annualise a one-off special dividend as if it were regular income. 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 or non-finite inputs returns an explicit error instead of a number. RETURNS: JSON object { dividend_yield: decimal (e.g. 0.035 = 3.5%), dividend_yield_pct: number (e.g. 3.5), inputs }. PARAMETERS: annual_dividends_per_share (required): Annual dividends per share, e.g. 1.58. Must be >= 0. share_price (required): Current share price, e.g. 45.00. Must be > 0.

Inputs: share_price (required), annual_dividends_per_share (required).

calculate_ebitda_marginA
Read-onlyIdempotent
Inspect

Calculate the EBITDA margin: EBITDA divided by revenue — operating profitability before interest, tax, depreciation and amortisation, expressed as a share of sales. Formula: EBITDA Margin = EBITDA / Revenue. WHEN TO USE: Use to compare core operating profitability across companies with different capital structures, tax regimes and depreciation policies. WHEN NOT TO USE: Do NOT use when EBITDA is negative (the margin is negative and less meaningful); EBITDA also ignores capital intensity, so pair with return or free-cash-flow metrics. 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 or non-finite inputs returns an explicit error instead of a number. RETURNS: JSON object { ebitda_margin: decimal (e.g. 0.25 = 25%), ebitda_margin_pct: number (e.g. 25.0), inputs }. PARAMETERS: ebitda (required): Earnings before interest, tax, depreciation and amortisation, e.g. 800000. revenue (required): Revenue (net sales) over the same period, e.g. 3200000. Must be > 0.

Inputs: ebitda (required), revenue (required).

calculate_epsA
Read-onlyIdempotent
Inspect

Calculate earnings per share (EPS): net income divided by weighted average shares outstanding — profit attributable to each share. Formula: EPS = Net Income / Weighted Average Shares Outstanding. WHEN TO USE: Use as the denominator for P/E and payout ratios and to track per-share profitability over time. WHEN NOT TO USE: Do NOT use basic share count when convertible securities exist — use diluted shares for a conservative EPS. 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 or non-finite inputs returns an explicit error instead of a number. RETURNS: JSON object { eps: number (currency per share, e.g. 1.25), inputs }. PARAMETERS: net_income (required): Net income attributable to common shareholders, e.g. 1250000. May be negative. weighted_avg_shares_outstanding (required): Weighted average shares outstanding during the period, e.g. 1000000. Must be > 0.

Inputs: net_income (required), weighted_avg_shares_outstanding (required).

calculate_gross_marginA
Read-onlyIdempotent
Inspect

Calculate gross margin: gross profit divided by net sales — the share of revenue retained after the direct cost of goods sold. Formula: Gross Margin = Gross Profit / Net Sales. WHEN TO USE: Use to assess product-level economics and pricing power before operating expenses are considered. WHEN NOT TO USE: Do NOT use gross margin to compare companies with different cost classification practices (COGS boundary varies). 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 or non-finite inputs returns an explicit error instead of a number. RETURNS: JSON object { gross_margin: decimal (e.g. 0.40 = 40%), gross_margin_pct: number (e.g. 40.0), inputs }. PARAMETERS: gross_profit (required): Gross profit = net sales - COGS, e.g. 400000. Must be >= 0. net_sales (required): Net sales / revenue, e.g. 1000000. Must be > 0.

Inputs: net_sales (required), gross_profit (required).

calculate_net_marginA
Read-onlyIdempotent
Inspect

Calculate net margin: net income divided by net sales — the share of every revenue pound/dollar that reaches the bottom line. Formula: Net Margin = Net Income / Net Sales. WHEN TO USE: Use for the all-in profitability picture after operating costs, interest, tax and other items. WHEN NOT TO USE: Do NOT use alone — net margin is affected by capital structure and tax; compare alongside gross and operating margins. 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 or non-finite inputs returns an explicit error instead of a number. RETURNS: JSON object { net_margin: decimal (e.g. 0.12 = 12%), net_margin_pct: number (e.g. 12.0), inputs }. PARAMETERS: net_income (required): Net income after tax, e.g. 120000. May be negative. net_sales (required): Net sales / revenue, e.g. 1000000. Must be > 0.

Inputs: net_sales (required), net_income (required).

calculate_operating_marginA
Read-onlyIdempotent
Inspect

Calculate operating margin: operating income divided by net sales — profitability from core operations before financing and tax. Formula: Operating Margin = Operating Income / Net Sales. WHEN TO USE: Use to compare core business profitability across peers and over time, independent of capital structure. WHEN NOT TO USE: Do NOT use when one-off items distort operating income — consider normalised EBIT instead. 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 or non-finite inputs returns an explicit error instead of a number. RETURNS: JSON object { operating_margin: decimal (e.g. 0.18 = 18%), operating_margin_pct: number (e.g. 18.0), inputs }. PARAMETERS: operating_income (required): Operating income / EBIT, e.g. 180000. May be negative. net_sales (required): Net sales / revenue, e.g. 1000000. Must be > 0.

Inputs: net_sales (required), operating_income (required).

calculate_payout_ratioA
Read-onlyIdempotent
Inspect

Calculate the payout ratio: dividends per share divided by earnings per share — the share of profits distributed as dividends. Formula: Payout Ratio = Dividends Per Share / EPS. WHEN TO USE: Use to judge dividend sustainability: payout above 100% means dividends exceed earnings (funded by debt or reserves). WHEN NOT TO USE: Do NOT use when EPS is negative (ratio is meaningless), and note young growth companies legitimately pay little or nothing. 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 or non-finite inputs returns an explicit error instead of a number. RETURNS: JSON object { payout_ratio: decimal (e.g. 0.55 = 55%), payout_ratio_pct: number (e.g. 55.0), inputs }. PARAMETERS: dividends_per_share (required): Dividends per share in the period, e.g. 1.34. Must be >= 0. earnings_per_share (required): Earnings per share, e.g. 2.43. Must be > 0 for a meaningful ratio.

Inputs: earnings_per_share (required), dividends_per_share (required).

calculate_pb_ratioA
Read-onlyIdempotent
Inspect

Calculate the price-to-book (P/B) ratio: share price divided by book value per share — how much investors pay relative to accounting net asset value. Formula: P/B = Share Price / Book Value Per Share. WHEN TO USE: Use for valuing asset-heavy or financial companies where book value is a meaningful anchor; P/B < 1 can indicate undervaluation or low returns on assets. WHEN NOT TO USE: Do NOT use for asset-light businesses (intangibles make book value meaningless) or where book value is negative. 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 or non-finite inputs returns an explicit error instead of a number. RETURNS: JSON object { pb_ratio: number (e.g. 1.4 = 1.4x), inputs }. PARAMETERS: share_price (required): Current share price, e.g. 45.00. Must be > 0. book_value_per_share (required): Book value per share (shareholders’ equity / shares), e.g. 32.00. Must be > 0 for a meaningful ratio.

Inputs: share_price (required), book_value_per_share (required).

calculate_pe_ratioA
Read-onlyIdempotent
Inspect

Calculate the price-to-earnings (P/E) ratio: share price divided by earnings per share — how much investors pay per unit of earnings. Formula: P/E = Share Price / EPS. WHEN TO USE: Use for relative valuation against peers, sector averages, or a company’s own history. Higher P/E = market expects higher growth. WHEN NOT TO USE: Do NOT use when EPS is negative or near zero (ratio becomes meaningless), and prefer forward P/E for growth companies. 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 or non-finite inputs returns an explicit error instead of a number. RETURNS: JSON object { pe_ratio: number (e.g. 18.5 = 18.5x), earnings_yield: decimal (e.g. 0.054 = 5.4%), earnings_yield_pct: number (e.g. 5.4), inputs }. The earnings yield is the reciprocal of the P/E ratio, returned so a client gets both figures from one call. PARAMETERS: share_price (required): Current share price in currency units, e.g. 45.00. Must be > 0. earnings_per_share (required): Earnings per share (trailing or forward), e.g. 2.43. Must be > 0 for a meaningful ratio.

Inputs: share_price (required), earnings_per_share (required).

calculate_price_to_salesA
Read-onlyIdempotent
Inspect

Calculate the price-to-sales (P/S) ratio: market capitalisation divided by revenue — how much investors pay per unit of sales. Formula: Price-to-Sales = Market Capitalisation / Revenue. WHEN TO USE: Use for valuing companies with no (or negative) earnings where P/E is meaningless — high-growth, early-stage, or cyclical-trough businesses. WHEN NOT TO USE: Do NOT use in isolation — P/S ignores profitability entirely; pair it with margin context (e.g. calculate_net_margin) and compare against peers. 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 or non-finite inputs returns an explicit error instead of a number. RETURNS: JSON object { price_to_sales: number (e.g. 3.0 = 3.0x), inputs }. PARAMETERS: market_capitalization (required): Market capitalisation (share price x shares outstanding), e.g. 9000000. Must be > 0. revenue (required): Revenue (net sales) over the trailing period, e.g. 3000000. Must be > 0.

Inputs: revenue (required), market_capitalization (required).

calculate_return_on_assetsA
Read-onlyIdempotent
Inspect

Calculate return on assets (ROA): net income divided by average total assets — how efficiently a company converts its asset base into profit. Formula: ROA = Net Income / Average Total Assets. WHEN TO USE: Use to measure management’s efficiency in deploying all assets, independent of how they are financed. WHEN NOT TO USE: Do NOT compare ROA across industries with different asset intensity; use ROIC for a cleaner operating view. 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 or non-finite inputs returns an explicit error instead of a number. RETURNS: JSON object { return_on_assets: decimal (e.g. 0.08 = 8%), return_on_assets_pct: number (e.g. 8.0), inputs }. PARAMETERS: net_income (required): Net income after tax, e.g. 84000. May be negative. begin_total_assets (required): Total assets at period start, e.g. 1000000. Must be > 0. end_total_assets (required): Total assets at period end, e.g. 1100000. Must be > 0.

Inputs: net_income (required), end_total_assets (required), begin_total_assets (required).

calculate_return_on_capital_employedA
Read-onlyIdempotent
Inspect

Calculate return on capital employed (ROCE): EBIT divided by capital employed (total assets minus current liabilities) — return generated by the capital actually deployed in the business. Formula: ROCE = EBIT / (Total Assets - Current Liabilities). WHEN TO USE: Use to compare profitability across companies with different capital structures — EBIT (pre-financing) over all capital employed. WHEN NOT TO USE: Do NOT use when capital employed is near zero or negative; prefer ROIC for after-tax operating returns. 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 or non-finite inputs returns an explicit error instead of a number. RETURNS: JSON object { return_on_capital_employed: decimal (e.g. 0.22 = 22%), return_on_capital_employed_pct: number (e.g. 22.0), inputs }. PARAMETERS: ebit (required): Earnings before interest and taxes, e.g. 220000. May be negative. total_assets (required): Total assets, e.g. 1200000. Must be > 0. current_liabilities (required): Total current liabilities, e.g. 200000. Must be >= 0.

Inputs: ebit (required), total_assets (required), current_liabilities (required).

calculate_return_on_equityA
Read-onlyIdempotent
Inspect

Calculate return on equity (ROE): net income divided by average shareholders’ equity — the return earned on the owners’ invested capital. Formula: ROE = Net Income / Average Shareholders’ Equity. WHEN TO USE: Use to assess how well management generates returns for shareholders; decompose via DuPont (margin x turnover x leverage) for drivers. WHEN NOT TO USE: Do NOT use when equity is small or negative (distress / heavy buybacks) — ROE explodes or inverts and misleads. 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 or non-finite inputs returns an explicit error instead of a number. RETURNS: JSON object { return_on_equity: decimal (e.g. 0.15 = 15%), return_on_equity_pct: number (e.g. 15.0), inputs }. PARAMETERS: net_income (required): Net income after tax, e.g. 150000. May be negative. begin_equity (required): Shareholders’ equity at period start, e.g. 950000. Must be > 0. end_equity (required): Shareholders’ equity at period end, e.g. 1050000. Must be > 0.

Inputs: end_equity (required), net_income (required), begin_equity (required).

calculate_return_on_invested_capitalA
Read-onlyIdempotent
Inspect

Calculate return on invested capital (ROIC): NOPAT divided by invested capital — the after-tax operating return on capital invested in the business. Formula: ROIC = NOPAT / Invested Capital. WHEN TO USE: Use to assess value creation: ROIC above the cost of capital creates value; below it destroys value. Core metric for investors. WHEN NOT TO USE: Do NOT use if you lack a clean NOPAT or invested capital figure — inconsistent definitions make ROIC incomparable. 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 or non-finite inputs returns an explicit error instead of a number. RETURNS: JSON object { return_on_invested_capital: decimal (e.g. 0.18 = 18%), return_on_invested_capital_pct: number (e.g. 18.0), inputs }. PARAMETERS: nopat (required): Net operating profit after tax = EBIT x (1 - tax rate), e.g. 180000. May be negative. invested_capital (required): Invested capital (equity + debt - cash, or operating assets - operating liabilities), e.g. 1000000. Must be > 0.

Inputs: nopat (required), invested_capital (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    Try in Browser

    Glama MCP Gateway

    Add one secure layer between your agents and this server.

    Resources