Skip to main content
Glama
akutishevsky

Monobank MCP Server

get_client_info

Retrieve client details and list all accounts and jars from Monobank.

Instructions

Get information about a client and a list of their accounts and jars. The tool can be called not more than 1 time per 60 seconds, otherwise an error will be thrown.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • src/index.ts:41-62 (registration)
    Registers the 'get_client_info' tool on the MCP server via server.tool(). Defines the name, description, empty schema (no input params), and the async handler function.
    server.tool(
        "get_client_info",
        "Get information about a client and a list of their accounts and jars. The tool can be called not more than 1 time per 60 seconds, otherwise an error will be thrown.",
        {},
        async () => {
            try {
                const { baseUrl, monobankApiToken } = getConfig();
                const response = await fetchWithErrorHandling(
                    `${baseUrl}/personal/client-info`,
                    {
                        headers: {
                            "X-Token": monobankApiToken,
                        },
                    },
                );
                const clientInfo = await parseJsonResponse<ClientInfo>(response);
                return createSuccessResponse(clientInfo);
            } catch (error) {
                return formatErrorAsToolResponse(error, "get client info");
            }
        },
    );
  • The handler function that executes the tool logic: fetches client info from Monobank API at /personal/client-info using the API token, parses the JSON response as ClientInfo type, and returns a success response.
        async () => {
            try {
                const { baseUrl, monobankApiToken } = getConfig();
                const response = await fetchWithErrorHandling(
                    `${baseUrl}/personal/client-info`,
                    {
                        headers: {
                            "X-Token": monobankApiToken,
                        },
                    },
                );
                const clientInfo = await parseJsonResponse<ClientInfo>(response);
                return createSuccessResponse(clientInfo);
            } catch (error) {
                return formatErrorAsToolResponse(error, "get client info");
            }
        },
    );
  • Defines the ClientInfo interface that represents the structure of the API response returned by the get_client_info tool, including clientId, name, webHookUrl, permissions, accounts, and jars.
    export interface ClientInfo {
        clientId: string;
        name: string;
  • The fetchWithErrorHandling helper used by the handler to make authenticated HTTP requests to the Monobank API.
    export async function fetchWithErrorHandling(
        url: string,
        options?: RequestInit,
    ): Promise<Response> {
        const response = await fetch(url, options);
    
        if (!response.ok) {
            const errorText = await response
                .text()
                .catch(() => response.statusText);
            throw new Error(`HTTP ${response.status} - ${errorText}`);
        }
    
        return response;
    }
  • The formatErrorAsToolResponse helper used by the handler to convert errors into proper tool response format.
    export function formatErrorAsToolResponse(
        error: unknown,
        context: string,
    ): ToolResponse {
        if (error instanceof z.ZodError) {
            return createErrorResponse(
                `Invalid ${context} format: ${formatZodError(error)}`,
            );
        }
    
        if (error instanceof Error) {
            return createErrorResponse(
                error.message.startsWith("HTTP")
                    ? `Failed to ${context}: ${error.message}`
                    : `Error ${context}: ${error.message}`,
            );
        }
    
        return createErrorResponse(`Error ${context}: Unknown error`);
    }
Behavior3/5

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

Discloses rate limit (1 per 60s) but does not mention read-only nature or other behavioral traits, leaving gaps without annotations.

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?

Two concise sentences, front-loaded purpose, no filler.

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?

Covers purpose and key constraint; lacks output format details but is adequate for a simple read tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

No parameters exist; baseline for 0 parameters is 4. Description correctly avoids adding unnecessary detail.

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?

Clearly states it retrieves client information, accounts, and jars. Distinct from siblings get_currency_rates and get_statement.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides a rate limit constraint but no guidance on when to use vs alternatives or prerequisites.

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/akutishevsky/monobank-mcp-server'

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