Skip to main content
Glama

profitability-market

calculate_price_to_sales

Read-onlyIdempotent

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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
revenueYesRevenue (net sales) over the trailing period, e.g. 3000000. Must be > 0.
market_capitalizationYesMarket capitalisation (share price x shares outstanding), e.g. 9000000. Must be > 0.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/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 re-stating purity is partly redundant. However, the description adds genuinely new behavior beyond annotations: division-by-zero/non-finite inputs return an explicit error rather than a number, and it discloses the return shape.

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?

Well front-loaded with the definition and formula before the labeled sections; each section earns its place. Slightly verbose in restating the parameter examples and constraints already present in the schema, but overall efficiently organized.

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 describing the return JSON shape ({ price_to_sales, inputs }) and the error case, and it covers inputs, edge cases, and usage context. An agent has everything needed to call it correctly.

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 both parameters including the >0 constraint and examples. The description largely restates these (market_capitalization, revenue, examples, 'must be > 0'), adding no new semantic detail, which is the baseline-3 case.

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 (calculate) and resource (price-to-sales ratio) and spells out the formula (Market Cap / Revenue) and its interpretation. It also implicitly distinguishes itself from earnings-based siblings like calculate_pe_ratio by noting P/S is for cases where P/E is meaningless.

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?

Explicit WHEN TO USE and WHEN NOT TO USE sections name the exact scenario (no/negative earnings, high-growth, early-stage, cyclical-trough) and the alternatives to pair with (calculate_net_margin, peer comparison). Nothing 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.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources