Skip to main content
Glama
ilhankilic

YaparAI MCP Server

by ilhankilic

check_balance

Check your YaparAI credit balance and total credits used with no charge for this operation.

Instructions

Check your YaparAI credit balance.

Returns your current credit balance, total credits used, and the currency (credits).

No credits are charged for this operation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler: async function that creates a YaparAIClient and calls get_balance() to retrieve the credit balance.
    async def check_balance() -> dict:
        """
        Check your YaparAI credit balance.
    
        Returns your current credit balance, total credits used,
        and the currency (credits).
    
        No credits are charged for this operation.
        """
        client = YaparAIClient()
        return await client.get_balance()
  • Helper: YaparAIClient.get_balance() makes a GET request to /v1/public/balance to fetch credit balance from the API.
    async def get_balance(self) -> dict:
        """Get credit balance."""
        return await self._request("GET", "/v1/public/balance")
  • Registration: The check_balance function is registered as an MCP tool via mcp.tool(check_balance).
    mcp.tool(check_balance)
  • Helper: The _request method is the underlying HTTP request handler with retry logic used by get_balance().
    async def _request(self, method: str, path: str, retries: int = 3, **kwargs) -> dict:
  • Registration: Import statement that brings check_balance into the server module for registration.
    from yaparai.tools.balance import check_balance
Behavior4/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 transparency. It discloses that the operation is free (no credit charge) and describes the return values. It does not mention rate limits or other behaviors, but for a simple read-only check this is adequate.

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?

The description is extremely concise with three short sentences, each adding value. No redundant information. It is front-loaded with the core purpose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (zero parameters, output schema present), the description fully explains the purpose, return values, and cost. No gaps remain.

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 zero parameters, and the schema coverage is 100% (empty properties). Per guidelines, baseline for 0 params is 4. The description adds no parameter info because none is needed.

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 clearly states the tool checks the YaparAI credit balance and specifies the exact return values (current balance, total used, currency). This is a specific verb+resource combination that distinguishes it from sibling tools.

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

Usage Guidelines4/5

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

The description explicitly notes that no credits are charged for this operation, providing clear context on when to use it. While it does not mention alternatives or exclusions, the free-of-charge nature is a strong usage guideline.

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/ilhankilic/yaparai-mcp'

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