Skip to main content
Glama
nonnname

T-Invest MCP Server

by nonnname

get_asset_fundamentals

Read-only

Retrieve fundamental financial metrics for companies using their stock ticker symbols to analyze investment opportunities and assess company performance.

Instructions

Получить фундаментальные показатели компаний по тикерам

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tickersYesМассив тикеров (до 100)

Implementation Reference

  • The registration function `registerGetAssetFundamentals` contains the handler logic for the `get_asset_fundamentals` tool, including input validation, instrument resolution, API call, and response formatting.
    export function registerGetAssetFundamentals(server: McpServer, client: TInvestClient): void {
      server.tool(
        'get_asset_fundamentals',
        'Получить фундаментальные показатели компаний по тикерам',
        {
          tickers: z.array(z.string()).min(1).max(100).describe('Массив тикеров (до 100)'),
        },
        READ_ONLY,
        async ({ tickers }) => {
          try {
            // Для фундаментала не фильтруем по apiTradeAvailableFlag — нужны все инструменты
            const instrumentMap = await resolveTickersToInstruments(
              client, tickers, { apiTradeAvailableFlag: false },
            );
    
            const notFound = tickers.filter((t) => !instrumentMap.has(t.toUpperCase()));
    
            if (instrumentMap.size === 0) {
              return {
                content: [{ type: 'text' as const, text: 'Инструменты по указанным тикерам не найдены.' }],
                isError: true,
              };
            }
    
            const uidToTicker = new Map(
              Array.from(instrumentMap.entries()).map(([ticker, inst]) => [inst.uid, ticker]),
            );
    
            const response = await client.post<GetAssetFundamentalsResponse>(
              API_PATHS.INSTRUMENTS.GET_ASSET_FUNDAMENTALS,
              { assets: Array.from(uidToTicker.keys()) },
            );
    
            if (!response.fundamentals || response.fundamentals.length === 0) {
              return { content: [{ type: 'text' as const, text: 'Фундаментальные данные не найдены.' }] };
            }
    
            const results: string[] = [];
            for (const fundamental of response.fundamentals) {
              const ticker = uidToTicker.get(fundamental.assetUid ?? '') ?? 'N/A';
              results.push(formatFundamental(ticker, fundamental));
            }
    
            if (notFound.length > 0) {
              results.push(`\nНе найдены тикеры: ${notFound.join(', ')}`);
            }
    
            return { content: [{ type: 'text' as const, text: results.join(SEPARATOR) }] };
          } catch (error) {
            return {
              content: [{ type: 'text' as const, text: `Ошибка: ${error instanceof Error ? error.message : String(error)}` }],
              isError: true,
            };
          }
        },
      );
    }
Behavior3/5

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

Annotations declare readOnlyHint=true, covering the safety profile. The description adds scoping context (limit to companies/companies only, up to 100 tickers implied by parameter), but omits error handling for invalid tickers, data freshness/staleness, whether partial results are returned, or response format details.

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?

Extremely concise at 6 words. Single sentence with action-front-loaded structure. Every word earns its place—no redundancy or filler. Efficiently conveys the essential operation without waste.

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?

Adequate for a simple, single-parameter read-only tool with 100% schema coverage. Given the annotations handle the safety profile and the schema documents the input, the description successfully conveys the core purpose. Minor gap: no mention of output structure, but acceptable given the tool's limited complexity.

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% with the parameter 'tickers' well-documented as 'Массив тикеров (до 100)'. The description mentions 'по тикерам' (by tickers), confirming the parameter concept, but adds no syntactic details, format requirements, or examples beyond what the schema already provides. Baseline 3 is appropriate given high schema coverage.

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 Russian description 'Получить фундаментальные показатели компаний по тикерам' uses a specific verb (получить/get), resource (фундаментальные показатели/fundamental indicators), and input method (по тикерам/by tickers). It clearly distinguishes from siblings like get_last_prices, get_candles, and get_tech_analysis by specifying fundamental data rather than price or technical data.

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?

Provides no guidance on when to use this tool versus alternatives. No mention of why fundamental analysis might be preferred over get_tech_analysis, or when to combine with get_dividends or get_candles. No prerequisites or constraints beyond the schema are described.

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/nonnname/t-invest-mcp-server'

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