Skip to main content
Glama

Polymarket Position Movements

pm_movements

Track recent position changes by whale wallets on Polymarket. View buys, sells, and size adjustments across prediction markets.

Instructions

Get recent position changes by whale wallets on Polymarket. Shows buys, sells, and position size changes across prediction markets. Cost: $0.01 per query. Source: Polymarket on-chain data.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
market_idNoFilter by market ID
walletNoFilter by wallet address
hoursNoLookback period in hours (default 24)
limitNoMaximum results (default 25)

Implementation Reference

  • The handler function for the pm_movements tool. Calls apiGet to /api/v1/pm/movements with optional filters (market_id, wallet, hours, limit) and returns the response as text.
    server.registerTool(
      "pm_movements",
      {
        title: "Polymarket Position Movements",
        description:
          "Get recent position changes by whale wallets on Polymarket. Shows buys, sells, " +
          "and position size changes across prediction markets. " +
          "Cost: $0.01 per query. Source: Polymarket on-chain data.",
        inputSchema: {
          market_id: z
            .string()
            .optional()
            .describe("Filter by market ID"),
          wallet: z
            .string()
            .optional()
            .describe("Filter by wallet address"),
          hours: z
            .number()
            .int()
            .min(1)
            .max(168)
            .optional()
            .describe("Lookback period in hours (default 24)"),
          limit: z
            .number()
            .int()
            .min(1)
            .max(100)
            .optional()
            .describe("Maximum results (default 25)"),
        },
      },
      async ({ market_id, wallet, hours, limit }) => {
        const res = await apiGet<PmQueryResponse>("/api/v1/pm/movements", {
          market_id,
          wallet,
          hours: hours ?? 24,
          limit: limit ?? 25,
        });
    
        if (!res.ok) {
          return {
            content: [
              {
                type: "text" as const,
                text: `API error (${res.status}): ${JSON.stringify(res.data)}`,
              },
            ],
            isError: true,
          };
        }
    
        const { count, data } = res.data;
        const warn = stalenessWarning(res);
        const summary = `${warn}Found ${count} position movement(s).`;
        const json = JSON.stringify(data, null, 2);
    
        return {
          content: [{ type: "text" as const, text: `${summary}\n\n${json}` }],
        };
      },
    );
  • Input schema for pm_movements tool — defines optional filters: market_id (string), wallet (string), hours (1-168 integer), limit (1-100 integer).
    inputSchema: {
      market_id: z
        .string()
        .optional()
        .describe("Filter by market ID"),
      wallet: z
        .string()
        .optional()
        .describe("Filter by wallet address"),
      hours: z
        .number()
        .int()
        .min(1)
        .max(168)
        .optional()
        .describe("Lookback period in hours (default 24)"),
      limit: z
        .number()
        .int()
        .min(1)
        .max(100)
        .optional()
        .describe("Maximum results (default 25)"),
    },
  • The tool is registered on the MCP server via server.registerTool("pm_movements", ...) within the registerPmTools function.
    // ── Position movements ────────────────────────────────────────────────
    
    server.registerTool(
      "pm_movements",
      {
        title: "Polymarket Position Movements",
        description:
          "Get recent position changes by whale wallets on Polymarket. Shows buys, sells, " +
          "and position size changes across prediction markets. " +
          "Cost: $0.01 per query. Source: Polymarket on-chain data.",
        inputSchema: {
          market_id: z
            .string()
            .optional()
            .describe("Filter by market ID"),
          wallet: z
            .string()
            .optional()
            .describe("Filter by wallet address"),
          hours: z
            .number()
            .int()
            .min(1)
            .max(168)
            .optional()
            .describe("Lookback period in hours (default 24)"),
          limit: z
            .number()
            .int()
            .min(1)
            .max(100)
            .optional()
            .describe("Maximum results (default 25)"),
        },
      },
      async ({ market_id, wallet, hours, limit }) => {
        const res = await apiGet<PmQueryResponse>("/api/v1/pm/movements", {
          market_id,
          wallet,
          hours: hours ?? 24,
          limit: limit ?? 25,
        });
    
        if (!res.ok) {
          return {
            content: [
              {
                type: "text" as const,
                text: `API error (${res.status}): ${JSON.stringify(res.data)}`,
              },
            ],
            isError: true,
          };
        }
    
        const { count, data } = res.data;
        const warn = stalenessWarning(res);
        const summary = `${warn}Found ${count} position movement(s).`;
        const json = JSON.stringify(data, null, 2);
    
        return {
          content: [{ type: "text" as const, text: `${summary}\n\n${json}` }],
        };
      },
    );
  • src/tools/pm.ts:29-298 (registration)
    The registerPmTools function that registers all Polymarket tools (including pm_movements) is exported and called from src/index.ts.
    export function registerPmTools(server: McpServer): void {
      // ── PM whale wallets ──────────────────────────────────────────────────
    
      server.registerTool(
        "pm_whales",
        {
          title: "Polymarket Whale Wallets",
          description:
            "Get top Polymarket wallets ranked by PnL, volume, or position size. " +
            "Shows wallet address, total PnL, win rate, and active markets. " +
            "Cost: $0.005 per query. Source: Polymarket on-chain data.",
          inputSchema: {
            sort: z
              .enum(["pnl", "volume", "positions"])
              .optional()
              .describe("Sort order (default: pnl)"),
            market_id: z
              .string()
              .optional()
              .describe("Filter by specific market ID"),
            limit: z
              .number()
              .int()
              .min(1)
              .max(100)
              .optional()
              .describe("Maximum results (default 25)"),
          },
        },
        async ({ sort, market_id, limit }) => {
          const res = await apiGet<PmQueryResponse>("/api/v1/pm/whales", {
            sort: sort ?? "pnl",
            market_id,
            limit: limit ?? 25,
          });
    
          if (!res.ok) {
            return {
              content: [
                {
                  type: "text" as const,
                  text: `API error (${res.status}): ${JSON.stringify(res.data)}`,
                },
              ],
              isError: true,
            };
          }
    
          const { count, data } = res.data;
          const warn = stalenessWarning(res);
          const summary = `${warn}Found ${count} Polymarket whale(s).`;
          const json = JSON.stringify(data, null, 2);
    
          return {
            content: [{ type: "text" as const, text: `${summary}\n\n${json}` }],
          };
        },
      );
    
      // ── Smart money signals ───────────────────────────────────────────────
    
      server.registerTool(
        "pm_signals",
        {
          title: "Polymarket Smart Money Signals",
          description:
            "Get smart money flow signals showing where top traders are positioning. " +
            "Aggregates whale wallet activity into directional signals per market. " +
            "Cost: $0.02 per query. Source: Polymarket on-chain data.",
          inputSchema: {
            market_id: z
              .string()
              .optional()
              .describe("Filter by market ID"),
            min_confidence: z
              .number()
              .min(0)
              .max(1)
              .optional()
              .describe("Minimum signal confidence (0-1, default 0.5)"),
            limit: z
              .number()
              .int()
              .min(1)
              .max(100)
              .optional()
              .describe("Maximum results (default 25)"),
          },
        },
        async ({ market_id, min_confidence, limit }) => {
          const res = await apiGet<PmQueryResponse>("/api/v1/pm/signals", {
            market_id,
            min_confidence: min_confidence ?? 0.5,
            limit: limit ?? 25,
          });
    
          if (!res.ok) {
            return {
              content: [
                {
                  type: "text" as const,
                  text: `API error (${res.status}): ${JSON.stringify(res.data)}`,
                },
              ],
              isError: true,
            };
          }
    
          const { count, data } = res.data;
          const warn = stalenessWarning(res);
          const summary = `${warn}Found ${count} smart money signal(s).`;
          const json = JSON.stringify(data, null, 2);
    
          return {
            content: [{ type: "text" as const, text: `${summary}\n\n${json}` }],
          };
        },
      );
    
      // ── Position movements ────────────────────────────────────────────────
    
      server.registerTool(
        "pm_movements",
        {
          title: "Polymarket Position Movements",
          description:
            "Get recent position changes by whale wallets on Polymarket. Shows buys, sells, " +
            "and position size changes across prediction markets. " +
            "Cost: $0.01 per query. Source: Polymarket on-chain data.",
          inputSchema: {
            market_id: z
              .string()
              .optional()
              .describe("Filter by market ID"),
            wallet: z
              .string()
              .optional()
              .describe("Filter by wallet address"),
            hours: z
              .number()
              .int()
              .min(1)
              .max(168)
              .optional()
              .describe("Lookback period in hours (default 24)"),
            limit: z
              .number()
              .int()
              .min(1)
              .max(100)
              .optional()
              .describe("Maximum results (default 25)"),
          },
        },
        async ({ market_id, wallet, hours, limit }) => {
          const res = await apiGet<PmQueryResponse>("/api/v1/pm/movements", {
            market_id,
            wallet,
            hours: hours ?? 24,
            limit: limit ?? 25,
          });
    
          if (!res.ok) {
            return {
              content: [
                {
                  type: "text" as const,
                  text: `API error (${res.status}): ${JSON.stringify(res.data)}`,
                },
              ],
              isError: true,
            };
          }
    
          const { count, data } = res.data;
          const warn = stalenessWarning(res);
          const summary = `${warn}Found ${count} position movement(s).`;
          const json = JSON.stringify(data, null, 2);
    
          return {
            content: [{ type: "text" as const, text: `${summary}\n\n${json}` }],
          };
        },
      );
    
      // ── Change feed ───────────────────────────────────────────────────────
    
      server.registerTool(
        "pm_changes",
        {
          title: "Polymarket Changes",
          description:
            "Get recent changes to Polymarket data since a given timestamp. " +
            "Cost: $0.01 per query. Source: Polymarket on-chain data.",
          inputSchema: {
            since: z
              .string()
              .describe("ISO 8601 timestamp to get changes since (e.g. 2026-03-01T00:00:00Z)"),
            limit: z
              .number()
              .int()
              .min(1)
              .max(100)
              .optional()
              .describe("Maximum results (default 50)"),
          },
        },
        async ({ since, limit }) => {
          const res = await apiGet<PmQueryResponse>("/api/v1/pm/changes", {
            since,
            limit: limit ?? 50,
          });
    
          if (!res.ok) {
            return {
              content: [
                {
                  type: "text" as const,
                  text: `API error (${res.status}): ${JSON.stringify(res.data)}`,
                },
              ],
              isError: true,
            };
          }
    
          const { count, data } = res.data;
          const warn = stalenessWarning(res);
          const summary = `${warn}Found ${count} Polymarket change(s) since ${since}.`;
          const json = JSON.stringify(data, null, 2);
    
          return {
            content: [{ type: "text" as const, text: `${summary}\n\n${json}` }],
          };
        },
      );
    
      // ── Dataset stats ─────────────────────────────────────────────────────
    
      server.registerTool(
        "pm_stats",
        {
          title: "Polymarket Dataset Statistics",
          description:
            "Get statistics about the Polymarket dataset: total markets, wallets tracked, " +
            "volume, and last updated timestamp. Free endpoint.",
          inputSchema: {},
        },
        async () => {
          const res = await apiGet<PmStatsResponse>("/api/v1/pm/stats");
    
          if (!res.ok) {
            return {
              content: [
                {
                  type: "text" as const,
                  text: `API error (${res.status}): ${JSON.stringify(res.data)}`,
                },
              ],
              isError: true,
            };
          }
    
          return {
            content: [
              { type: "text" as const, text: JSON.stringify(res.data, null, 2) },
            ],
          };
        },
      );
    }
  • src/index.ts:54-58 (registration)
    Top-level registration: registerPmTools(server) is called in createMcpServer() to mount pm_movements on the server.
    registerPmTools(server);
    registerPmArbTools(server);
    registerPmResolutionTools(server);
    registerEconTools(server);
    registerPmMicroTools(server);
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden. It discloses the cost ($0.01 per query) and source (on-chain data), which adds transparency. However, it does not mention whether the operation is read-only, any pagination, rate limits, or what happens with empty results. The behavioral coverage is adequate but not thorough.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is very concise – two sentences plus cost and source. The main action (get recent position changes) is front-loaded, and every sentence is relevant. No wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the lack of an output schema, the description should explain return values but only vaguely says 'shows buys, sells, and position size changes.' It omits the structure of results, pagination details, ordering, and default behavior. The tool has four optional parameters and no required ones, but the returned data format is not described.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% parameter description coverage, so the baseline is 3. The description does not add new meaning to the parameters beyond what the schema provides (e.g., market_id, wallet, hours, limit). It only hints at output content, not parameter behavior.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it retrieves recent position changes by whale wallets on Polymarket, including buys, sells, and position size changes. It distinguishes itself from siblings like pm_whales or pm_stats, but could be more explicit about how it differs from similar tools like pm_changes.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no explicit guidance on when to use this tool versus alternatives. It mentions cost and source but lacks context on when to prefer this over pm_changes, pm_arb_changes, or other related tools. No exclusions or prerequisites are stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/carrierone/verilexdata-mcp'

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