Build a like-for-like comparison window
kyrodata_resolve_comparison_windowResolves an equal-length comparison window (like-for-like) for the trade data, anchored on the last fully published month, and returns ONLY the window metadata — from, to, label, months and whether it crosses a season. No figures. mode splits into two families, and the split is what matters: quarterly, semestral, annual, ytd and rolling_3m/6m/12m compare against the same period a year earlier and hold the season constant, while monthly and semestral_sequential compare against the period immediately before and therefore cross one. ytd runs January to the last published month, in both years. This exists to NAME a window in prose before it is described. The same window resolved internally and answered with value and volume in one call is kyrodata_compare_trade. Credit class: free (0 credits).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | Yes | Which pair of equal-length windows to compare. Against the same period a year earlier: `quarterly`, `semestral`, `annual`, `ytd` (January to the last published month) and `rolling_3m`/`6m`/`12m`. Against the period immediately before, which crosses a season: `monthly` and `semestral_sequential`. Use `ytd` when the question names no period. | |
| response_format | No | How much of the answer to return. `concise` (the default) carries the headline figures; `detailed` adds the row-level series behind them and counts against the export quota. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | Raw numbers behind the text. | |
| memo | Yes | true = identical call in the last 10 min, served again: 0 credits. | |
| rows | No | Table rows; detailed only, capped per tool. | |
| error | No | Failure message when status = error. | |
| links | Yes | screen = product page with these numbers. | |
| denied | No | When status = denied: reason, feature, upgradeUrl. | |
| status | Yes | ok = data; denied = plan; error = failure or timeout. | |
| window | No | Like-for-like window: from, to (YYYY-MM), label, months, crossesSeason. | |
| caveats | Yes | Reading caveats. | |
| credits | Yes | charged, balance (null = unlimited), resetAt, session {charged, endsAt} of the 60-s billing session. | |
| sources | Yes | Per source: label, nameable, asOf. | |
| dataVersion | Yes | Identity of the data that answered. |