Skip to main content
Glama

archive_wallets

Archive cryptocurrency wallets by providing a list of wallet names. This tool helps manage wallet organization and deactivate unused wallets within the Armor Crypto MCP server.

Instructions

Archive wallets.

Expects a list of wallet names, returns a list of WalletArchiveOrUnarchiveResponse.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
archive_wallet_requestsYes

Implementation Reference

  • The primary MCP tool handler for 'archive_wallets'. Registered via @mcp.tool() decorator. Validates input using ArchiveWalletsRequestContainer schema, checks authentication, calls armor_client.archive_wallets(), and returns the response or error.
    @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)}]
  • Pydantic schemas for input validation: ArchiveWalletsRequest (single wallet name) and ArchiveWalletsRequestContainer (list of requests) used as parameter type in the handler.
    class ArchiveWalletsRequest(BaseModel):
        wallet: str = Field(description="Name of the wallet to archive")
    
    class UnarchiveWalletsRequest(BaseModel):
        wallet: str = Field(description="Name of the wallet to unarchive")
    
    class CreateGroupsRequest(BaseModel):
        name: str = Field(description="Name of the group to create")
    
    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")
    
    class ArchiveWalletGroupRequest(BaseModel):
        group: str = Field(description="Name of the group to archive")
    
    class UnarchiveWalletGroupRequest(BaseModel):
        group: str = Field(description="Name of the group to unarchive")
    
    class RemoveWalletsFromGroupRequest(BaseModel):
        group: str = Field(description="Name of the group to remove wallets from")
        wallet: str = Field(description="List of wallet names to remove from the group")
    
    class TopTrendingTokensRequest(BaseModel):
        time_frame: Literal["5m", "15m", "30m", "1h", "2h", "3h", "4h", "5h", "6h", "12h", "24h"] = Field(default="24h", description="Time frame to get the top trending tokens")
    
    class StakeBalanceResponse(BaseModel):
        total_stake_amount: float = Field(description="Total stake balance in jupSol")
        total_stake_amount_in_usd: float = Field(description="Total stake balance in USD")
    
    
    class RenameWalletRequest(BaseModel):
        wallet: str = Field(description="Name of the wallet to rename")
        new_name: str = Field(description="New name of the wallet")
    
    
    class CandleStickRequest(BaseModel):
        token_address: str = Field(description="Public mint address of the token. To get the address from a token symbol use `get_token_details`")
        time_interval: Literal["1s", "5s", "15s", "1m", "3m", "5m", "15m", "30m", "1h", "2h", "4h", "6h", "8h", "12h", "1d", "3d", "1w", "1mn"] = Field(default="1h", description="Time frame to get the candle sticks. Use larger candle time frames over larger time windows to keep returned candles minimal")
        time_from: str = Field(description="The time from which to start the candle data in ISO 8601 format. Attempt to change this to keep number of candles returned under 64.")
        time_to: Optional[str] = Field(default=None, description="The time to end the candle data in ISO 8601 format. Use only for historic analysis.")
        market_cap: Optional[bool] = Field(default=False, description="Whether to return the marketcap of the token instead of the price")
        
    class PrivateKeyRequest(BaseModel):
        wallet: str = Field(description="Name of the wallet to get the mnemonic or private key for")
        key_type: Literal['PRIVATE_KEY', 'MNEMONIC'] = Field(description="Whether to return the private or mnemonic key")
    
    # ------------------------------
    # Container Models for List Inputs
    # ------------------------------
    
    class RemoveWalletsFromGroupRequestContainer(BaseModel):
        remove_wallets_from_group_requests: List[RemoveWalletsFromGroupRequest]
    
    class AddWalletToGroupRequestContainer(BaseModel):
        add_wallet_to_group_requests: List[AddWalletToGroupRequest]
    
    class CreateWalletRequestContainer(BaseModel):
        create_wallet_requests: List[CreateWalletRequest]
    
    class ArchiveWalletsRequestContainer(BaseModel):
        archive_wallet_requests: List[ArchiveWalletsRequest]
  • Pydantic schema for the response type: List[WalletArchiveOrUnarchiveResponse] returned by the handler.
    class WalletArchiveOrUnarchiveResponse(BaseModel):
        wallet_name: str = Field(description="name of the wallet")
        message: str = Field(description="message of the operation showing if wallet was archived or unarchived")
  • Supporting method in ArmorWalletAPIClient that serializes the input and makes the HTTP POST request to the backend API endpoint '/wallets/archive/' to perform the wallet archiving.
    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)

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