t2000_contact_add
Save Sui wallet addresses with contact names to simplify sending transactions. Map names to addresses for easier reference in future transfers.
Instructions
Save a contact name → Sui address mapping. After saving, use the name with t2000_send instead of pasting addresses. Example: save "Tom" as 0x1234... then send to "Tom".
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Contact name (e.g. "Tom", "Alice") | |
| address | Yes | Sui wallet address (0x...) |
Implementation Reference
- packages/mcp/src/tools/write.ts:585-600 (handler)Registration and handler implementation of the 't2000_contact_add' MCP tool. It validates the input name and address, and then calls the agent.contacts.add method.
server.tool( 't2000_contact_add', 'Save a contact name → Sui address mapping. After saving, use the name with t2000_send instead of pasting addresses. Example: save "Tom" as 0x1234... then send to "Tom".', { name: z.string().describe('Contact name (e.g. "Tom", "Alice")'), address: z.string().describe('Sui wallet address (0x...)'), }, async ({ name, address }) => { try { const result = agent.contacts.add(name, address); return { content: [{ type: 'text', text: JSON.stringify({ success: true, name, address, ...result }) }] }; } catch (err) { return errorResult(err); } }, );