Skip to main content
Glama

Stock price

get_stock_price
Read-onlyIdempotent

A share price from Mappit's daily price history: every S&P 500 company back to its first trading day (Apple from 1980-12-12), plus the S&P 500, the Dow, the Nasdaq Composite, bitcoin and ether. With no date: the latest close, the day's change, the 52-week range and the dividend yield. With date: the close on that day, as it traded, and the same price in today's shares when the company has split since. With from/to (or a year or month in date): the change over the span, the return with dividends, the high and low, splits, dividends and a sampled series. End-of-day prices, not live quotes. State and county averages are the indicators stock_day_change_pct, stock_year_return_pct, stock_dividend_yield_pct and stock_dollar_volume in get_statistic and rank_regions.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "company": "<company>"
    },
    "name": "get_stock_price"
  }
}

Input Schema

NameRequiredDescriptionDefault
toNoEnd of a span: "2024-12-31", "2024-12" or "2024". Default: the latest close.
dateNoOne day, "2020-03-23"; or a whole year ("2008") or month ("2020-03") for how it did over that period. Default: the latest close.
fromNoStart of a span: "2020-01-01", "2020-01" or "2020".
companyYesThe company, index or coin: a name ("Apple", "Berkshire Hathaway", "the S&P 500", "bitcoin") or a ticker symbol ("AAPL", "BRK.B").

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 safety is covered. The description adds real value beyond them: end-of-day rather than live pricing, split-adjusted historic prices ('the same price in today's shares when the company has split since'), and the differing return payload per mode including dividends, splits and a sampled series.

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?

Front-loaded with the resource and coverage, then organized around the three parameter modes. Every clause carries information, though the long comma-chained sentences making up the mode descriptions are dense and could be broken into shorter lines for faster scanning.

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?

There is no output schema, so the description carries the burden of explaining return values, and it does: latest close, day's change, 52-week range and dividend yield for the no-date case; close, split-adjusted price for a date; change, total return, high/low, splits, dividends and a sampled series for a span. Nothing an agent needs to choose a mode or interpret the response 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 description goes further by explaining what each parameter combination yields — date alone gives one day (and a year or month value gives behaviour over that period), while from/to gives a span with returns and splits. That is semantic meaning about parameter interaction rather than a restatement of the schema strings.

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?

A specific verb and resource ('A share price from Mappit's daily price history'), followed by the exact coverage universe — S&P 500 back to first trading day, plus the S&P 500, Dow, Nasdaq Composite, bitcoin and ether. The parenthetical example (Apple from 1980-12-12) makes the scope concrete and distinguishes this from general search tools.

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?

It lays out three clear invocation modes — no date for latest close, a single date for that day's close, and from/to (or year/month) for a span — so the agent knows which parameters to combine for which result. It also rules out live quotes ('End-of-day prices, not live quotes') and redirects to get_statistic and rank_regions for state/county aggregates. There is no explicit statement of when not to use this tool at all, which keeps it from 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