Skip to main content
Glama

create_wallet

Generate new cryptocurrency wallets for managing digital assets, enabling secure storage and transaction capabilities within blockchain ecosystems.

Instructions

Create new wallets. Expects a list of wallet names, returns a list of WalletInfo.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
create_wallet_requestsYes

Implementation Reference

  • The main MCP tool handler for 'create_wallet'. It is decorated with @mcp.tool(), receives a CreateWalletRequestContainer, checks authentication, calls armor_client.create_wallet(), and handles errors.
    @mcp.tool() async def create_wallet(create_wallet_requests: CreateWalletRequestContainer) -> List[WalletInfo]: """ Create new wallets. Expects a list of wallet names, returns a list of WalletInfo. """ if not armor_client: return [{"error": "Not logged in"}] try: result: List[WalletInfo] = await armor_client.create_wallet(create_wallet_requests) return result except Exception as e: return [{"error": str(e)}]
  • Pydantic schema for a single CreateWalletRequest, defining the 'name' field for the wallet to create.
    class CreateWalletRequest(BaseModel): name: str = Field(description="Name of the wallet to create")
  • Pydantic container schema wrapping a list of CreateWalletRequest for batch wallet creation.
    class CreateWalletRequestContainer(BaseModel): create_wallet_requests: List[CreateWalletRequest]
  • Helper method in ArmorWalletAPIClient that performs the actual API call to create wallets by POSTing to '/wallets/' endpoint.
    async def create_wallet(self, data: CreateWalletRequestContainer) -> List[WalletInfo]: """Create new wallets given a list of wallet names.""" # payload = json.dumps([{"name": wallet_name} for wallet_name in data.wallet_names]) payload = data.model_dump(exclude_none=True)['create_wallet_requests'] return await self._api_call("POST", "wallets/", payload)
  • Pydantic schema for WalletInfo, the return type of the create_wallet operations.
    class WalletInfo(BaseModel): id: str = Field(description="wallet id") name: str = Field(description="wallet name") is_archived: bool = Field(description="whether the wallet is archived") public_address: str = Field(description="public address of the wallet")

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/emmaThompson07/armor-crypto-mcp'

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