Skip to main content
Glama
AnteWall

Avanza MCP Server

by AnteWall

get_stock_chart

Retrieve historical stock price chart data (OHLC) for technical analysis and visualization. Specify instrument ID and time period to get open, high, low, close values and volume.

Instructions

Get historical price chart data (OHLC) for a stock.

Retrieves time series price data with Open, High, Low, Close values and volume. Perfect for charting and technical analysis.

Args: ctx: MCP context for logging instrument_id: Avanza instrument ID time_period: Time period for chart data. Options: - "today": Intraday data for today - "one_week": Past week - "one_month": Past month - "three_months": Past 3 months - "this_year": Year to date - "one_year": Past year (default) - "three_years": Past 3 years - "five_years": Past 5 years

Returns: Chart data with OHLC values: - ohlc: Array of data points with timestamp, open, high, low, close, volume - metadata: Chart metadata - from/to: Time range - previousClosingPrice: Previous closing price

Examples: Get 1 year daily data: >>> get_stock_chart(instrument_id="5269", time_period="one_year")

Get past week data:
>>> get_stock_chart(instrument_id="5269", time_period="one_week")

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
instrument_idYes
time_periodNoone_year

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure and does so well. It clearly describes what the tool returns (OHLC data, volume, metadata, time range, previous closing price), the data format (array of data points with specific fields), and includes practical examples. However, it doesn't mention potential limitations like rate limits, data freshness, or error conditions.

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?

The description is well-structured with clear sections (purpose, parameters, returns, examples) and front-loads the core functionality. While comprehensive, some redundancy exists (e.g., 'Get historical price chart data' and 'Retrieves time series price data' convey similar information). Every sentence earns its place, but minor trimming could improve conciseness.

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?

Given the tool's moderate complexity (2 parameters, historical data retrieval), no annotations, but with an output schema, the description provides excellent completeness. It explains what the tool does, documents all parameters thoroughly, describes the return format in detail, and includes practical examples. The output schema existence means the description doesn't need to exhaustively document return values, making this appropriately comprehensive.

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

Parameters5/5

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

The description adds significant value beyond the input schema, which has 0% description coverage. It thoroughly explains both parameters: instrument_id is described as 'Avanza instrument ID', and time_period gets detailed documentation with all 8 possible values and their meanings. This completely compensates for the schema's lack of descriptions and provides essential context for proper tool invocation.

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?

The description clearly states the tool's purpose with specific verbs ('Get historical price chart data', 'Retrieves time series price data') and resources ('for a stock', 'OHLC values and volume'). It distinguishes itself from siblings like get_stock_quote (real-time quotes) and get_stock_info (general information) by focusing specifically on historical chart data for technical analysis.

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

Usage Guidelines4/5

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

The description provides clear context for when to use this tool ('Perfect for charting and technical analysis'), but doesn't explicitly state when not to use it or mention specific alternatives among the sibling tools. It implies usage through examples but lacks explicit guidance about choosing between this and other stock-related tools like get_stock_quote or get_stock_analysis.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/AnteWall/avanza-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server