Skip to main content
Glama
FinamWeb

Finam MCP Server

by FinamWeb

market_data_get_last_quote

Retrieve the most recent quote for a financial instrument, including bid/ask prices, open/close values, last trade price, and daily trading volumes.

Instructions

получение последней котировки инструмента (цена покупки/продажи, цена открытия/закрытия, цена последней сделки, дневной объем сделок, объем покупки/продажи)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
symbolYessymbol в формате: SYMBOL@MIC (например, YDEX@MISX)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
quoteYes
symbolYes

Implementation Reference

  • The core handler function for the 'market_data_get_last_quote' tool (prefixed from 'get_last_quote'). It retrieves the last quote using the Finam client.
    @market_data_mcp.tool(tags={"market_data"})
    async def get_last_quote(symbol: Symbol) -> QuoteResponse:
        """получение последней котировки инструмента (цена покупки/продажи, цена открытия/закрытия, цена последней сделки, дневной объем сделок, объем покупки/продажи)"""
        return await get_finam_client().get_last_quote(symbol)
  • src/main.py:13-13 (registration)
    Mounts the market_data_mcp FastMCP instance with 'market_data' prefix, enabling tool names like 'market_data_get_last_quote'.
    finam_mcp.mount(market_data_mcp, prefix="market_data")
  • Pydantic schema definition for the 'symbol' input parameter used in the tool.
    Symbol: type[str] = Annotated[
        str,
        Field(
            description="symbol в формате: SYMBOL@MIC (например, YDEX@MISX)",
            pattern=r"^[A-Z0-9]+@[A-Z]+$",  # Regex валидация
            examples=["YDEX@MISX", "SBER@TQBR"]
        )
    ]
  • Utility function to obtain the FinamClient instance from the MCP context, used by the handler.
    def get_finam_client() -> FinamClient:
        return get_context().get_state("finam_client")
Behavior2/5

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

No annotations are provided, so the description carries full burden. It describes the data returned (prices, volumes) but lacks behavioral details like rate limits, authentication needs, latency, or error conditions. For a read-only tool with no annotations, this is a significant gap in transparency.

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 a single, efficient sentence listing key data fields. It is appropriately sized for a simple retrieval tool, though it could be more front-loaded by stating the core purpose first before details.

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?

Given the tool's low complexity (1 parameter), high schema coverage (100%), and presence of an output schema, the description is reasonably complete. It covers the purpose and data returned, though it lacks behavioral context which is partially mitigated by the structured data.

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 description coverage is 100%, with the symbol parameter well-documented in the schema (format, examples, pattern). The description adds no parameter-specific information beyond implying 'instrument' maps to 'symbol', so it meets the baseline of 3 without compensating value.

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 clearly states the verb 'получение' (retrieval) and the resource 'последней котировки инструмента' (last quote of an instrument), with specific data fields listed. It distinguishes from siblings like market_data_get_bars (historical bars) and market_data_get_last_trades (last trades), though not explicitly named.

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 explicit guidance on when to use this tool versus alternatives like market_data_get_bars for historical data or market_data_get_order_book for depth. The description implies it's for the most recent quote data, but lacks context on prerequisites or exclusions.

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/FinamWeb/finam-mcp'

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