Skip to main content
Glama
nonnname

T-Invest MCP Server

by nonnname

get_bond_coupons

Read-only

Retrieve bond coupon payment schedules from T-Invest for specified tickers and date ranges to track upcoming income and plan investments.

Instructions

Получить расписание купонных выплат по облигациям из Т-Инвестиций

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tickersYesМассив тикеров облигаций
fromNoНачало периода (ISO 8601)
toNoКонец периода (ISO 8601)

Implementation Reference

  • The handler implementation and registration for the 'get_bond_coupons' MCP tool.
    export function registerGetBondCoupons(server: McpServer, client: TInvestClient): void {
      server.tool(
        'get_bond_coupons',
        'Получить расписание купонных выплат по облигациям из Т-Инвестиций',
        {
          tickers: z.array(z.string()).min(1).max(50).describe('Массив тикеров облигаций'),
          from: z.string().optional().describe('Начало периода (ISO 8601)'),
          to: z.string().optional().describe('Конец периода (ISO 8601)'),
        },
        READ_ONLY,
        async ({ tickers, from, to }) => {
          try {
            const instrumentMap = await resolveTickersToInstruments(client, tickers);
            const notFound = tickers.filter((t) => !instrumentMap.has(t.toUpperCase()));
            const results: string[] = [];
    
            await Promise.allSettled(
              tickers
                .filter((t) => instrumentMap.has(t.toUpperCase()))
                .map(async (ticker) => {
                  const instrument = instrumentMap.get(ticker.toUpperCase())!;
                  const body: Record<string, unknown> = { figi: instrument.figi };
                  if (from) body.from = from;
                  if (to) body.to = to;
    
                  try {
                    const resp = await client.post<GetBondCouponsResponse>(
                      API_PATHS.INSTRUMENTS.GET_BOND_COUPONS,
                      body,
                    );
    
                    if (!resp.events || resp.events.length === 0) {
                      results.push(`${ticker}: купоны не найдены`);
                      return;
                    }
    
                    const couponLines = resp.events.map((c) => {
                      const parts = [
                        `  Дата выплаты: ${formatDate(c.couponDate)}`,
                        `  Тип: ${COUPON_TYPE_LABELS[c.couponType] ?? c.couponType}`,
                      ];
                      if (c.payOneBond) parts.push(`  Выплата на бумагу: ${formatMoney(c.payOneBond)}`);
                      if (c.couponPeriod) parts.push(`  Период (дней): ${c.couponPeriod}`);
                      return parts.join('\n');
                    });
    
                    results.push(`${ticker}:\n${couponLines.join('\n\n')}`);
                  } catch {
                    results.push(`${ticker}: ошибка запроса`);
                  }
                }),
            );
    
            if (notFound.length > 0) results.push(`\nНе найдены: ${notFound.join(', ')}`);
    
            return {
              content: [{ type: 'text' as const, text: results.length > 0 ? 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 cover read-only safety (readOnlyHint: true). Description adds valuable context that data comes from 'Т-Инвестиций' (T-Investments), indicating external data source dependency. However, lacks details on return format, pagination, or rate limits.

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?

Single efficient sentence with no redundancy. Immediately identifies operation and scope. Every word earns its place.

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 data retrieval tool. Mentions specific data source (T-Investments). Given 100% schema coverage and readOnly annotation, only minor gap is lack of output format description (no output schema provided).

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 has 100% description coverage (all 3 parameters documented in Russian). Description itself adds no parameter details, so baseline 3 is appropriate per calibration guidelines for high-coverage schemas.

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?

Clear specific verb 'Получить' (Get) with specific resource 'расписание купонных выплат по облигациям' (bond coupon payment schedules). Explicitly mentions bonds, distinguishing it from sibling get_dividends (stocks) and trading tools.

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 vs alternatives, nor mention that 'from'/'to' parameters are optional while 'tickers' is required. No prerequisites or conditions mentioned.

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