Skip to main content
Glama
AnteWall

Avanza MCP Server

by AnteWall

get_broker_trade_summary

Read-onlyIdempotent

Retrieve broker buy and sell summaries for a Swedish stock order book using its order-book ID. Use it to gauge broker trading flow; results do not identify investor types.

Instructions

Get upstream broker buy/sell summaries; these do not identify investor types.

Input Schema

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

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
summariesYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv2.1.0
    • removedOutput schema / additionalProperties
      Removed value: -true
    • removedOutput schema / properties / summaries / items / additionalProperties
      Removed value: -true
  2. Changed6 schema fields changedv2.0.0
    • addedInput schema / additionalProperties
      Added value: +false
    • removedInput schema / properties / instrument_id
      Removed value: -{
      -  "type": "string"
      -}
    • 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"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "instrument_id"
      -]New value: +[
      +  "order_book_id"
      +]
    • addedOutput schema / properties
      Added value: +{
      +  "summaries": {
      +    "items": {
      +      "additionalProperties": true,
      +      "description": "Summary of broker trades for a stock.",
      +      "properties": {
      +        "brokerCode": {
      +          "type": "string"
      +        },
      +        "brokerName": {
      +          "type": "string"
      +        },
      +        "buyVolume": {
      +          "type": "integer"
      +        },
      +        "netBuyVolume": {
      +          "type": "integer"
      +        },
      +        "sellVolume": {
      +          "type": "integer"
      +        }
      +      },
      +      "required": [
      +        "brokerCode",
      +        "sellVolume",
      +        "buyVolume",
      +        "netBuyVolume",
      +        "brokerName"
      +      ],
      +      "type": "object"
      +    },
      +    "type": "array"
      +  }
      +}
    • addedOutput schema / required
      Added value: +[
      +  "summaries"
      +]
  3. First observedv0.1.0

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnly, idempotent, openWorld and non-destructive, so the safety profile is covered structurally. The description adds one genuine limitation — the summary does not identify investor types — which is useful data-scope context, but nothing about freshness, aggregation method, or auth needs.

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?

One tightly written sentence, scope stated first and the caveat appended. Nothing wasted; every clause earns its place.

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 need not be explained, and annotations carry the safety profile. The description is nearly sufficient for this simple single-parameter reader, with only minor ambiguity about data freshness or source framing left unaddressed.

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

Parameters3/5

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

Schema coverage is 100% and the single order_book_id parameter is fully documented in the schema, including its distinction from instrumentId. With schema doing the heavy lifting, the description adds no extra parameter meaning; baseline 3 applies.

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 upstream broker buy/sell summaries.' The agent knows the retrieval target, and the caveat about investor types sharpens what the data contains. However, it doesn't explicitly position itself against near siblings like get_orderbook or get_recent_trades.

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 guidance on when to call this versus the many other market-data siblings (get_orderbook, get_recent_trades, get_stock_quote). No prerequisites or trigger conditions given beyond the bare purpose.

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