@openclawcash/mcp-server 0.1.11 → 0.1.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,7 +7,7 @@ import { fileURLToPath } from "node:url";
7
7
  import { z } from "zod";
8
8
 
9
9
  const SERVER_NAME = "openclawcash";
10
- const SERVER_VERSION = "0.1.11";
10
+ const SERVER_VERSION = "0.1.12";
11
11
  const PROTOCOL_VERSION = "2024-11-05";
12
12
  const DEFAULT_BASE_URL = "https://openclawcash.com";
13
13
 
@@ -264,6 +264,17 @@ const polymarketCancelArgsSchema = z
264
264
  message: "Provide exactly one of walletId or walletAddress.",
265
265
  });
266
266
 
267
+ const polymarketRedeemArgsSchema = z
268
+ .object({
269
+ walletId: z.union([z.number().int().positive(), z.string().min(1)]).optional(),
270
+ walletAddress: z.string().min(1).optional(),
271
+ tokenId: z.string().min(1).optional(),
272
+ limit: z.number().int().positive().max(200).optional(),
273
+ })
274
+ .refine((data) => [data.walletId, data.walletAddress].filter((v) => v !== undefined).length === 1, {
275
+ message: "Provide exactly one of walletId or walletAddress.",
276
+ });
277
+
267
278
  const polymarketUnlinkArgsSchema = z
268
279
  .object({
269
280
  walletId: z.union([z.number().int().positive(), z.string().min(1)]).optional(),
@@ -1419,6 +1430,27 @@ const tools = [
1419
1430
  query: args,
1420
1431
  }),
1421
1432
  },
1433
+ {
1434
+ name: "polymarket_redeem",
1435
+ description: withWriteSafety("Redeem Polymarket position(s) via gasless relay for a configured polygon-mainnet wallet. Pass tokenId to redeem one position, or omit tokenId to redeem all currently redeemable positions."),
1436
+ inputSchema: {
1437
+ type: "object",
1438
+ properties: {
1439
+ walletId: { oneOf: [{ type: "integer" }, { type: "string" }] },
1440
+ walletAddress: { type: "string" },
1441
+ tokenId: { type: "string", description: "Optional outcome tokenId. Omit to redeem all redeemable positions." },
1442
+ limit: { type: "integer", description: "Optional max redeemable positions to scan (1-200, default 100)." },
1443
+ },
1444
+ additionalProperties: false,
1445
+ },
1446
+ parse: (args) => polymarketRedeemArgsSchema.parse(args ?? {}),
1447
+ execute: async (args) =>
1448
+ callAgentApi({
1449
+ method: "POST",
1450
+ pathName: "/api/agent/venues/polymarket/redeem",
1451
+ body: args,
1452
+ }),
1453
+ },
1422
1454
  ];
1423
1455
 
1424
1456
  const resources = [
@@ -1448,7 +1480,7 @@ const resources = [
1448
1480
  "4. For writes, establish approval mode once per session.",
1449
1481
  "5. For checkout escrow funding, use `checkout_fund` (quick-pay first, swap fallback when needed).",
1450
1482
  "6. Use `swap_quote` before `swap_execute` for non-checkout swaps.",
1451
- "7. For Polymarket: ask your human to complete setup in dashboard (/venues/polymarket), then place/cancel orders and inspect account/activity/positions via polymarket tools.",
1483
+ "7. For Polymarket: ask your human to complete setup in dashboard (/venues/polymarket), then place/cancel/redeem and inspect account/activity/positions via polymarket tools.",
1452
1484
  ].join("\n"),
1453
1485
  },
1454
1486
  ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openclawcash/mcp-server",
3
- "version": "0.1.11",
3
+ "version": "0.1.12",
4
4
  "description": "OpenClawCash MCP server for managed agent wallets, balances, transfers, swaps, approvals, Get Paid checkout escrow flows, and Polymarket market resolution/order tools.",
5
5
  "type": "module",
6
6
  "license": "Proprietary",