Skip to main content
Glama
PublicDotCom

Public.com MCP Server

Official
by PublicDotCom

get_price_history

Read-only

Retrieve historical open, high, low, close, and volume bars for a stock, crypto, option, or index over a specified time period. Analyze price trends and session-specific data including pre-market and after-hours sessions.

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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
periodYes
symbolYes
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?

Describes return format (OHLCV bars split into sessions, previous close, total gain/loss), aggregation constraints, and trading_session_toggle behavior. No contradiction with annotations (readOnlyHint=true, destructiveHint=false).

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-structured with paragraphs and bullet-like points, but slightly verbose. Could be more concise while retaining clarity.

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 6 parameters, 2 required, enums, and output schema existence, description covers all necessary details for agent to select and invoke correctly. No gaps.

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?

Schema has 0% description coverage, but description fully explains each parameter: purpose, constraints (aggregation validity, purchase_date condition), and defaults (trading_session_toggle behavior). Adds meaning beyond enums.

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?

Description clearly states 'Get historical OHLCV price bars for a symbol over a time period' and distinguishes from siblings: 'get_quotes returns the current price only' and 'get_history is account activity, not prices.'

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?

Explicitly states when to use ('trend analysis and historical prices') and when not, naming alternatives ('get_quotes', 'get_history').

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