archive_wallets
Archive multiple wallets by providing their names in a single request. Returns status responses for each wallet processed within the Armor Crypto MCP server, streamlining management for blockchain operations.
Instructions
Archive wallets.
Expects a list of wallet names, returns a list of WalletArchiveOrUnarchiveResponse.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| archive_wallet_requests | Yes |
Implementation Reference
- armor_crypto_mcp/armor_mcp.py:290-303 (handler)The primary handler function for the 'archive_wallets' MCP tool. It is registered via @mcp.tool(), validates login via global armor_client, delegates to the ArmorWalletAPIClient.archive_wallets method, and handles exceptions by returning error messages.@mcp.tool() async def archive_wallets(archive_wallet_requests: ArchiveWalletsRequestContainer) -> List[WalletArchiveOrUnarchiveResponse]: """ Archive wallets. Expects a list of wallet names, returns a list of WalletArchiveOrUnarchiveResponse. """ if not armor_client: return [{"error": "Not logged in"}] try: result: List[WalletArchiveOrUnarchiveResponse] = await armor_client.archive_wallets(archive_wallet_requests) return result except Exception as e: return [{"error": str(e)}]
- Input schema container for the archive_wallets tool, holding a list of ArchiveWalletsRequest objects used for input validation.class ArchiveWalletsRequestContainer(BaseModel): archive_wallet_requests: List[ArchiveWalletsRequest]
- Inner schema defining a single wallet name to archive, used within ArchiveWalletsRequestContainer.class ArchiveWalletsRequest(BaseModel): wallet: str = Field(description="Name of the wallet to archive")
- Supporting client method in ArmorWalletAPIClient that performs the actual API POST request to /wallets/archive/ with the prepared payload, called by the MCP handler.async def archive_wallets(self, data: ArchiveWalletsRequestContainer) -> List[WalletArchiveOrUnarchiveResponse]: """Archive the wallets specified in the list.""" # payload = json.dumps([{"wallet": wallet_name} for wallet_name in data.wallet_names]) payload = data.model_dump(exclude_none=True)['archive_wallet_requests'] return await self._api_call("POST", "wallets/archive/", payload)
- armor_crypto_mcp/armor_mcp.py:290-290 (registration)The @mcp.tool() decorator registers the archive_wallets function as an MCP tool.@mcp.tool()