Skip to main content
Glama
FinamWeb

Finam MCP Server

by FinamWeb

market_data_get_last_trades

Retrieve recent trade data for specific financial instruments on Russian markets using Finam's trading platform.

Instructions

Получение списка последних сделок по инструменту

Input Schema

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

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
symbolYes
tradesYes

Implementation Reference

  • The core handler function for the 'market_data_get_last_trades' tool. It retrieves the last trades for a given symbol using the Finam client.
    @market_data_mcp.tool(tags={"market_data"})
    async def get_last_trades(symbol: Symbol) -> TradesResponse:
        """Получение списка последних сделок по инструменту"""
        return await get_finam_client().get_last_trades(symbol)
  • src/main.py:11-15 (registration)
    Registers the market_data server with prefix 'market_data', which prefixes tool names like 'get_last_trades' to 'market_data_get_last_trades'.
    finam_mcp = FastMCP("FinamMCP", include_tags=settings.INCLUDE_SERVERS)
    finam_mcp.mount(account_mcp, prefix="account")
    finam_mcp.mount(market_data_mcp, prefix="market_data")
    finam_mcp.mount(assets_mcp, prefix="assets")
    finam_mcp.mount(order_mcp, prefix="order")
  • Pydantic schema 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"]
        )
    ]
  • Helper function to retrieve the Finam client instance from the MCP context, used in 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 the full burden of behavioral disclosure. It states it's a read operation ('Получение' - 'Getting'), implying it's non-destructive, but doesn't mention authentication requirements, rate limits, pagination, or what the output contains (though an output schema exists). For a tool with no annotations, this leaves significant gaps in understanding its behavior.

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?

The description is a single, clear sentence in Russian that directly states the tool's purpose without any fluff. It's front-loaded and efficiently communicates the core function, making it easy to parse quickly. Every word earns its place, and there's no wasted verbiage.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has one parameter with full schema coverage and an output schema, the description is minimally adequate. However, it lacks context on usage guidelines, behavioral traits (like authentication needs), and doesn't leverage the output schema to hint at return values. For a simple read tool, it's functional but could be more informative to fully guide an agent.

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?

The description doesn't add any parameter information beyond what's in the input schema, which has 100% coverage and fully documents the single 'symbol' parameter with examples and pattern. Since schema coverage is high, the baseline is 3, and the description doesn't compensate with additional context like default behavior or constraints, so it remains at 3.

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 action ('Получение' - 'Getting') and resource ('списка последних сделок по инструменту' - 'list of last trades for an instrument'), making the purpose immediately understandable. It distinguishes from siblings like market_data_get_bars (historical data) and market_data_get_last_quote (quote data), though not explicitly. However, it doesn't specify what 'last trades' means (e.g., time window, count), keeping it from a perfect score.

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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention when to choose this over market_data_get_bars (for historical trades) or account_get_trades (for user-specific trades), nor does it specify prerequisites like authentication or rate limits. The context is implied by the tool name but not explicitly stated in the description.

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