add_wallets_to_group
Organize cryptocurrency wallets by adding them to a specified group for easier management and categorization within the Armor Crypto MCP server.
Instructions
Add wallets to a specified group.
Expects the group name and a list of wallet names, returns a list of AddWalletToGroupResponse.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| add_wallet_to_group_requests | Yes |
Implementation Reference
- armor_crypto_mcp/armor_mcp.py:338-351 (handler)MCP tool handler function for 'add_wallets_to_group'. Decorated with @mcp.tool(), validates input, calls the Armor client API, and handles errors.@mcp.tool() async def add_wallets_to_group(add_wallet_to_group_requests: AddWalletToGroupRequestContainer) -> List[AddWalletToGroupResponse]: """ Add wallets to a specified group. Expects the group name and a list of wallet names, returns a list of AddWalletToGroupResponse. """ if not armor_client: return [{"error": "Not logged in"}] try: result: List[AddWalletToGroupResponse] = await armor_client.add_wallets_to_group(add_wallet_to_group_requests) return result except Exception as e: return [{"error": str(e)}]
- Client-side implementation that serializes the request and makes a POST API call to the Armor Wallet API endpoint '/wallets/add-wallet-to-group/'.async def add_wallets_to_group(self, data: AddWalletToGroupRequestContainer) -> List[AddWalletToGroupResponse]: """Add wallets to a specific group.""" # payload = json.dumps([{"wallet": wallet_name, "group": data.group_name} for wallet_name in data.wallet_names]) payload = data.model_dump(exclude_none=True)['add_wallet_to_group_requests'] return await self._api_call("POST", "wallets/add-wallet-to-group/", payload)
- Pydantic model defining the structure for a single add wallet to group request (group name and wallet name).class AddWalletToGroupRequest(BaseModel): group: str = Field(description="Name of the group to add wallets to") wallet: str = Field(description="Name of the wallet to add to the group")
- Pydantic container model wrapping a list of AddWalletToGroupRequest for batch operations.class AddWalletToGroupRequestContainer(BaseModel): add_wallet_to_group_requests: List[AddWalletToGroupRequest]
- Pydantic model for the response, including wallet_name, group_name, and success/error message.class AddWalletToGroupResponse(BaseModel): wallet_name: str = Field(description="name of the wallet to add to the group") group_name: str = Field(description="name of the group to add the wallet to") message: str = Field(description="message of the operation showing if wallet was added to the group")