Skip to main content
Glama
nonnname

T-Invest MCP Server

by nonnname

get_signals

Read-only

Retrieve trading signals from T-Invest with filters for tickers, time periods, and buy/sell directions to inform investment decisions.

Instructions

Получить торговые сигналы из Т-Инвестиций

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tickersNoФильтр по тикерам (если не указан — все сигналы)
fromNoНачало периода (ISO 8601)
toNoКонец периода (ISO 8601)
directionNoФильтр по направлению: buy — покупка, sell — продажа
limitNoМаксимальное количество сигналов

Implementation Reference

  • The 'get_signals' tool registration and handler implementation. It uses Zod for input validation and communicates with the TInvestClient to fetch trading signals.
    export function registerGetSignals(server: McpServer, client: TInvestClient): void {
      server.tool(
        'get_signals',
        'Получить торговые сигналы из Т-Инвестиций',
        {
          tickers: z.array(z.string()).optional().describe('Фильтр по тикерам (если не указан — все сигналы)'),
          from: z.string().optional().describe('Начало периода (ISO 8601)'),
          to: z.string().optional().describe('Конец периода (ISO 8601)'),
          direction: z
            .enum(['buy', 'sell'])
            .optional()
            .describe('Фильтр по направлению: buy — покупка, sell — продажа'),
          limit: z.number().int().min(1).max(100).default(20).describe('Максимальное количество сигналов'),
        },
        READ_ONLY,
        async ({ tickers, from, to, direction, limit }) => {
          try {
            let instrumentUids: string[] = [];
            if (tickers && tickers.length > 0) {
              const instrumentMap = await resolveTickersToInstruments(client, tickers);
              instrumentUids = Array.from(instrumentMap.values()).map((i) => i.uid);
            }
    
            const body: Record<string, unknown> = {
              paging: { pageNumber: 0, pageSize: limit },
            };
            if (instrumentUids.length === 1) body.instrumentUid = instrumentUids[0];
            if (from) body.from = from;
            if (to) body.to = to;
            if (direction) {
              body.direction = direction === 'buy' ? 'SIGNAL_DIRECTION_BUY' : 'SIGNAL_DIRECTION_SELL';
            }
    
            const response = await client.post<GetSignalsResponse>(
              API_PATHS.SIGNALS.GET_SIGNALS,
              body,
            );
    
            if (!response.signals || response.signals.length === 0) {
              return { content: [{ type: 'text' as const, text: 'Сигналы не найдены.' }] };
            }
    
            const lines = response.signals.map((s) => {
              const parts = [
                `Направление: ${DIRECTION_LABELS[s.direction] ?? s.direction}`,
                `Дата: ${formatDateTime(s.createdAt)}`,
              ];
              if (s.name) parts.push(`Название: ${s.name}`);
              if (s.description) parts.push(`Описание: ${s.description}`);
              if (s.targetPrice) parts.push(`Целевая цена: ${quotationToNumber(s.targetPrice).toFixed(2)}`);
              if (s.openPrice) parts.push(`Цена открытия: ${quotationToNumber(s.openPrice).toFixed(2)}`);
              if (s.validUntil) parts.push(`Действует до: ${formatDateTime(s.validUntil)}`);
              return parts.join('\n');
            });
    
            return { content: [{ type: 'text' as const, text: lines.join(SEPARATOR) }] };
          } catch (error) {
            return {
              content: [{ type: 'text' as const, text: `Ошибка: ${error instanceof Error ? error.message : String(error)}` }],
              isError: true,
            };
          }
        },
      );
    }
Behavior2/5

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

With readOnlyHint already declaring the operation safe, the description adds minimal behavioral context beyond naming the data source ('T-Investments'). It omits what constitutes a signal, pagination behavior, rate limits, or what happens when no signals exist.

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?

Single concise sentence with no redundancy, though front-loaded with the critical verb and resource. However, extreme brevity comes at the cost of explanatory power for a multi-parameter financial tool.

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

Completeness2/5

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

Absent output schema and zero description of return values leaves critical gaps—agents cannot know what signal data structure, fields (price, confidence, timestamps), or format to expect upon successful invocation.

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 clear Russian-language descriptions for all 5 parameters (tickers, date range, direction, limit). The description does not add parameter semantics, but the schema documentation is complete enough that additional text is unnecessary.

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?

Clearly states the specific action (get) and resource (trading signals from T-Investments), but lacks differentiation from sibling tools like get_tech_analysis or get_consensus_forecasts that also provide trading-related 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 (e.g., when to prefer signals over technical analysis or consensus forecasts), nor any prerequisites or filtering recommendations.

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