Skip to main content
Glama

Market Indicators

Calculate indicators for a currency pair (ECB)

get_indicators
Read-onlyIdempotent

Calculates indicators for a currency pair. Use it when the user names a currency pair and wants indicators, such as "RSI and MACD for EUR/USD" or "50-day SMA for USD/JPY on the weekly chart". Best for the 30 ECB currencies; it reads the European Central Bank's daily euro reference rates, one closing rate a day. Input tips: pass symbol as two ISO currency codes (for example EUR/USD), interval 1d (default) or 1w, and indicators from sma, ema, rsi, macd and bollinger; optionally periods and series_length. Returns the latest value and a short series for each indicator, with the source and the date of the last rate. Not for: stocks, crypto, forecasts, or buy or sell advice. For atr, stochastic, vwap or any non-currency asset, use compute_indicators with the user's own candles. Informational only, not financial advice; gives no signals.

Example tool call

This call uses example arguments supplied in the tool’s input schema.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "symbol": "EUR/USD",
      "interval": "1d",
      "indicators": [
        "rsi",
        "macd"
      ]
    },
    "name": "get_indicators"
  }
}

Input Schema

NameRequiredDescriptionDefault
symbolYesCurrency pair of two ISO codes, such as "EUR/USD" or "USDJPY". Both codes must be ECB currencies: AUD, BRL, CAD, CHF, CNY, CZK, DKK, EUR, GBP, HKD, HUF, IDR, ILS, INR, ISK, JPY, KRW, MXN, MYR, NOK, NZD, PHP, PLN, RON, SEK, SGD, THB, TRY, USD, ZAR. Not a stock or crypto ticker.
periodsNoLookback length per indicator, in candles, such as {"sma": 50}. Any left out use the default shown. Whole numbers from 2 to 100.
intervalNo1d (one value per ECB fixing, the default) or 1w (the last fixing of each week)
indicatorsYesIndicators to calculate from the ECB closing rates, such as ["rsi", "macd"]: sma, ema, rsi, macd (12, 26, 9) and bollinger (2 standard deviations)
series_lengthNoHow many of the most recent values to return for each indicator, such as 10. 5 by default.

Output Schema

NameRequiredDescriptionDefault
asOfYesDate or time of the last price used, or the date of the call when no price was read
as_ofYesISO 8601 time the data was published by its source or fetched from it. A cached answer keeps the time of its fetch.
errorNoPresent when status is not ok: a stable code, what went wrong and what to do next.
noticeYesNot-financial-advice notice. Show it with the numbers.
sourceYesWho the data comes from, to cite and to check it against.
statusYesok, or why nothing was calculated; error.hint then says what to do next
symbolNoThe pair as BASE/QUOTE; the price is how many QUOTE one BASE costs. Absent when the symbol is not a currency pair.
candlesYesNumber of candles the indicators were calculated over. 0 when the call was refused before any price was read.
libraryYesThe library that did the calculation
skippedYesRequested indicators that could not be calculated, with the reason. Empty when all were calculated.
intervalNoThe interval used
indicatorsYesOne entry per calculated indicator, in the order asked. Empty when status is not ok.
latestCloseYesClose of the last candle or ECB rate. null when no price was read.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "indicators": [
      +      "rsi",
      +      "macd"
      +    ],
      +    "interval": "1d",
      +    "symbol": "EUR/USD"
      +  }
      +]
    • addedOutput schema / properties / as_of
      Added value: +{
      +  "description": "ISO 8601 time the data was published by its source or fetched from it. A cached answer keeps the time of its fetch.",
      +  "type": "string"
      +}
    • changedOutput schema / properties / source / description
      Previous value: -"Where the prices came from"New value: +"Who the data comes from, to cite and to check it against."
    • addedOutput schema / properties / source / properties
      Added value: +{
      +  "name": {
      +    "type": "string"
      +  },
      +  "url": {
      +    "type": "string"
      +  }
      +}
    • addedOutput schema / properties / source / required
      Added value: +[
      +  "name",
      +  "url"
      +]
    • changedOutput schema / properties / source / type
      Previous value: -"string"New value: +"object"
    • changedOutput schema / required
      Previous value: -[
      -  "status",
      -  "candles",
      -  "latestClose",
      -  "indicators",
      -  "skipped",
      -  "notice",
      -  "library",
      -  "source",
      -  "asOf"
      -]New value: +[
      +  "status",
      +  "candles",
      +  "latestClose",
      +  "indicators",
      +  "skipped",
      +  "notice",
      +  "library",
      +  "source",
      +  "asOf",
      +  "as_of"
      +]
  2. Changed26 schema fields changed
    • changedInput schema / properties / indicators / description
      Previous value: -"Indicators to calculate: sma, ema, rsi, macd (12, 26, 9), bollinger (2 standard deviations), atr, stochastic (%K and %D) and vwap (cumulative over the given candles)"New value: +"Indicators to calculate from the ECB closing rates, such as [\"rsi\", \"macd\"]: sma, ema, rsi, macd (12, 26, 9) and bollinger (2 standard deviations)"
    • changedInput schema / properties / indicators / items / enum
      Previous value: -[
      -  "sma",
      -  "ema",
      -  "rsi",
      -  "macd",
      -  "bollinger",
      -  "atr",
      -  "stochastic",
      -  "vwap"
      -]New value: +[
      +  "sma",
      +  "ema",
      +  "rsi",
      +  "macd",
      +  "bollinger"
      +]
    • changedInput schema / properties / indicators / maxItems
      Previous value: -8New value: +5
    • changedInput schema / properties / periods / description
      Previous value: -"Lookback length per indicator, in candles; any left out use the default shown"New value: +"Lookback length per indicator, in candles, such as {\"sma\": 50}. Any left out use the default shown. Whole numbers from 2 to 100."
    • removedInput schema / properties / periods / properties / atr
      Removed value: -{
      -  "description": "14 by default",
      -  "maximum": 100,
      -  "minimum": 2,
      -  "type": "integer"
      -}
    • removedInput schema / properties / periods / properties / stochastic
      Removed value: -{
      -  "description": "14 by default",
      -  "maximum": 100,
      -  "minimum": 2,
      -  "type": "integer"
      -}
    • changedInput schema / properties / series_length / description
      Previous value: -"How many of the most recent values to return for each indicator, 5 by default"New value: +"How many of the most recent values to return for each indicator, such as 10. 5 by default."
    • changedInput schema / properties / symbol / description
      Previous value: -"Currency pair of two ISO codes, such as \"EUR/USD\" or \"USDJPY\""New value: +"Currency pair of two ISO codes, such as \"EUR/USD\" or \"USDJPY\". Both codes must be ECB currencies: AUD, BRL, CAD, CHF, CNY, CZK, DKK, EUR, GBP, HKD, HUF, IDR, ILS, INR, ISK, JPY, KRW, MXN, MYR, NOK, NZD, PHP, PLN, RON, SEK, SGD, THB, TRY, USD, ZAR. Not a stock or crypto ticker."
    • changedOutput schema / properties / asOf / description
      Previous value: -"Date or time of the last price used"New value: +"Date or time of the last price used, or the date of the call when no price was read"
    • changedOutput schema / properties / candles / description
      Previous value: -"Number of candles the indicators were calculated over"New value: +"Number of candles the indicators were calculated over. 0 when the call was refused before any price was read."
    • addedOutput schema / properties / error / properties / code / description
      Added value: +"Stable code, such as invalid_symbol, invalid_prices, invalid_periods or nothing_to_calculate"
    • addedOutput schema / properties / error / properties / hint / description
      Added value: +"The next step: what to change in the call or tell the user"
    • addedOutput schema / properties / error / properties / message / description
      Added value: +"What went wrong"
    • addedOutput schema / properties / indicators / description
      Added value: +"One entry per calculated indicator, in the order asked. Empty when status is not ok."
    • addedOutput schema / properties / indicators / items / oneOf
      Added value: +[
      +  {
      +    "properties": {
      +      "indicator": {
      +        "enum": [
      +          "sma",
      +          "ema"
      +        ],
      +        "type": "string"
      +      },
      +      "latest": {
      +        "description": "One value of the indicator at one candle",
      +        "properties": {
      +          "index": {
      +            "description": "Position of the candle, 0 is the oldest",
      +            "type": "integer"
      +          },
      +          "time": {
      +            "description": "Time of the candle as given, or the ECB rate date; null when the candle had none",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "value": {
      +            "description": "Moving average, in the price unit",
      +            "type": "number"
      +          }
      +        },
      +        "required": [
      +          "index",
      +          "time",
      +          "value"
      +        ],
      +        "type": "object"
      +      },
      +      "params": {
      +        "description": "The settings used",
      +        "properties": {
      +          "period": {
      +            "description": "Lookback in candles",
      +            "type": "integer"
      +          }
      +        },
      +        "required": [
      +          "period"
      +        ],
      +        "type": "object"
      +      },
      +      "series": {
      +        "description": "The most recent values, oldest first, ending with latest",
      +        "items": {
      +          "description": "One value of the indicator at one candle",
      +          "properties": {
      +            "index": {
      +              "description": "Position of the candle, 0 is the oldest",
      +              "type": "integer"
      +            },
      +            "time": {
      +              "description": "Time of the candle as given, or the ECB rate date; null when the candle had none",
      +              "type": [
      +                "string",
      +                "null"
      +              ]
      +            },
      +            "value": {
      +              "description": "Moving average, in the price unit",
      +              "type": "number"
      +            }
      +          },
      +          "required": [
      +            "index",
      +            "time",
      +            "value"
      +          ],
      +          "type": "object"
      +        },
      +        "type": "array"
      +      }
      +    },
      +    "required": [
      +      "indicator",
      +      "params",
      +      "latest",
      +      "series"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "properties": {
      +      "indicator": {
      +        "enum": [
      +          "rsi"
      +        ],
      +        "type": "string"
      +      },
      +      "latest": {
      +        "description": "One value of the indicator at one candle",
      +        "properties": {
      +          "index": {
      +            "description": "Position of the candle, 0 is the oldest",
      +            "type": "integer"
      +          },
      +          "time": {
      +            "description": "Time of the candle as given, or the ECB rate date; null when the candle had none",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "value": {
      +            "description": "RSI, from 0 to 100",
      +            "type": "number"
      +          }
      +        },
      +        "required": [
      +          "index",
      +          "time",
      +          "value"
      +        ],
      +        "type": "object"
      +      },
      +      "params": {
      +        "description": "The settings used",
      +        "properties": {
      +          "period": {
      +            "description": "Lookback in candles",
      +            "type": "integer"
      +          }
      +        },
      +        "required": [
      +          "period"
      +        ],
      +        "type": "object"
      +      },
      +      "series": {
      +        "description": "The most recent values, oldest first, ending with latest",
      +        "items": {
      +          "description": "One value of the indicator at one candle",
      +          "properties": {
      +            "index": {
      +              "description": "Position of the candle, 0 is the oldest",
      +              "type": "integer"
      +            },
      +            "time": {
      +              "description": "Time of the candle as given, or the ECB rate date; null when the candle had none",
      +              "type": [
      +                "string",
      +                "null"
      +              ]
      +            },
      +            "value": {
      +              "description": "RSI, from 0 to 100",
      +              "type": "number"
      +            }
      +          },
      +          "required": [
      +            "index",
      +            "time",
      +            "value"
      +          ],
      +          "type": "object"
      +        },
      +        "type": "array"
      +      }
      +    },
      +    "required": [
      +      "indicator",
      +      "params",
      +      "latest",
      +      "series"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "properties": {
      +      "indicator": {
      +        "enum": [
      +          "macd"
      +        ],
      +        "type": "string"
      +      },
      +      "latest": {
      +        "description": "One value of the indicator at one candle",
      +        "properties": {
      +          "histogram": {
      +            "description": "MACD minus signal",
      +            "type": "number"
      +          },
      +          "index": {
      +            "description": "Position of the candle, 0 is the oldest",
      +            "type": "integer"
      +          },
      +          "macd": {
      +            "description": "MACD line",
      +            "type": "number"
      +          },
      +          "signal": {
      +            "description": "Signal line",
      +            "type": "number"
      +          },
      +          "time": {
      +            "description": "Time of the candle as given, or the ECB rate date; null when the candle had none",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          }
      +        },
      +        "required": [
      +          "index",
      +          "time",
      +          "macd",
      +          "signal",
      +          "histogram"
      +        ],
      +        "type": "object"
      +      },
      +      "params": {
      +        "description": "The settings used",
      +        "properties": {
      +          "fast": {
      +            "description": "Fast EMA length (12)",
      +            "type": "integer"
      +          },
      +          "signal": {
      +            "description": "Signal EMA length (9)",
      +            "type": "integer"
      +          },
      +          "slow": {
      +            "description": "Slow EMA length (26)",
      +            "type": "integer"
      +          }
      +        },
      +        "required": [
      +          "fast",
      +          "slow",
      +          "signal"
      +        ],
      +        "type": "object"
      +      },
      +      "series": {
      +        "description": "The most recent values, oldest first, ending with latest",
      +        "items": {
      +          "description": "One value of the indicator at one candle",
      +          "properties": {
      +            "histogram": {
      +              "description": "MACD minus signal",
      +              "type": "number"
      +            },
      +            "index": {
      +              "description": "Position of the candle, 0 is the oldest",
      +              "type": "integer"
      +            },
      +            "macd": {
      +              "description": "MACD line",
      +              "type": "number"
      +            },
      +            "signal": {
      +              "description": "Signal line",
      +              "type": "number"
      +            },
      +            "time": {
      +              "description": "Time of the candle as given, or the ECB rate date; null when the candle had none",
      +              "type": [
      +                "string",
      +                "null"
      +              ]
      +            }
      +          },
      +          "required": [
      +            "index",
      +            "time",
      +            "macd",
      +            "signal",
      +            "histogram"
      +          ],
      +          "type": "object"
      +        },
      +        "type": "array"
      +      }
      +    },
      +    "required": [
      +      "indicator",
      +      "params",
      +      "latest",
      +      "series"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "properties": {
      +      "indicator": {
      +        "enum": [
      +          "bollinger"
      +        ],
      +        "type": "string"
      +      },
      +      "latest": {
      +        "description": "One value of the indicator at one candle",
      +        "properties": {
      +          "index": {
      +            "description": "Position of the candle, 0 is the oldest",
      +            "type": "integer"
      +          },
      +          "lower": {
      +            "description": "Lower band",
      +            "type": "number"
      +          },
      +          "middle": {
      +            "description": "Middle band (the SMA)",
      +            "type": "number"
      +          },
      +          "time": {
      +            "description": "Time of the candle as given, or the ECB rate date; null when the candle had none",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "upper": {
      +            "description": "Upper band",
      +            "type": "number"
      +          }
      +        },
      +        "required": [
      +          "index",
      +          "time",
      +          "lower",
      +          "middle",
      +          "upper"
      +        ],
      +        "type": "object"
      +      },
      +      "params": {
      +        "description": "The settings used",
      +        "properties": {
      +          "deviations": {
      +            "description": "Band width in standard deviations (2)",
      +            "type": "integer"
      +          },
      +          "period": {
      +            "description": "Lookback in candles",
      +            "type": "integer"
      +          }
      +        },
      +        "required": [
      +          "period",
      +          "deviations"
      +        ],
      +        "type": "object"
      +      },
      +      "series": {
      +        "description": "The most recent values, oldest first, ending with latest",
      +        "items": {
      +          "description": "One value of the indicator at one candle",
      +          "properties": {
      +            "index": {
      +              "description": "Position of the candle, 0 is the oldest",
      +              "type": "integer"
      +            },
      +            "lower": {
      +              "description": "Lower band",
      +              "type": "number"
      +            },
      +            "middle": {
      +              "description": "Middle band (the SMA)",
      +              "type": "number"
      +            },
      +            "time": {
      +              "description": "Time of the candle as given, or the ECB rate date; null when the candle had none",
      +              "type": [
      +                "string",
      +                "null"
      +              ]
      +            },
      +            "upper": {
      +              "description": "Upper band",
      +              "type": "number"
      +            }
      +          },
      +          "required": [
      +            "index",
      +            "time",
      +            "lower",
      +            "middle",
      +            "upper"
      +          ],
      +          "type": "object"
      +        },
      +        "type": "array"
      +      }
      +    },
      +    "required": [
      +      "indicator",
      +      "params",
      +      "latest",
      +      "series"
      +    ],
      +    "type": "object"
      +  }
      +]
    • removedOutput schema / properties / indicators / items / properties
      Removed value: -{
      -  "indicator": {
      -    "enum": [
      -      "sma",
      -      "ema",
      -      "rsi",
      -      "macd",
      -      "bollinger",
      -      "atr",
      -      "stochastic",
      -      "vwap"
      -    ],
      -    "type": "string"
      -  },
      -  "latest": {
      -    "description": "One value of the indicator: the candle's position (0 is the first), its time when one was given, and the value or values",
      -    "properties": {
      -      "d": {
      -        "type": "number"
      -      },
      -      "histogram": {
      -        "type": "number"
      -      },
      -      "index": {
      -        "type": "integer"
      -      },
      -      "k": {
      -        "type": "number"
      -      },
      -      "lower": {
      -        "type": "number"
      -      },
      -      "macd": {
      -        "type": "number"
      -      },
      -      "middle": {
      -        "type": "number"
      -      },
      -      "signal": {
      -        "type": "number"
      -      },
      -      "time": {
      -        "type": [
      -          "string",
      -          "null"
      -        ]
      -      },
      -      "upper": {
      -        "type": "number"
      -      },
      -      "value": {
      -        "type": "number"
      -      }
      -    },
      -    "required": [
      -      "index",
      -      "time"
      -    ],
      -    "type": "object"
      -  },
      -  "params": {
      -    "description": "The settings used",
      -    "type": "object"
      -  },
      -  "series": {
      -    "description": "The most recent values, oldest first, ending with latest",
      -    "items": {
      -      "description": "One value of the indicator: the candle's position (0 is the first), its time when one was given, and the value or values",
      -      "properties": {
      -        "d": {
      -          "type": "number"
      -        },
      -        "histogram": {
      -          "type": "number"
      -        },
      -        "index": {
      -          "type": "integer"
      -        },
      -        "k": {
      -          "type": "number"
      -        },
      -        "lower": {
      -          "type": "number"
      -        },
      -        "macd": {
      -          "type": "number"
      -        },
      -        "middle": {
      -          "type": "number"
      -        },
      -        "signal": {
      -          "type": "number"
      -        },
      -        "time": {
      -          "type": [
      -            "string",
      -            "null"
      -          ]
      -        },
      -        "upper": {
      -          "type": "number"
      -        },
      -        "value": {
      -          "type": "number"
      -        }
      -      },
      -      "required": [
      -        "index",
      -        "time"
      -      ],
      -      "type": "object"
      -    },
      -    "type": "array"
      -  }
      -}
    • removedOutput schema / properties / indicators / items / required
      Removed value: -[
      -  "indicator",
      -  "params",
      -  "latest",
      -  "series"
      -]
    • removedOutput schema / properties / indicators / items / type
      Removed value: -"object"
    • addedOutput schema / properties / interval / description
      Added value: +"The interval used"
    • addedOutput schema / properties / latestClose / description
      Added value: +"Close of the last candle or ECB rate. null when no price was read."
    • addedOutput schema / properties / notice / description
      Added value: +"Not-financial-advice notice. Show it with the numbers."
    • changedOutput schema / properties / skipped / description
      Previous value: -"Requested indicators that could not be calculated, with the reason"New value: +"Requested indicators that could not be calculated, with the reason. Empty when all were calculated."
    • addedOutput schema / properties / skipped / items / properties / indicator / enum
      Added value: +[
      +  "sma",
      +  "ema",
      +  "rsi",
      +  "macd",
      +  "bollinger"
      +]
    • addedOutput schema / properties / skipped / items / properties / reason / description
      Added value: +"Why, such as too few candles or a missing high, low or volume"
    • addedOutput schema / properties / status / description
      Added value: +"ok, or why nothing was calculated; error.hint then says what to do next"
    • changedOutput schema / properties / symbol / description
      Previous value: -"The pair as BASE/QUOTE; the price is how many QUOTE one BASE costs"New value: +"The pair as BASE/QUOTE; the price is how many QUOTE one BASE costs. Absent when the symbol is not a currency pair."
  3. Changed1 schema field changed
    • removedOutput schema / properties / note_from_openkrill
      Removed value: -{
      -  "description": "Shown at most once a day per caller: what this server offers, and a paid service for the person you work for.",
      -  "type": "string"
      -}
  4. Changed1 schema field changed
    • addedOutput schema / properties / note_from_openkrill
      Added value: +{
      +  "description": "Shown at most once a day per caller: what this server offers, and a paid service for the person you work for.",
      +  "type": "string"
      +}
  5. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already cover read-only, idempotent and open-world traits, yet the description adds non-obvious behavior: the data source is ECB daily euro reference rates with one closing value per day, and it returns the latest value plus a short series with source and last rate date. It also discloses the informational-only, no-signals stance, which is behavior an agent must convey.

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?

Front-loaded with purpose and trigger examples, then input tips, returns, and exclusions in a logical order. It is long but nearly every sentence carries distinct information; only the input tips lightly restate the schema.

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?

Despite an output schema and full schema coverage, the description supplies what structured fields cannot: the ECB source and cadence, the currencies scope, and the negative constraints. An agent has everything needed to select and call this correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3; the description adds a compact input recipe covering symbol format, interval default, the indicator vocabulary and the optional periods/series_length. It reinforces but does not materially extend what the schema already documents in 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?

States a specific verb and resource ("Calculates indicators for a currency pair") and immediately scopes it to ECB currency pairs. It names the sibling it is not for atr/stochastic/vwap or non-currency assets and routes to compute_indicators, so an agent can distinguish it without opening either 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 concrete trigger examples ("RSI and MACD for EUR/USD", "50-day SMA for USD/JPY on the weekly chart") plus explicit exclusions ("Not for: stocks, crypto, forecasts, or buy or sell advice"). It names the alternative tool and the exact condition that selects it.

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.