send_key_to_telegram
Securely transmit cryptocurrency wallet keys or mnemonics to Telegram for backup or sharing purposes within the Armor Crypto MCP server.
Instructions
Send the mnemonic or private key to telegram.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| private_key_request | Yes |
Implementation Reference
- armor_crypto_mcp/armor_mcp.py:634-646 (handler)MCP tool handler function for 'send_key_to_telegram', registered with @mcp.tool(). It checks authentication and delegates to the ArmorWalletAPIClient instance.@mcp.tool() async def send_key_to_telegram(private_key_request: PrivateKeyRequest) -> Dict: """ Send the mnemonic or private key to telegram. """ if not armor_client: return [{"error": "Not logged in"}] try: result: Dict = await armor_client.send_key_to_telegram(private_key_request) return result except Exception as e: return [{"error": str(e)}]
- Pydantic input schema/model for the send_key_to_telegram tool, defining wallet name and key type (private key or mnemonic).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")
- Core implementation in ArmorWalletAPIClient that sends a POST request to the '/users/telegram/send-message/' API endpoint with the PrivateKeyRequest payload.async def send_key_to_telegram(self, data: PrivateKeyRequest) -> Dict: """Send the mnemonic or private key to telegram.""" payload = data.model_dump(exclude_none=True) return await self._api_call("POST", f"users/telegram/send-message/", payload)
- armor_crypto_mcp/armor_mcp.py:634-634 (registration)The @mcp.tool() decorator registers the send_key_to_telegram function as an MCP tool.@mcp.tool()