Skip to main content
Glama
AnteWall

Avanza MCP Server

by AnteWall

search_instruments

Read-onlyIdempotent

Search stocks, funds, ETFs, certificates, or warrants by name, ticker, or ISIN. Filter by instrument type and exchange to retrieve compact instrument identities for market data queries.

Instructions

Search names, tickers or ISINs and return compact instrument identities.

Select by name, type, exchange, ISIN and currency, not rank alone. One page of at most 50 candidates is examined, with stock/fund filtering upstream; other types are filtered locally. All excludes FAQ, unknown types and invalid IDs. Type/ID filtering precedes limit. totalNumberOfHits counts valid matching candidates before limit, not a full filtered universe. candidatesExamined includes discarded hits; upstreamTotalNumberOfHits is before local filtering. No additional pages are fetched. Search is not an authoritative ID registry.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
queryYes
instrument_typeNoall

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
hitsYes
returnedYes
searchQueryYes
totalNumberOfHitsYesValid matching instruments in the examined candidate page, before limit; not a full-universe total.
candidatesExaminedYesNumber of upstream hits examined, including discarded hits; at most 50.
upstreamTotalNumberOfHitsYesUpstream total before local validation/filtering; may include FAQ or other types.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed9 schema fields changedv2.0.0
    • addedInput schema / additionalProperties
      Added value: +false
    • addedInput schema / properties / limit / maximum
      Added value: +50
    • addedInput schema / properties / limit / minimum
      Added value: +1
    • addedInput schema / properties / query / maxLength
      Added value: +200
    • addedInput schema / properties / query / minLength
      Added value: +1
    • addedInput schema / properties / query / pattern
      Added value: +"\\S"
    • removedOutput schema / additionalProperties
      Removed value: -true
    • addedOutput schema / properties
      Added value: +{
      +  "candidatesExamined": {
      +    "description": "Number of upstream hits examined, including discarded hits; at most 50.",
      +    "type": "integer"
      +  },
      +  "hits": {
      +    "items": {
      +      "description": "Curated instrument identity; presentation and highlighting are excluded.",
      +      "properties": {
      +        "currency": {
      +          "anyOf": [
      +            {
      +              "type": "string"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ],
      +          "default": null
      +        },
      +        "exchange": {
      +          "anyOf": [
      +            {
      +              "type": "string"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ]
      +        },
      +        "isin": {
      +          "anyOf": [
      +            {
      +              "type": "string"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ],
      +          "default": null
      +        },
      +        "name": {
      +          "type": "string"
      +        },
      +        "order_book_id": {
      +          "description": "Avanza order-book ID from discovery; not the separate instrumentId.",
      +          "minLength": 1,
      +          "pattern": "^[0-9]+$",
      +          "type": "string"
      +        },
      +        "type": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "order_book_id",
      +        "name",
      +        "type",
      +        "exchange"
      +      ],
      +      "type": "object"
      +    },
      +    "type": "array"
      +  },
      +  "returned": {
      +    "type": "integer"
      +  },
      +  "searchQuery": {
      +    "type": "string"
      +  },
      +  "totalNumberOfHits": {
      +    "description": "Valid matching instruments in the examined candidate page, before limit; not a full-universe total.",
      +    "type": "integer"
      +  },
      +  "upstreamTotalNumberOfHits": {
      +    "description": "Upstream total before local validation/filtering; may include FAQ or other types.",
      +    "type": "integer"
      +  }
      +}
    • addedOutput schema / required
      Added value: +[
      +  "totalNumberOfHits",
      +  "candidatesExamined",
      +  "upstreamTotalNumberOfHits",
      +  "hits",
      +  "searchQuery",
      +  "returned"
      +]
  2. First observedv0.1.0

TDQS

A4.5/5.0
Behavior5/5

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

Even with annotations already declaring readOnly, openWorld, idempotent, and non-destructive behavior, the description adds substantial behavioral detail: at most 50 candidates per page, upstream vs local filtering, exclusion of FAQ/unknown types/invalid IDs, ordering of type/ID filtering before limit, and precise meaning of totalNumberOfHits, candidatesExamined, and upstreamTotalNumberOfHits. It also discloses that no additional pages are fetched and that search is not an authoritative registry.

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 dense but mostly front-loaded, with the core purpose in the first sentence and behavioral caveats following. Every sentence contributes real information, though a few expressions like 'All excludes FAQ' are terse enough that they may require a second read.

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?

The description provides strong coverage of search scope, page size, filtering order, hit-count semantics, and limitations, and the output schema exists so return-value documentation is not needed. It lacks only an explicit routing statement about when to prefer this search tool over filter_* or get_*_details siblings, and it does not give query syntax examples for combined filters.

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?

With 0% schema description coverage, the description compensates by explaining query semantics ('names, tickers or ISINs', 'Select by name, type, exchange, ISIN and currency') and by clarifying limit and instrument_type behavior ('One page of at most 50 candidates', 'stock/fund filtering upstream; other types are filtered locally'). It does not provide a precise syntax for combining the query fields, so some parameter behavior remains underspecified.

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 begins with a specific verb+resource construction: 'Search names, tickers or ISINs and return compact instrument identities.' It clearly distinguishes the tool from the many sibling get/filter tools by emphasizing that it returns search results and identities rather than deep instrument details. The closing caveat, 'Search is not an authoritative ID registry,' further differentiates it from ID-resolution tools like get_instrument_by_order_book_id.

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 text gives clear context about what kinds of lookups are supported: search by name, type, exchange, ISIN, or currency, while warning that rank alone should not be the sole selection criterion. It does not explicitly name sibling alternatives such as filter_etfs or get_stock_info, so the when-to-use-vs-alternatives guidance is mostly implied rather than explicit.

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