Skip to main content
Glama
nonnname

T-Invest MCP Server

by nonnname

get_withdraw_limits

Read-only

Retrieve available withdrawal limits for a T-Invest account to understand fund accessibility and plan transactions accordingly.

Instructions

Получить доступные лимиты вывода средств со счёта в Т-Инвестициях

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
accountIdYesИдентификатор счёта (можно получить через get_accounts)

Implementation Reference

  • The handler logic for the 'get_withdraw_limits' tool, which fetches withdrawal limits via the TInvestClient.
    server.tool(
      'get_withdraw_limits',
      'Получить доступные лимиты вывода средств со счёта в Т-Инвестициях',
      {
        accountId: z.string().describe('Идентификатор счёта (можно получить через get_accounts)'),
      },
      READ_ONLY,
      async ({ accountId }) => {
        try {
          const response = await client.post<GetWithdrawLimitsResponse>(
            API_PATHS.OPERATIONS.GET_WITHDRAW_LIMITS,
            { accountId },
          );
    
          const lines: string[] = [];
    
          if (response.money && response.money.length > 0) {
            lines.push('Доступно к выводу:');
            for (const m of response.money) lines.push(`  ${formatMoney(m)}`);
          }
    
          if (response.blocked && response.blocked.length > 0) {
            lines.push('\nЗаблокировано:');
            for (const m of response.blocked) lines.push(`  ${formatMoney(m)}`);
          }
    
          if (response.blockedGuarantee && response.blockedGuarantee.length > 0) {
            lines.push('\nЗаблокировано под гарантийное обеспечение:');
            for (const m of response.blockedGuarantee) lines.push(`  ${formatMoney(m)}`);
          }
    
          return {
            content: [{ type: 'text' as const, text: lines.length > 0 ? lines.join('\n') : 'Данные недоступны.' }],
          };
        } catch (error) {
          return {
            content: [{ type: 'text' as const, text: `Ошибка: ${error instanceof Error ? error.message : String(error)}` }],
            isError: true,
          };
        }
      },
    );
  • The registration function that defines the 'get_withdraw_limits' tool on the McpServer.
    export function registerGetWithdrawLimits(server: McpServer, client: TInvestClient): void {
      server.tool(
        'get_withdraw_limits',
        'Получить доступные лимиты вывода средств со счёта в Т-Инвестициях',
        {
          accountId: z.string().describe('Идентификатор счёта (можно получить через get_accounts)'),
        },
        READ_ONLY,
        async ({ accountId }) => {
          try {
            const response = await client.post<GetWithdrawLimitsResponse>(
              API_PATHS.OPERATIONS.GET_WITHDRAW_LIMITS,
              { accountId },
            );
    
            const lines: string[] = [];
    
            if (response.money && response.money.length > 0) {
              lines.push('Доступно к выводу:');
              for (const m of response.money) lines.push(`  ${formatMoney(m)}`);
            }
    
            if (response.blocked && response.blocked.length > 0) {
              lines.push('\nЗаблокировано:');
              for (const m of response.blocked) lines.push(`  ${formatMoney(m)}`);
            }
    
            if (response.blockedGuarantee && response.blockedGuarantee.length > 0) {
              lines.push('\nЗаблокировано под гарантийное обеспечение:');
              for (const m of response.blockedGuarantee) lines.push(`  ${formatMoney(m)}`);
            }
    
            return {
              content: [{ type: 'text' as const, text: lines.length > 0 ? lines.join('\n') : 'Данные недоступны.' }],
            };
          } 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?

The annotations already declare readOnlyHint=true indicating a safe read operation, but the description adds no behavioral context beyond this. It does not disclose what specific withdrawal limits are returned (daily, per-transaction, currency-specific), error conditions for invalid accounts, or whether the limits are real-time or cached.

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 single-sentence description is appropriately front-loaded with no redundant words. However, it is minimally informative rather than richly concise, lacking supporting details that could help agent reasoning without sacrificing clarity.

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?

For a single-parameter read-only tool without output schema, the description adequately identifies the core function but remains minimal. It does not hint at the return data structure (whether limits are amounts, time windows, or arrays) which would be helpful given the absence of an output schema.

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?

With 100% schema description coverage, the parameter accountId is fully documented in the schema itself. The description mentions 'со счёта' (from account) implicitly referencing the parameter but adds no semantic clarification beyond what the schema already provides. Baseline 3 is appropriate when schema carries full documentation burden.

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 description uses a specific verb (получить/get) and resource (лимиты вывода средств/withdrawal limits) clearly identifying this as a retrieval operation for account withdrawal constraints. It effectively distinguishes from sibling tools like get_portfolio or get_accounts by specifying the exact financial data being accessed.

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 explicit guidance on when to use this tool versus alternatives, nor does it mention prerequisites (though the schema notes accountId can be obtained via get_accounts). There is no indication of when NOT to use it or how it relates to withdrawal execution flows.

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