Skip to main content
Glama
AnteWall

Avanza MCP Server

by AnteWall

get_stock_chart

Read-onlyIdempotent

Fetch raw stock OHLC price points for an Avanza order-book ID over a chosen period, paginated by offset and limit without aggregation.

Instructions

Get a page of raw stock OHLC points in source order, without aggregation.

Offset/limit slice the selected period, not a date range. Metadata describes the full upstream period. Upstream fields live under data, isolated from wrapper pagination keys. Latest available data is not guaranteed real-time.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
offsetNo
time_periodNoone_year
order_book_idYesAvanza order-book ID from discovery; not the separate instrumentId.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYesStock price chart data with OHLC values.
paginationYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv2.1.0
    • removedOutput schema / properties / data / additionalProperties
      Removed value: -true
    • changedOutput schema / properties / data / properties / metadata / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": true,
      -    "description": "Metadata for price chart responses.",
      -    "properties": {
      -      "resolution": {
      -        "anyOf": [
      -          {
      -            "type": "string"
      -          },
      -          {
      -            "additionalProperties": true,
      -            "type": "object"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "default": null
      -      }
      -    },
      -    "type": "object"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "description": "Metadata for price chart responses.",
      +    "properties": {
      +      "resolution": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "description": "Chart resolution metadata.",
      +            "properties": {
      +              "availableResolutions": {
      +                "items": {
      +                  "type": "string"
      +                },
      +                "type": "array"
      +              },
      +              "chartResolution": {
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "chartResolution",
      +              "availableResolutions"
      +            ],
      +            "type": "object"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null
      +      }
      +    },
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedOutput schema / properties / data / properties / ohlc / items / additionalProperties
      Removed value: -true
  2. Changed10 schema fields changedv2.0.0
    • addedInput schema / additionalProperties
      Added value: +false
    • removedInput schema / properties / instrument_id
      Removed value: -{
      -  "type": "string"
      -}
    • addedInput schema / properties / limit
      Added value: +{
      +  "default": 100,
      +  "maximum": 100,
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • addedInput schema / properties / offset
      Added value: +{
      +  "default": 0,
      +  "minimum": 0,
      +  "type": "integer"
      +}
    • addedInput schema / properties / order_book_id
      Added value: +{
      +  "description": "Avanza order-book ID from discovery; not the separate instrumentId.",
      +  "minLength": 1,
      +  "pattern": "^[0-9]+$",
      +  "type": "string"
      +}
    • addedInput schema / properties / time_period / enum
      Added value: +[
      +  "today",
      +  "one_week",
      +  "one_month",
      +  "three_months",
      +  "this_year",
      +  "one_year",
      +  "three_years",
      +  "five_years"
      +]
    • changedInput schema / required
      Previous value: -[
      -  "instrument_id"
      -]New value: +[
      +  "order_book_id"
      +]
    • removedOutput schema / additionalProperties
      Removed value: -true
    • addedOutput schema / properties
      Added value: +{
      +  "data": {
      +    "additionalProperties": true,
      +    "description": "Stock price chart data with OHLC values.",
      +    "properties": {
      +      "from": {
      +        "anyOf": [
      +          {
      +            "type": "integer"
      +          },
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null
      +      },
      +      "metadata": {
      +        "anyOf": [
      +          {
      +            "additionalProperties": true,
      +            "description": "Metadata for price chart responses.",
      +            "properties": {
      +              "resolution": {
      +                "anyOf": [
      +                  {
      +                    "type": "string"
      +                  },
      +                  {
      +                    "additionalProperties": true,
      +                    "type": "object"
      +                  },
      +                  {
      +                    "type": "null"
      +                  }
      +                ],
      +                "default": null
      +              }
      +            },
      +            "type": "object"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null
      +      },
      +      "ohlc": {
      +        "items": {
      +          "additionalProperties": true,
      +          "description": "OHLC (Open, High, Low, Close) data point for price charts.",
      +          "properties": {
      +            "close": {
      +              "type": "number"
      +            },
      +            "high": {
      +              "type": "number"
      +            },
      +            "low": {
      +              "type": "number"
      +            },
      +            "open": {
      +              "type": "number"
      +            },
      +            "timestamp": {
      +              "type": "integer"
      +            },
      +            "totalVolumeTraded": {
      +              "type": "integer"
      +            }
      +          },
      +          "required": [
      +            "timestamp",
      +            "open",
      +            "close",
      +            "low",
      +            "high",
      +            "totalVolumeTraded"
      +          ],
      +          "type": "object"
      +        },
      +        "type": "array"
      +      },
      +      "previousClosingPrice": {
      +        "anyOf": [
      +          {
      +            "type": "number"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null
      +      },
      +      "to": {
      +        "anyOf": [
      +          {
      +            "type": "integer"
      +          },
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null
      +      }
      +    },
      +    "required": [
      +      "ohlc"
      +    ],
      +    "type": "object"
      +  },
      +  "pagination": {
      +    "properties": {
      +      "has_more": {
      +        "type": "boolean"
      +      },
      +      "limit": {
      +        "maximum": 100,
      +        "minimum": 1,
      +        "type": "integer"
      +      },
      +      "offset": {
      +        "minimum": 0,
      +        "type": "integer"
      +      },
      +      "returned": {
      +        "type": "integer"
      +      },
      +      "total": {
      +        "anyOf": [
      +          {
      +            "type": "integer"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "description": "Source count; null when the selected section is unavailable"
      +      }
      +    },
      +    "required": [
      +      "offset",
      +      "limit",
      +      "total",
      +      "returned",
      +      "has_more"
      +    ],
      +    "type": "object"
      +  }
      +}
    • addedOutput schema / required
      Added value: +[
      +  "data",
      +  "pagination"
      +]
  3. First observedv0.1.0

TDQS

A3.6/5.0
Behavior4/5

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

Annotations cover safety (readOnly, idempotent, non-destructive), so the description instead adds genuinely new behavior: pagination semantics (offset/limit slice within period), wrapper vs upstream field layout under 'data', and the non-real-time caveat. That is meaningful disclosure beyond annotations, though return-shape detail is light given an output schema exists.

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 the core purpose in the first sentence, then supporting caveats. Each sentence carries information, though the metadata/data-wrapper sentence is slightly terse for an agent to parse confidently.

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?

Output schema exists so return values needn't be explained. Combined with annotations covering safety and the description covering pagination semantics and the non-real-time caveat, the definition is largely complete for correct invocation. A named sibling contrast would push it higher.

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 only 25%, so the description must compensate, and it does: it clarifies offset/limit slice the selected period (not a date range), and metadata reflects the full upstream period. This resolves the main ambiguity the schema leaves open, though per-parameter enum/range meaning (time_period options) is left to the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource: returns raw OHLC points without aggregation, in source order. The 'raw/no aggregation' framing helps distinguish it from aggregation-oriented siblings, but it doesn't name or contrast with adjacent tools like get_stock_quote or get_marketmaker_chart.

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

Usage Guidelines2/5

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

No explicit when-to-use or when-not-to-use guidance, and no named alternatives. The note that offset/limit slice the period rather than a date range is a helpful clarification but not usage routing.

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