Skip to main content
Glama
PaulieB14

graph-polymarket-mcp

get_trader_usdc_flows

Retrieve USDC deposit and withdrawal history for a trader on Polymarket, showing inbound and outbound transfers to track when traders fund or withdraw from the platform.

Instructions

Get USDC deposit/withdrawal history for a trader. Shows inbound and outbound USDC transfers, useful for tracking when traders fund or withdraw from Polymarket.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
addressYesEthereum address of the trader
directionNoFilter by transfer directionboth
firstNoNumber of transfers to return

Implementation Reference

  • src/index.ts:925-935 (registration)
    Registration of the 'get_trader_usdc_flows' tool with input schema (address, direction, first)
    server.registerTool(
      "get_trader_usdc_flows",
      {
        description:
          "Get USDC deposit/withdrawal history for a trader. Shows inbound and outbound USDC transfers, useful for tracking when traders fund or withdraw from Polymarket.",
        inputSchema: {
          address: z.string().describe("Ethereum address of the trader"),
          direction: z.enum(["inbound", "outbound", "both"]).default("both").describe("Filter by transfer direction"),
          first: z.number().min(1).max(100).default(50).describe("Number of transfers to return"),
        },
      },
  • Handler function that queries the Traders subgraph for USDC transfer history based on address and direction filter
    async ({ address, direction, first }) => {
      try {
        const addr = address.toLowerCase();
        const dirFilter =
          direction === "both"
            ? `trader: "${addr}"`
            : `trader: "${addr}", isInbound: ${direction === "inbound"}`;
        const query = `{
          usdctransfers(first: ${first}, orderBy: timestamp, orderDirection: desc, where: { ${dirFilter} }) {
            id
            from
            to
            amount
            isInbound
            blockNumber
            timestamp
          }
        }`;
        const data = await querySubgraph(SUBGRAPHS.traders.ipfsHash, query);
        return textResult(data);
      } catch (error) {
        return errorResult(error);
      }
    }
Behavior3/5

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

No annotations are provided, so the description must disclose behavioral traits. It mentions the tool shows transfers but does not specify whether it is real-time, cached, or any safety/authentication requirements. The description is adequate for a simple read tool but lacks depth.

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 two sentences long, front-loaded with the core purpose, and contains no unnecessary information. Every word earns its place.

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

Completeness4/5

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

Given the tool's simplicity (3 parameters, no nested objects, no output schema), the description is fairly complete. It explains the tool's purpose and primary use case. However, it lacks details about the return format or pagination, which would benefit from mention since no output schema exists.

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% description coverage, so the schema already explains all parameters. The description adds no additional semantic meaning beyond what is in the schema, meeting the baseline for high coverage but not exceeding it.

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

Purpose5/5

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

The description clearly states the tool retrieves USDC deposit/withdrawal history for a trader, specifying inbound and outbound transfers. This distinguishes it from sibling tools like get_account_pnl or get_trader_profile, which focus on other data.

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

Usage Guidelines4/5

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

The description provides a use case: tracking when traders fund or withdraw from Polymarket. While it implies when to use it, it does not explicitly exclude alternatives or state when not to use it.

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/PaulieB14/graph-polymarket-mcp'

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