Skip to main content
Glama
PublicDotCom

Public.com MCP Server

Official
by PublicDotCom

get_price_history

Read-only

Fetch historical OHLCV price bars for trend analysis, covering pre-market, regular, and after-hours sessions, with previous close and total gain/loss.

Instructions

Get historical OHLCV price bars for a symbol over a time period.

Returns open/high/low/close/volume bars split into pre-market, regular, and after-hours sessions, plus previous close and total gain/loss. Use this for trend analysis and historical prices — get_quotes returns the current price only, and get_history is account activity, not prices.

Args: symbol: Ticker symbol (e.g. "AAPL"). period: Time window to retrieve (e.g. "YEAR", "TEN_YEARS", "ALL"). instrument_type: EQUITY, CRYPTO, OPTION, or INDEX. Default EQUITY. aggregation: Optional bar size. Prefer omitting it — the server then picks an appropriate size for the period. Only a subset of sizes is valid per period (finer/coarser sizes are rejected); if you set an invalid one, the error lists the valid options. purchase_date: Required only when period is "SINCE_PURCHASE". Format "YYYY-MM-DD". trading_session_toggle: Which sessions to include on the DAY equity chart. Omit for the default (REGULAR_AND_EXTENDED_HOURS, 04:00–20:00 ET). REGULAR_HOURS limits to 09:30–16:00. ALL_SESSIONS returns a full midnight-to-midnight chart including the overnight ATS sessions, adding preMarketOvernight (00:00–04:00) and postMarketOvernight (20:00–24:00) to the response. ipo_date: Optional IPO / first-trade date of the asset. Format "YYYY-MM-DD". When the asset is younger than the requested period, the server fetches a finer aggregation over the available post-IPO history (so the chart isn't a straight diagonal) and adds a leadingFill object to the response describing the flat lead-in to draw for the pre-IPO portion (startTimestamp, endTimestamp, value, count, includedInTotalExpectedBars). Omit for unchanged behavior. Ignored for the DAY chart; leadingFill is also never emitted for the ALL / SINCE_PURCHASE periods.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
periodYes
symbolYes
ipo_dateNo
aggregationNo
purchase_dateNo
instrument_typeNoEQUITY
trading_session_toggleNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

Annotations already mark the tool as read-only and non-destructive, but the description adds substantial behavioral detail: OHLCV bars split into sessions, previous close, total gain/loss, default trading session, and the leadingFill behavior for IPO assets. This goes well beyond the annotations and clarifies edge cases.

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?

The description is structured with an intro, purpose, and a clear Args list. While lengthy, each sentence provides necessary detail—from session definitions to IPO edge-case behavior—with no filler. The front-loaded purpose and organized parameter breakdown make it easy to scan.

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?

Given the tool's complexity (7 parameters, multiple session modes, IPO special cases) and the presence of an output schema, the description covers all essential usage context. It also distinguishes this tool from close siblings and explains conditional requirements, making it fully self-sufficient for an agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has zero description coverage, so the description carries the full burden of explaining parameters. It thoroughly explains every parameter, including valid values, defaults, and dependencies (e.g., IPO date behavior, aggregation constraints, trading session options). This fully compensates for the schema gap.

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?

The description opens with 'Get historical OHLCV price bars for a symbol over a time period,' using a specific verb and resource. It further distinguishes itself from siblings by explicitly contrasting with get_quotes (current price only) and get_history (account activity), making its purpose unmistakable.

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?

The description explicitly states when to use this tool ('for trend analysis and historical prices') and names alternatives with their different scopes. It also provides operational guidance, such as preferring to omit aggregation and noting the purchase_date requirement for SINCE_PURCHASE.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/PublicDotCom/publicdotcom-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server