Skip to main content
Glama
Aler1x
by Aler1x

get_client_info

Retrieve client information, account details, and jar data from Monobank using API authentication.

Instructions

Get client information from Monobank API. This tool retrieves information about the client, their accounts, and jars. It requires a Monobank API token with the necessary permissions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function that implements the 'get_client_info' tool. It fetches client information from the Monobank API using an API token from environment variables and returns the data as a formatted JSON string in the expected MCP tool response format.
    async function getClientInfo() {
        /**
       * Get client information from Monobank API.
       * 
       * This tool retrieves information about the client, their accounts, and jars.
       * It requires a Monobank API token with the necessary permissions.
       */
      try {
        const token = process.env.MONOBANK_API_TOKEN;
        
        const response = await fetch(`https://api.monobank.ua/personal/client-info`, {
          headers: {
            "X-Token": token || "X_TOKEN_PLACEHOLDER",
          },
        });
    
        if (!response.ok) {
          const errorText = await response.text();
          throw new Error(`HTTP error! status: ${response.status}, body: ${errorText}`);
        }
    
        const data: ClientInfo = await response.json() as ClientInfo;
        return {
          content: [
            {
              type: "text",
              text: JSON.stringify(data, null, 2),
            },
          ],
        };
      } catch (error) {
        if (error instanceof Error) {
          throw new Error(`Failed to connect to Monobank API: ${error.message}`);
        }
        throw new Error(`Failed to connect to Monobank API: ${String(error)}`);
      }
    }
  • src/index.ts:218-226 (registration)
    Tool registration in the ListTools response, defining the name, description, and input schema (no parameters required).
    {
      name: "get_client_info",
      description: "Get client information from Monobank API. This tool retrieves information about the client, their accounts, and jars. It requires a Monobank API token with the necessary permissions.",
      inputSchema: {
        type: "object",
        properties: {},
        required: [],
      },
    },
  • TypeScript interface defining the structure of the ClientInfo response from the API, used for type-checking the API response in the handler.
    interface ClientInfo {
      clientId: string;
      name: string;
      webHookUrl: string;
      permissions: string;
      accounts: Account[];
      jars?: Jar[];
    }
  • src/index.ts:254-255 (registration)
    Dispatch registration in the CallToolRequest handler switch statement, mapping the tool name to the handler function.
    case "get_client_info":
      return await getClientInfo();
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 of behavioral disclosure. It mentions the authentication requirement (API token with permissions) which is valuable context, but doesn't describe what information is returned, whether there are rate limits, error conditions, or other behavioral traits. It adequately covers the basic operation but lacks detail about the tool's behavior.

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 description is appropriately concise with two sentences that each add value. The first sentence states the purpose, and the second adds important context about authentication requirements. There's no wasted text, though it could be slightly more structured.

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 that this is a read operation with no parameters and no output schema, the description provides adequate but minimal information. It covers the purpose and authentication requirements, but doesn't describe what specific information is returned or the format of the response. For a tool that retrieves client information, more detail about the return data would be helpful.

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?

The tool has 0 parameters with 100% schema description coverage, so the schema already fully documents the parameter situation. The description doesn't need to add parameter information, and it appropriately doesn't discuss parameters. The baseline for 0 parameters with full schema coverage is 4.

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's purpose: 'Get client information from Monobank API' with specific resources mentioned (client, accounts, jars). It distinguishes from the sibling tool 'get_statement' by focusing on client metadata rather than transaction data. However, it doesn't explicitly contrast with the sibling, so it's not a perfect 5.

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?

The description provides some usage context by mentioning the required API token and permissions, but doesn't explicitly state when to use this tool versus alternatives. It implies usage for retrieving client metadata but doesn't provide guidance about when not to use it or what the sibling tool 'get_statement' is for.

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

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