Skip to main content
Glama
akutishevsky

Monobank MCP Server

get_statement

Retrieve Monobank transaction statements for specified accounts and date ranges to analyze financial activity and track spending patterns.

Instructions

Get Monobank statement for the time from {from} to {to} time in seconds in Unix time format. The maximum time for which it is posssible to obtain a statement is 31 days + 1 hour (2682000 seconds). The statement can be retrieved not more than once per 60 seconds, otherwise an error will be thrown.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
inputYes

Implementation Reference

  • The 'get_statement' tool is registered and implemented directly in src/index.ts. It defines the input schema using zod and handles the logic for fetching statements from the Monobank API, including date validation, request formatting, and response parsing.
    server.tool(
        "get_statement",
        "Get Monobank statement for the time from {from} to {to} time in seconds in Unix time format. The maximum time for which it is posssible to obtain a statement is 31 days + 1 hour (2682000 seconds). The statement can be retrieved not more than once per 60 seconds, otherwise an error will be thrown.",
        {
            input: z.object({
                account: z
                    .string()
                    .nonempty()
                    .describe(
                        "A unique indentificator of the Monobank account or a jar from the Statement list. If not provided, then a defaukt account is used, which is equal to '0'.",
                    ),
                from: z
                    .string()
                    .nonempty()
                    .describe("A date in ISO 8601 YYYY-MM-DD format."),
                to: z
                    .string()
                    .optional()
                    .describe("A date in ISO 8601 YYYY-MM-DD format."),
            }),
        },
        async ({ input }) => {
            try {
                const { account, from, to } = input;
    
                const dateValidation = validateStatementDates(from, to);
                if ("content" in dateValidation) {
                    return dateValidation;
                }
    
                const { fromInSeconds, toInSeconds } = dateValidation;
                const { baseUrl, monobankApiToken } = getConfig();
    
                const response = await fetchWithErrorHandling(
                    `${baseUrl}/personal/statement/${account}/${fromInSeconds}/${toInSeconds}`,
                    {
                        headers: {
                            "X-Token": monobankApiToken,
                        },
                    },
                );
    
                const data = await parseJsonResponse<StatementItem[]>(response);
                const statement = z.array(StatementItemSchema).parse(data);
                const formattedStatement = formatStatementItems(statement);
    
                return createSuccessResponse(formattedStatement);
            } catch (error) {
                return formatErrorAsToolResponse(error, "fetch statement");
            }
        },
    );
Behavior3/5

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

With no annotations provided, the description carries the full burden. It successfully discloses the 31-day maximum window and the 60-second rate limit with error consequences. However, it incorrectly states that from/to parameters use 'Unix time format' while the schema specifies ISO 8601 dates, creating confusion about invocation behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately concise at three sentences. Information is front-loaded with the core action, followed by constraints. However, the first sentence contains the erroneous Unix time claim, which reduces effectiveness despite the compact structure.

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?

Given the lack of output schema, the description should ideally describe the statement structure or return format, but it does not. It covers rate limiting and time windows adequately but misses authentication requirements (Monobank token) and the specific content of the returned statement. Acceptable but incomplete for a financial data tool.

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

Parameters2/5

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

Although the schema provides descriptions for all three parameters (account, from, to), the description actively contradicts the schema regarding the date format for 'from' and 'to' parameters (claiming Unix time vs schema's ISO 8601). This is more harmful than helpful. It adds no clarity to the 'account' parameter beyond the schema.

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?

The description clearly states the tool retrieves a 'Monobank statement' with specific time bounds, using a concrete verb and resource. It distinguishes from siblings (get_client_info, get_currency_rates) by focusing on transaction statements. However, the time format ambiguity (Unix vs ISO) slightly obscures the precise invocation requirements.

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 is provided on when to use this tool versus get_client_info or get_currency_rates. There are no stated prerequisites, error handling strategies beyond rate limits, or conditions where this should be avoided. Usage is only implied by the resource name.

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