Skip to main content
Glama
solangii

Upbit MCP Server

get_accounts

Retrieve account balance information from Upbit cryptocurrency exchange to view your current asset holdings.

Instructions

업비트 계정의 잔고 정보를 조회합니다.

Returns:
    list[dict]: 보유 중인 자산 목록

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function that queries the Upbit API for account balances, handles errors, and returns a list of account dictionaries.
    async def get_accounts(ctx: Context = None) -> list[dict]:
        """
        업비트 계정의 잔고 정보를 조회합니다.
        
        Returns:
            list[dict]: 보유 중인 자산 목록
        """
        if not UPBIT_ACCESS_KEY:
            if ctx:
                ctx.error("API 키가 설정되지 않았습니다. .env 파일에 UPBIT_ACCESS_KEY와 UPBIT_SECRET_KEY를 설정해주세요.")
            return [{"error": "API 키가 설정되지 않았습니다."}]
        
        url = f"{API_BASE}/accounts"
        headers = {
            "Authorization": f"Bearer {generate_upbit_token()}"
        }
        
        if ctx:
            ctx.info("계정 잔고 조회 중...")
        async with httpx.AsyncClient() as client:
            try:
                res = await client.get(url, headers=headers)
                if res.status_code != 200:
                    if ctx:
                        ctx.error(f"업비트 API 오류: {res.status_code} - {res.text}")
                    return [{"error": f"업비트 API 오류: {res.status_code}"}]
                return res.json()
            except Exception as e:
                if ctx:
                    ctx.error(f"API 호출 중 오류 발생: {str(e)}")
                return [{"error": f"API 호출 중 오류 발생: {str(e)}"}]
  • main.py:45-45 (registration)
    Registers the get_accounts function as an MCP tool using the FastMCP decorator.
    mcp.tool()(get_accounts)
  • main.py:9-9 (registration)
    Imports the get_accounts handler from its module.
    from tools.get_accounts import get_accounts
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool retrieves balance information, implying a read-only operation, but doesn't specify any behavioral traits like authentication requirements, rate limits, error handling, or whether it returns real-time or cached data. For a tool with zero annotation coverage, this is a significant gap in transparency.

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 concise and well-structured, with two sentences: one stating the purpose and another describing the return value. It's front-loaded with the core functionality and avoids unnecessary details. However, it could be slightly improved by integrating the return information more seamlessly, but overall it's efficient with minimal waste.

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 tool's low complexity (0 parameters, no output schema, no annotations), the description is adequate but has clear gaps. It explains what the tool does and the return type, but without annotations or output schema, it lacks details on behavioral aspects like authentication or error handling. This makes it minimally viable but incomplete for optimal agent use.

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, and the input schema has 100% description coverage (though empty). The description doesn't need to add parameter semantics, as there are no parameters to document. This meets the baseline of 4 for tools with no parameters, as it appropriately doesn't waste text on non-existent inputs.

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: '업비트 계정의 잔고 정보를 조회합니다' (Retrieves balance information for Upbit accounts). It specifies the verb '조회합니다' (retrieves) and the resource '잔고 정보' (balance information). However, it doesn't explicitly differentiate from sibling tools like 'get_deposits_withdrawals' or 'get_orders', which might also retrieve account-related data, so it doesn't reach a score of 5.

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 guidance on when to use this tool versus alternatives. It doesn't mention any prerequisites, context for usage, or comparisons to sibling tools such as 'get_deposits_withdrawals' or 'get_orders', which could be relevant for account-related queries. This lack of usage instructions limits its effectiveness for an AI agent.

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/solangii/upbit-mcp-server'

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