Skip to main content
Glama
eminsk

yfinance-ta-patterns

by eminsk

Get Macroeconomic Calendar for Asset

ta_get_economic_calendar
Read-only

Fetch live macroeconomic calendar events filtered by the currencies that affect a selected asset symbol, avoiding manual currency lookup.

Instructions

Get macroeconomic calendar events (live verified feed) automatically filtered by the currencies impacting a selected asset symbol (e.g. 'EURUSD=X' -> EUR, USD; 'AAPL' -> USD; 'GBPJPY' -> GBP, JPY; 'BTC-USD' -> USD). Returns an empty list with source='unavailable' if the live feed is unreachable.

Input Schema

NameRequiredDescriptionDefault
daysNoNumber of days ahead from date_from when date_to is omitted (default: 7, max: 60)
symbolYesSelected asset ticker symbol or currency pair (e.g. 'EURUSD=X', 'EUR/USD', 'GBPUSD', 'AAPL', 'BTC-USD', 'SAP.DE')
date_toNoEnd date in YYYY-MM-DD format (defaults to date_from + days)
countriesNoOptional override list of currency codes or countries (e.g. ['USD', 'EUR']). When omitted, automatically resolved from 'symbol'.
date_fromNoStart date in YYYY-MM-DD format (defaults to today UTC)
importancesNoFilter by event importance level: '1' (low), '2' (medium), '3' (high). Also accepts 'low', 'medium', 'high'. Omit for all levels.
max_resultsNoMaximum number of calendar events to return (default: 30, max: 100)

Output Schema

NameRequiredDescriptionDefault
eventsNo
sourceNo
symbolNo
date_toNo
messageNo
date_fromNo
currenciesNo
importancesNo
total_eventsNo
truncated_toNo
filter_countriesNo
normalized_symbolNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.60

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, so the safety profile is covered. The description adds real behavioral context beyond that: the feed is 'live verified' and, on failure, the tool degrades gracefully by returning an empty list with source='unavailable' rather than erroring — a failure mode an agent needs to handle.

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?

Two sentences, zero filler: the first front-loads what the tool does and its filtering logic, the second immediately covers the degraded-return case. Nothing is repeated from the schema or annotations.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return-shape explanation is not required, and the description still notes the empty/source='unavailable' case. Combined with the 100% documented schema, an agent has enough to call it correctly; only usage routing against siblings (e.g. ta_get_news) and any data-source/latency caveats are absent.

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?

Schema description coverage is 100%, so all seven parameters (days, date_from/date_to, countries, importances, max_results) are already documented in the schema itself, including defaults, bounds, and the override behavior of 'countries'. The description reinforces symbol resolution with examples but adds little beyond what the schema already declares.

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?

Specific verb ('Get') plus a precise resource ('macroeconomic calendar events') with the scoping rule spelled out: events are auto-filtered to the currencies implied by the asset symbol. The worked symbol-to-currency examples ('EURUSD=X' -> EUR, USD; 'AAPL' -> USD) make the tool's behavior unambiguous and clearly separate it from ta_get_news or the pattern/scan siblings.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied rather than stated: an agent can infer you call this when you want macro events relevant to a symbol, and the 'countries' param is described as an override of the automatic resolution. But there is no explicit when-to-use guidance, no mention of when to prefer ta_get_news or a raw calendar, and no stated prerequisites.

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