Skip to main content
Glama
AnteWall

Avanza MCP Server

by AnteWall

get_stock_analysis

Read-onlyIdempotent

Retrieve a specific financial ratio metric for a stock or company by order-book ID, choosing annual, quarterly, or TTM sections with pagination.

Instructions

Get one named metric within a ratio section, paginated in source order.

Select annual, quarterly, quarter-over-quarter, TTM, or company annual ratios. For dividends or financial statements use the dedicated tools. The selected section and metric names are retained inside data; absent fields are omitted. Example metric: priceEarningsRatio for stock ratios, earningsPerShare for company ratios. available_metrics lists the selected section's names. Sibling series and keyRatios summary sections are intentionally excluded, not aggregated. Units and record details are upstream-defined; no normalization is applied.

Input Schema

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

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYes
metricYes
selectionYes
paginationYes
available_metricsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv2.1.0
    • changedOutput schema / properties / data / additionalProperties / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": {
      -      "anyOf": [
      -        {
      -          "items": {
      -            "additionalProperties": true,
      -            "description": "Observed upstream point fields. Values retain their source-specific scale.",
      -            "properties": {
      -              "date": {
      -                "anyOf": [
      -                  {
      -                    "type": "string"
      -                  },
      -                  {
      -                    "type": "null"
      -                  }
      -                ],
      -                "default": null
      -              },
      -              "financialYear": {
      -                "type": "integer"
      -              },
      -              "reportType": {
      -                "type": "string"
      -              },
      -              "value": {
      -                "anyOf": [
      -                  {
      -                    "type": "number"
      -                  },
      -                  {
      -                    "type": "null"
      -                  }
      -                ]
      -              }
      -            },
      -            "required": [
      -              "reportType",
      -              "financialYear",
      -              "value"
      -            ],
      -            "type": "object"
      -          },
      -          "type": "array"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ]
      -    },
      -    "type": "object"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": {
      +      "anyOf": [
      +        {
      +          "items": {
      +            "description": "Observed upstream point fields. Values retain their source-specific scale.",
      +            "properties": {
      +              "date": {
      +                "anyOf": [
      +                  {
      +                    "type": "string"
      +                  },
      +                  {
      +                    "type": "null"
      +                  }
      +                ],
      +                "default": null
      +              },
      +              "financialYear": {
      +                "type": "integer"
      +              },
      +              "reportType": {
      +                "type": "string"
      +              },
      +              "value": {
      +                "anyOf": [
      +                  {
      +                    "type": "number"
      +                  },
      +                  {
      +                    "type": "null"
      +                  }
      +                ]
      +              }
      +            },
      +            "required": [
      +              "reportType",
      +              "financialYear",
      +              "value"
      +            ],
      +            "type": "object"
      +          },
      +          "type": "array"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
  2. Changed12 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": 20,
      +  "maximum": 100,
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • addedInput schema / properties / metric
      Added value: +{
      +  "maxLength": 100,
      +  "minLength": 1,
      +  "pattern": "^[A-Za-z][A-Za-z0-9]*$",
      +  "type": "string"
      +}
    • 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 / selection
      Added value: +{
      +  "default": "stockKeyRatiosByYear",
      +  "enum": [
      +    "stockKeyRatiosByYear",
      +    "stockKeyRatiosByQuarter",
      +    "stockKeyRatiosByQuarterQuarter",
      +    "stockKeyRatiosByQuarterTTM",
      +    "companyKeyRatiosByYear",
      +    "companyKeyRatiosByQuarter",
      +    "companyKeyRatiosByQuarterTTM",
      +    "companyKeyRatiosByQuarterQuarter"
      +  ],
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "instrument_id"
      -]New value: +[
      +  "order_book_id",
      +  "metric"
      +]
    • removedOutput schema / additionalProperties
      Removed value: -true
    • addedOutput schema / description
      Added value: +"One named metric in one selected section, without sibling series or summaries."
    • addedOutput schema / properties
      Added value: +{
      +  "available_metrics": {
      +    "items": {
      +      "type": "string"
      +    },
      +    "type": "array"
      +  },
      +  "data": {
      +    "additionalProperties": {
      +      "anyOf": [
      +        {
      +          "additionalProperties": {
      +            "anyOf": [
      +              {
      +                "items": {
      +                  "additionalProperties": true,
      +                  "description": "Observed upstream point fields. Values retain their source-specific scale.",
      +                  "properties": {
      +                    "date": {
      +                      "anyOf": [
      +                        {
      +                          "type": "string"
      +                        },
      +                        {
      +                          "type": "null"
      +                        }
      +                      ],
      +                      "default": null
      +                    },
      +                    "financialYear": {
      +                      "type": "integer"
      +                    },
      +                    "reportType": {
      +                      "type": "string"
      +                    },
      +                    "value": {
      +                      "anyOf": [
      +                        {
      +                          "type": "number"
      +                        },
      +                        {
      +                          "type": "null"
      +                        }
      +                      ]
      +                    }
      +                  },
      +                  "required": [
      +                    "reportType",
      +                    "financialYear",
      +                    "value"
      +                  ],
      +                  "type": "object"
      +                },
      +                "type": "array"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ]
      +          },
      +          "type": "object"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "type": "object"
      +  },
      +  "metric": {
      +    "type": "string"
      +  },
      +  "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"
      +  },
      +  "selection": {
      +    "type": "string"
      +  }
      +}
    • addedOutput schema / required
      Added value: +[
      +  "selection",
      +  "metric",
      +  "available_metrics",
      +  "data",
      +  "pagination"
      +]
  3. First observedv0.1.0

TDQS

A4.2/5.0
Behavior5/5

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

Annotations already cover safety (readOnly, idempotent, non-destructive, openWorld), and the description adds substantial operational context beyond them: results are paginated in source order, absent fields are omitted, section and metric names are retained inside data, sibling series and keyRatios summaries are intentionally excluded rather than aggregated, and no units normalization is applied. These are exactly the behavioral traits an agent cannot infer from the schema.

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 core purpose is front-loaded in the first sentence and subsequent sentences each carry distinct information (selection values, alternative tools, data retention, excluded sections, normalization policy). It is dense but slightly sprawling, with several short clauses that could be consolidated.

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?

With an output schema present, the description is not obliged to explain return values, and it still usefully discloses that data retains section/metric names and exposes available_metrics. Combined with the selection and exclusion notes, it is nearly complete for a 5-parameter paginated read tool, though the pagination parameters themselves remain unexplained.

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 description coverage is only 20%, so the description must compensate, and it does so for the two most consequential parameters: it gives concrete metric examples (priceEarningsRatio, earningsPerShare) and maps the selection enum values into human-readable annual/quarterly/QoQ/TTM/company terms. It leaves limit and offset unelaborated beyond the general pagination note, which prevents a 5.

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?

The description states a specific verb and resource ('Get one named metric within a ratio section') plus its pagination scope, which is a concrete and unambiguous purpose. It also partially differentiates from siblings by pointing to dedicated tools for dividends and financial statements, though it does not contrast with other ratio-adjacent siblings such as get_stock_info.

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?

It gives clear selection guidance ('Select annual, quarterly, quarter-over-quarter, TTM, or company annual ratios') and explicitly routes dividends and financial-statement needs to dedicated tools. It stops short of stating when-not to use this tool in favor of specific sibling names, so it lacks full exclusion coverage.

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