Skip to main content
Glama
avanza-mcp

avanza-mcp

by truls27a

Get Holdings

get_holdings
Read-onlyIdempotent

Retrieves positions, current and acquired values, and cash for one Avanza account or all accounts. Returns live session data when available; otherwise prices snapshot quantities with public quotes.

Instructions

Positions (volume, value, acquired value) and cash, for one account or all. Live with a session, otherwise snapshot quantities priced with live public quotes.

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": "get_holdings"
  }
}

Input Schema

NameRequiredDescriptionDefault
account_idNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive and openWorld, so safety is covered. The description adds genuinely new behavior: results are live when a session exists, otherwise they are snapshot quantities priced with live public quotes, which tells the agent data freshness depends on auth state — a non-obvious trait not in 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.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two short sentences, front-loaded with what is returned and followed by the mode behavior. No padding, no restatement of the title.

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?

An output schema exists, so return values need not be spelled out, and the description still names the key fields. With one optional parameter and full annotation coverage, the definition is nearly complete; only the account_id format and the absence of sibling disambiguation leave a small gap.

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 0%, so the description carries the burden for the single account_id parameter, and it does: 'for one account or all' explains that omitting it (the null default) returns holdings across accounts. That is the key semantic an agent needs, though it does not state the exact identifier format.

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 and resource ('get' + positions and cash) and enumerates the returned fields (volume, value, acquired value). It does not name or contrast any sibling such as get_accounts or get_transactions, so it is clear on what it does but not on how it differs from neighbors.

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

Usage Guidelines3/5

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

'For one account or all' implies the scope choice, and the session/no-session clause hints at which mode an agent will get, but there is no explicit when-to-use or when-not-to-use guidance and no named alternative. Usage is inferable rather than instructed.

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