Skip to main content
Glama

Drawdown analysis

analyze_drawdown
Read-onlyIdempotent

Return the worst peak-to-trough decline of each currency vs base, with peak, trough, and recovery dates/days. Use for "how far did it fall and did it recover" questions or to rank the deepest drawdowns. Omit currency to rank the universe (sort deepest or recovery); provide one currency or a list to compare. Use analyze_volatility for dispersion and analyze_safe_haven for crisis behaviour. Defaults: 365-day window, base USD, sort deepest, universe liquid, limit 10. Returns { base, from, to, mode, results[] }; peak/trough dates are omitted and recovery fields are null when there is no drawdown or recovery in the window. Requires a signed-in connection and the Growth plan or higher; each successful call bills 1 API request.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "analyze_drawdown"
  }
}

Input Schema

NameRequiredDescriptionDefault
toNoWindow end YYYY-MM-DD (UTC). Defaults to today.
baseNoBase currency to measure against (3-letter ISO 4217). Defaults to USD.
fromNoWindow start YYYY-MM-DD (UTC). Defaults to 365 days before `to`.
sortNoRanking direction: deepest (largest decline first, default) or recovery (fastest recovery first).
limitNoRanking: how many to return (default 10, max 50).
currencyNoCurrency to measure (3-letter ISO 4217), or a comma-separated list. OMIT to RANK the liquid set by drawdown.
universeNoRanking universe: liquid (default) or majors.

Output Schema

NameRequiredDescriptionDefault
toYes
baseYes
fromYes
modeYes
sortNo
resultsYes
universeNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / properties / sort / enum
      Added value: +[
      +  "deepest",
      +  "recovery"
      +]
    • addedInput schema / properties / universe / enum
      Added value: +[
      +  "liquid",
      +  "majors"
      +]
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "base": {
      +      "type": "string"
      +    },
      +    "from": {
      +      "type": "string"
      +    },
      +    "mode": {
      +      "enum": [
      +        "compare",
      +        "ranking"
      +      ],
      +      "type": "string"
      +    },
      +    "results": {
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "currency": {
      +            "type": "string"
      +          },
      +          "maxDrawdownPct": {
      +            "anyOf": [
      +              {
      +                "type": "number"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ]
      +          },
      +          "note": {
      +            "type": "string"
      +          },
      +          "peakDate": {
      +            "type": "string"
      +          },
      +          "recoveryDate": {
      +            "anyOf": [
      +              {
      +                "type": "string"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ]
      +          },
      +          "recoveryDays": {
      +            "anyOf": [
      +              {
      +                "type": "number"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ]
      +          },
      +          "troughDate": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "currency",
      +          "maxDrawdownPct"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "sort": {
      +      "enum": [
      +        "deepest",
      +        "recovery"
      +      ],
      +      "type": "string"
      +    },
      +    "to": {
      +      "type": "string"
      +    },
      +    "universe": {
      +      "enum": [
      +        "liquid",
      +        "majors"
      +      ],
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "base",
      +    "from",
      +    "to",
      +    "mode",
      +    "results"
      +  ],
      +  "type": "object"
      +}
  2. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already establish read-only/idempotent safety, but the description goes further by disclosing cost (1 API request per successful call), an auth/plan gate (signed-in plus Growth plan), and edge-case semantics (peak/trough dates omitted and recovery fields null when no drawdown or recovery occurs). That is real operational context an agent cannot get from the annotations.

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?

Four sentences, front-loaded with the return value and purpose, then usage, then alternatives, then defaults/contract. Every sentence carries information, though the defaults clause is somewhat redundant with the schema and the paragraph is dense without breaks.

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 seven-parameter analytical tool with an output schema, it covers what's missing elsewhere: cost, plan/auth requirement, mode selection, defaults, and null-recovery behaviour. An agent has everything needed to decide to call it and to interpret an empty or null result.

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, and the description's restatement of defaults (365-day window, USD, deepest, liquid, limit 10) largely duplicates the schema. It earns above baseline by explaining the `currency`-omitted ranking mode and the meaning of `sort` as deepest-vs-fastest-recovery, which frames how parameters interact rather than listing them.

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: 'Return the worst peak-to-trough decline of each currency vs `base`', and names exactly what output it yields (peak, trough, recovery dates/days). This is clearly distinguishable from the dispersion-focused sibling analyze_volatility 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 a concrete question pattern ('how far did it fall and did it recover'), explicit mode selection (omit `currency` to rank; pass one or a list to compare), and names two alternatives with the condition that selects each (analyze_volatility for dispersion, analyze_safe_haven for crisis behaviour). Nothing is left to inference.

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.

Resources