Skip to main content
Glama

Compare stocks

compare_stocks
Read-onlyIdempotent

Use to compare companies against each other. Side-by-side headline fundamentals for 2–4 tickers (latest values with as-of context): market cap, close, P/E, P/S, margins, ROE, dividend yield, and 5-year revenue/EPS CAGRs. Uncovered symbols are reported honestly, not dropped silently.

Input Schema

NameRequiredDescriptionDefault
formatNojson (default): the full JSON as text. markdown: a compact table or list, fewer tokens. structuredContent is the full JSON either way.
symbolsYes2–4 ticker symbols

Output Schema

NameRequiredDescriptionDefault
noteYes
stocksYes
compareUrlYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / format
      Added value: +{
      +  "description": "json (default): the full JSON as text. markdown: a compact table or list, fewer tokens. structuredContent is the full JSON either way.",
      +  "enum": [
      +    "json",
      +    "markdown"
      +  ],
      +  "type": "string"
      +}
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": {},
      +  "properties": {
      +    "compareUrl": {
      +      "type": "string"
      +    },
      +    "note": {
      +      "type": "string"
      +    },
      +    "stocks": {
      +      "items": {
      +        "additionalProperties": {},
      +        "properties": {
      +          "covered": {
      +            "type": "boolean"
      +          },
      +          "symbol": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "symbol",
      +          "covered"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    }
      +  },
      +  "required": [
      +    "stocks",
      +    "note",
      +    "compareUrl"
      +  ],
      +  "type": "object"
      +}
  2. First observed

TDQS

A4.3/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 still adds real behavioral context the annotations cannot: values are 'latest with as-of context', and missing symbols 'are reported honestly, not dropped silently' — a meaningful error-handling guarantee.

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?

Two sentences, no filler, front-loaded with the use case and field coverage. The final clause about uncovered symbols is short and carries non-obvious value, so no sentence is wasted.

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 explained. The description covers what is compared, the symbol range, freshness semantics, and missing-symbol behavior — everything an agent needs before invoking it.

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 the symbols array (2–4) and the json/markdown format enum in detail. The description only restates the ticker count and field surface, adding nothing about the format parameter. 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?

Specific verb+resource ('compare companies') with an explicit scope ('side-by-side headline fundamentals for 2–4 tickers') and an enumerated field list. It is clearly distinguished from siblings like get_stock_summary (single stock) and screen_stocks (filtering a universe).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

'Use to compare companies against each other' states the triggering context plainly, and the 2–4 ticker bound makes the multi-company scenario concrete. No explicit when-not or named alternative (e.g., use get_stock_summary for one ticker) is offered, which keeps it short of a 5.

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