Skip to main content
Glama

compare_price_performance

Read-onlyIdempotent

Compare daily price performance of up to 8 US or Korean stocks, ETFs, or indices on one aligned calendar, with currency conversion and optional benchmark-relative strength.

Instructions

Compare the daily price performance of 1-8 US or Korean stocks, ETFs or indices on one common trading calendar (상대강도, 기준일 100, 수익률 비교, 코스피와 비교). For 내 보유 종목을 코스피/S&P와 비교: get holdings from investmcp get_holdings, then call this once with their symbols (KR 6-digit codes and US tickers together) and benchmark KOSPI (or SPY/^GSPC). Prefer it for cross-market price history and index levels: it uses the KOSPI index itself (not an ETF proxy such as KODEX 200), aligns calendars, converts USD and KRW holdings into one currency and labels sources. metric: normalized_price (default; every series = 100 on the common base date), price_return_pct, relative_strength_ratio (symbol / benchmark, base 100) or excess_return_pp (return minus the benchmark's, %p); the last two need benchmark (e.g. SPY, QQQ, KOSPI, ^GSPC). If relative strength (상대강도) is asked without a benchmark, the result is normalized_price with a warning naming that choice; pass benchmark for a true relative-strength ratio. Window: period 1mo (default) | 3mo | 6mo | ytd | 1y | d calendar days, or start_date/end_date, or trading_days N (N common trading days ending at the latest one). Symbols: AVGO, BRK.B, 005930 (tries .KS then .KQ), 005930.KS, ^GSPC, aliases KOSPI, KOSDAQ, S&P500, SPX, NASDAQ, NDX; an ETF benchmark is labelled a proxy. currency native | USD | KRW converts with the Yahoo KRW=X close of the same date. Prices are Yahoo daily closes, split-adjusted, dividends excluded: price return, not total return. One symbol failing returns its entry in errors; the rest are still compared. Up to 260 points per series; long windows switch to weekly points (data_quality.sampling). trading_days N counts today's session when a provisional point ends the series. By default the last point is provisional: today's trades (regular session, or pre-market before the open) after the last confirmed close, with provisional=true, session and exchange-local time; the confirmed close replaces it after the close, so no date appears twice. After-hours trades appear in freshness and the summary, never as a point. confirmed_only=true: completed daily closes only. table: period_return_pct to the last point and confirmed_return_pct to the last confirmed close. Text: a one-line summary, then the full result as compact JSON (the same object as structuredContent). Show source_line and warnings under the chart. Read-only calculation; no account access or orders.

Input Schema

NameRequiredDescriptionDefault
metricNonormalized_price
periodNo1mo (default) | 3mo | 6mo | ytd | 1y | <N>d
symbolsYes1-8 symbols, order kept
currencyNonative
end_dateNoYYYY-MM-DD; default today
benchmarkNoe.g. SPY, QQQ, KOSPI, ^GSPC
start_dateNoYYYY-MM-DD; instead of period
trading_daysNoN common trading days; instead of period
confirmed_onlyNofalse (default): include the latest trade as a provisional value; true: completed daily closes only

Output Schema

NameRequiredDescriptionDefault
okYes
as_ofNolast completed (confirmed) daily bar date used, exchange-local; provisional values are dated after it
errorNo
tableNo
errorsNo
metricYes
seriesNo
warningsNoshow under the chart or table
base_dateNo
benchmarkNo
freshnessNoper symbol: last confirmed close, latest trade (session, time, source, delay) and status
base_indexNo
price_modeNolatest (default): the newest trade is included as a provisional value, labelled with its session and time; confirmed_only: completed daily closes onlylatest
metric_unitYesindex (base 100) | percent | ratio index (base 100) | pp
source_lineYesshow under the chart or table
data_qualityYes
latest_as_ofNoUTC time of the newest latest-price trade used; null under confirmed_only or when none is available
retrieved_atYesUTC time of this calculation
currency_modeYes
requested_periodYes
effective_end_dateNo
effective_start_dateNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already cover read-only/idempotent/no-destruction, yet the description adds substantial behavior beyond them: Yahoo daily split-adjusted closes with dividends excluded (price return, not total return), per-symbol error isolation, a 260-point cap with weekly downsampling on long windows, and the provisional-last-point lifecycle (today's trades vs confirmed close, after-hours never becoming a point). That is exactly the mutation/freshness context annotations cannot express.

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?

Purpose and the headline workflow are front-loaded, and nearly every sentence carries non-redundant, decision-relevant detail. It is nonetheless a single dense block of several hundred words mixing window rules, sampling, provisional points and output formatting, which makes scanning harder than it needs to be.

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?

For a 9-parameter, read-only calculation tool with an output schema, the description covers everything an agent needs: symbol formats and aliases, window selection, benchmark requirements, currency handling, error isolation, and even what the text response contains (one-line summary plus compact JSON mirroring structuredContent). Nothing decision-critical is left to inference.

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?

With 78% schema coverage the schema already names parameters, but the description supplies the semantics the schema lacks: what each of the four metric values means (base-100 normalization, symbol/benchmark ratio, return minus benchmark in %p), which metrics require a benchmark, symbol alias resolution (005930 tries .KS then .KQ), the period vs start/end vs trading_days alternatives, and how currency conversion is performed (Yahoo KRW=X same-date close).

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 (compare), resource (daily price performance) and hard scope (1-8 US/Korean stocks, ETFs or indices on one common trading calendar). It also differentiates itself from generic price-history siblings by explaining that it uses the KOSPI index itself rather than an ETF proxy and aligns cross-market calendars, so an agent can tell it apart without opening the schema.

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?

Gives an explicit end-to-end usage recipe ('get holdings from investmcp get_holdings, then call this once with their symbols ... and benchmark KOSPI (or SPY/^GSPC)') and states when to prefer it ('cross-market price history and index levels'). It also routes within the tool: if relative strength is requested without a benchmark, it says what happens and what to pass instead.

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