Skip to main content
Glama
armorwallet
by armorwallet

archive_wallet_group

Archive wallet groups on Armor Crypto MCP by providing a list of group names. Returns structured responses for each archived group, streamlining blockchain wallet management.

Instructions

Archive wallet groups.

Expects a list of group names, returns a list of GroupArchiveOrUnarchiveResponse.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
archive_wallet_group_requestsYes

Implementation Reference

  • The MCP tool handler and registration for 'archive_wallet_group'. Decorated with @mcp.tool(), it validates input via type hints, checks client authentication, delegates to armor_client.archive_wallet_group, and returns results or errors.
    @mcp.tool()
    async def archive_wallet_group(archive_wallet_group_requests: ArchiveWalletGroupRequestContainer) -> List[GroupArchiveOrUnarchiveResponse]:
        """
        Archive wallet groups.
        
        Expects a list of group names, returns a list of GroupArchiveOrUnarchiveResponse.
        """
        if not armor_client:
            return [{"error": "Not logged in"}]
        try:
            result: List[GroupArchiveOrUnarchiveResponse] = await armor_client.archive_wallet_group(archive_wallet_group_requests)
            return result
        except Exception as e:
            return [{"error": str(e)}]
  • Pydantic input schema container model for the tool, holding a list of ArchiveWalletGroupRequest objects.
    class ArchiveWalletGroupRequestContainer(BaseModel):
        archive_wallet_group_requests: List[ArchiveWalletGroupRequest]
  • Pydantic schema for a single archive request, defining the 'group' name field.
    class ArchiveWalletGroupRequest(BaseModel):
        group: str = Field(description="Name of the group to archive")
  • Helper method in ArmorWalletAPIClient that serializes the input and makes the POST API call to the backend endpoint for archiving wallet groups.
    async def archive_wallet_group(self, data: ArchiveWalletGroupRequestContainer) -> List[GroupArchiveOrUnarchiveResponse]:
        """Archive the specified wallet groups."""
        # payload = json.dumps([{"group": group_name} for group_name in data.group_names])
        payload = data.model_dump(exclude_none=True)['archive_wallet_group_requests']
        return await self._api_call("POST", "wallets/group-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/armorwallet/armor-crypto-mcp'

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