Skip to main content
Glama

get_balance

Retrieve the current account balance in USD from DIDLogic via the didlogic_mcp server. Returns a JSON object with the balance for easy integration and usage.

Instructions

Get the current DIDLogic account balance

Returns a JSON object with balance in USD Example output: {"balance": 35.22}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The get_balance tool handler: an async function decorated with @mcp.tool() that fetches the account balance from the Didlogic API /v1/balance endpoint and returns it as a JSON string.
    @mcp.tool() async def get_balance(ctx: Context) -> str: """ Get the current DIDLogic account balance Returns a JSON object with balance in USD Example output: `{"balance": 35.22}` """ response = await base.call_didlogic_api(ctx, "GET", "/v1/balance") return response.text
  • Registers the balance tools module (including get_balance) on the FastMCP server instance.
    tools.balance.register_tools(mcp)

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/UserAd/didlogic_mcp'

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