waiaas_pm_setup
Configure Polymarket API keys and approve CTF contracts for a wallet to enable trading.
Instructions
Set up Polymarket API keys and optional CTF contract approval for a wallet.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| wallet_id | Yes | Wallet ID (required). | |
| auto_approve | No | Automatically approve CTF contracts. |
Implementation Reference
- Handler for 'waiaas_pm_setup' tool. Accepts wallet_id (required) and auto_approve (optional boolean). Sends a POST request to /v1/wallets/{walletId}/polymarket/setup with optional auto_approve in the request body.
server.tool( 'waiaas_pm_setup', withWalletPrefix('Set up Polymarket API keys and optional CTF contract approval for a wallet.', walletContext?.walletName), { wallet_id: z.string().describe('Wallet ID (required).'), auto_approve: z.boolean().optional().describe('Automatically approve CTF contracts.'), }, async (args) => { const walletId = args.wallet_id; const body: Record<string, unknown> = {}; if (args.auto_approve !== undefined) body.auto_approve = args.auto_approve; const result = await apiClient.post(`/v1/wallets/${walletId}/polymarket/setup`, body); return toToolResult(result); }, ); - Zod schema defining the input parameters: wallet_id (required string) and auto_approve (optional boolean).
{ wallet_id: z.string().describe('Wallet ID (required).'), auto_approve: z.boolean().optional().describe('Automatically approve CTF contracts.'), - packages/mcp/src/server.ts:128-128 (registration)Registration call in createMcpServer(), invoking registerPolymarketTools which registers all 8 Polymarket tools (including waiaas_pm_setup).
registerPolymarketTools(server, apiClient, walletContext); - packages/mcp/src/tools/polymarket.ts:15-19 (registration)Top-level registration function that registers waiaas_pm_setup (and 7 other Polymarket tools) onto the MCP server.
export function registerPolymarketTools( server: McpServer, apiClient: ApiClient, walletContext?: WalletContext, ): void {