add_wallets_to_group
Organize crypto wallets efficiently by adding multiple wallets to a specified group using this tool. Simplify blockchain management for structured operations and strategies.
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-352 (handler)The MCP tool handler function for 'add_wallets_to_group', decorated with @mcp.tool() which also serves as registration. It calls the armor_client to perform the action.@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)}]
- Input schema container for the tool, wrapping a list of AddWalletToGroupRequest.class AddWalletToGroupRequestContainer(BaseModel): add_wallet_to_group_requests: List[AddWalletToGroupRequest]
- Inner input schema model defining group and wallet names.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")
- Output schema model for the tool response.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")
- Helper function in ArmorWalletAPIClient that performs the actual API call to add wallets 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)