Skip to main content
Glama
armorwallet
by armorwallet

create_wallet

Generate new cryptocurrency wallets by specifying wallet names. Returns WalletInfo for created wallets. Part of Armor Crypto MCP server for blockchain operations.

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 MCP tool handler for 'create_wallet', registered with @mcp.tool(), which delegates to the ArmorWalletAPIClient to perform the wallet creation.
    @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 input schema container for the create_wallet tool, holding a list of CreateWalletRequest objects.
    class CreateWalletRequestContainer(BaseModel):
        create_wallet_requests: List[CreateWalletRequest]
  • Pydantic schema for a single wallet creation request, specifying the wallet name.
    class CreateWalletRequest(BaseModel):
        name: str = Field(description="Name of the wallet to create")
  • Helper method in ArmorWalletAPIClient that handles the HTTP POST request to the API endpoint for creating wallets.
    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 the response object returned by create_wallet, containing wallet details.
    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/armorwallet/armor-crypto-mcp'

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