Skip to main content
Glama

profitability-market

calculate_eps

Read-onlyIdempotent

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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
net_incomeYesNet income attributable to common shareholders, e.g. 1250000. May be negative.
weighted_avg_shares_outstandingYesWeighted average shares outstanding during the period, e.g. 1000000. Must be > 0.

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, and the description goes beyond them: it states no side effects, no network or storage access, deterministic identical-input-identical-output behavior, and — most valuably — the division-by-zero/non-finite error contract ('returns an explicit error instead of a number'). This error behavior is not recoverable from annotations and is critical for an agent to anticipate failures.

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 long but well-organized with clear section labels (WHEN TO USE, WHEN NOT TO USE, BEHAVIOUR, RETURNS, PARAMETERS) and front-loads the definition and formula. Each section earns its place; the only minor inefficiency is the PARAMETERS block redundantly repeating schema content already shown in the input schema.

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 2-parameter, no-output-schema, no-nested-object tool, everything an agent needs is present: the calculation formula, input constraints, edge-case error behavior, the JSON return shape ({ eps: number, inputs }), and usage context. Since no output schema exists, the description correctly fills the return-format gap itself.

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% — both parameters are fully documented with meaning, examples, and constraints (negative allowed for net_income; exclusiveMinimum 0 for weighted shares). The description's PARAMETERS section essentially duplicates the schema verbatim, adding no new semantic information, so the high-coverage baseline of 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?

States a specific verb and resource ('Calculate earnings per share'), provides the defining formula (EPS = Net Income / Weighted Average Shares Outstanding), and adds a plain-language interpretation ('profit attributable to each share'). The formula semantics unambiguously distinguish it from all 11 sibling ratio calculators (P/E, margins, ROE, etc.).

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?

Contains explicit WHEN TO USE and WHEN NOT TO USE sections. It tells the agent this tool feeds P/E and payout ratios and supports per-share profitability tracking, and it gives a concrete exclusion: do not use basic share count when convertible securities exist — use diluted shares. This is explicit, actionable routing guidance.

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.7/5.0
Disambiguation5/5

Each tool calculates a distinct financial metric with its own formula, inputs, and output. Even similarly named return-on-capital tools (ROA, ROE, ROCE, ROIC) are clearly differentiated by their denominators and described use cases.

Naming Consistency5/5

All 12 tools follow the exact same calculate_<metric_name> snake_case pattern. The verb is consistent and metric names map directly to the formulas, making the set highly predictable.

Tool Count5/5

Twelve tools is a well-scoped size for a financial ratio calculator covering profitability, return, valuation, and dividend metrics. Each tool addresses a distinct calculation and none feel redundant or unnecessary.

Completeness4/5

The tool surface covers core profitability margins, return ratios, EPS, dividend yield, payout ratio, P/E, and P/B. Minor gaps exist such as price-to-sales, EV/EBITDA, or EBITDA margin, but the primary domain of profitability and market valuation is well represented.

Resources