Skip to main content
Glama

getTrailingReturns

Trailing total returns for one fund: 1d, 1w, 1m, 3m, 6m, YTD, 1y-20y, and since inception. Latest by default, or pass as_of (snaps to the prior trading day). Values are decimal fractions of total return, distributions reinvested (0.1234 = +12.34%); 2y and longer are annualized (CAGR). Use batchTrailingReturns for many funds.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathParamsYes
queryParamsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / pathParams / properties / code / description
      Added value: +"The fund's bare ticker, case-sensitive — e.g. `SPY`, `QQQ`, `VTSAX`. If you only have a name, resolve it with searchFunds first."
    • changedInput schema / properties / queryParams / properties / as_of / description
      Previous value: -"As-of date. If it isn't a trading day (weekend/holiday), snaps back to the nearest prior trading day; the response's as_of_date is the actual day returned. Omit for the latest available."New value: +"Return the figures as of this date (`YYYY-MM-DD`). On a weekend or market holiday it snaps back to the nearest prior trading day — the response's `as_of_date` shows the day actually used. Omit for the latest available data."
  2. First observed

TDQS

A4.5/5.0
Behavior5/5

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

With no annotations provided, the description fully discloses the return-value semantics: decimal fractions, distributions reinvested, annualized (CAGR) for 2y and longer, and example 0.1234 = +12.34%. It also explains as_of snapping behavior ('snaps to the prior trading day') and that the latest data is used by default. This is substantial context beyond the schema.

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?

Four tightly packed sentences with no fluff; the core purpose is front-loaded, then keys behavior (default/as_of), then value semantics, then the sibling route. Every sentence adds necessary information and the structure supports quick agent parsing.

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 single-fund returns tool, the description covers periods, default date handling, value format, annualization, and batch alternative. Combined with the detailed schema, an agent has everything needed to call correctly. No output schema exists, but value semantics are explained, making the definition complete.

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?

The schema already provides rich descriptions for all leaf parameters (code, as_of, market), so the baseline is 3. The description echoes some as_of behavior and adds the default/latest nuance, but most parameter meaning remains in the schema. It does not describe the code or market parameters, relying on the schema's existing detail.

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 a specific verb+resource: 'Trailing total returns for one fund' and enumerates the exact periods (1d, 1w, 1m, 3m, 6m, YTD, 1y-20y, since inception). It also names the sibling tool for many funds, clearly distinguishing scope from batchTrailingReturns. This leaves no ambiguity about what the tool does.

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 explicitly routes multi-fund use cases to batchTrailingReturns ('Use batchTrailingReturns for many funds.'), which is a clear when-not alternative. It also states the default behavior and the as_of option, but it does not explicitly contrast with getCalendarReturns, leaving some inference to the agent from the 'trailing' vs 'calendar' naming.

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.