Skip to main content
Glama
PaulieB14

Limitless MCP

get_market_positions

Retrieve top position holders for a specific market to analyze major participants and their profit/loss performance.

Instructions

Get top position holders for a specific market. Shows who holds the biggest positions and their PnL.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
conditionIdYesMarket conditionId
firstNo

Implementation Reference

  • Registration and handler implementation for the 'get_market_positions' tool, which queries position data from Simple and NegRisk markets.
    server.registerTool(
      "get_market_positions",
      {
        description:
          "Get top position holders for a specific market. Shows who holds the biggest positions and their PnL.",
        inputSchema: {
          conditionId: z.string().describe("Market conditionId"),
          first: z.number().default(20),
        },
      },
      async ({ conditionId, first }) => {
        try {
          const posQuery = `{
            userPositions(
              where: { condition: "${conditionId}", balance_gt: "0" }
              first: ${first}
              orderBy: balance
              orderDirection: desc
            ) {
              id user { id tradesCount totalVolumeUSD } tokenId balance
              netCostUSD realizedPnlUSD lastUpdated
            }
          }`;
    
          const [simpleData, negriskData, name] = await Promise.all([
            querySimple(posQuery).catch(() => ({ userPositions: [] })),
            queryNegRisk(posQuery).catch(() => ({ userPositions: [] })),
            getMarketName(conditionId),
          ]);
    
          const positions = [
            ...(simpleData.userPositions || []),
            ...(negriskData.userPositions || []),
          ]
            .sort((a, b) => parseInt(b.balance) - parseInt(a.balance))
            .slice(0, first);
    
          return textResult({ market: name, conditionId, positionCount: positions.length, positions });
        } catch (e) {
          return errorResult(e);
        }
      }
    );
Behavior3/5

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

No annotations provided, so description carries full burden. Indicates return data includes PnL and 'biggest' positions (implying size-sorted results), but lacks operational details like rate limits, data freshness, or pagination behavior.

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

Conciseness4/5

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

Two efficient sentences with front-loaded action. Minor redundancy between 'top position holders' and 'who holds the biggest positions,' but overall no wasted words.

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?

Adequate for tool complexity (2 flat parameters, no output schema). Description compensates for missing output schema by disclosing return content (PnL, holder identities), fulfilling minimum requirements for invocation.

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?

Schema coverage is 50% (conditionId described, first undocumented). Description maps 'specific market' to conditionId and implies 'first' controls the 'top' result count, but doesn't explicitly document the parameter format or default 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?

Clear verb (Get) and resource (market position holders). Specifies 'top' holders and 'PnL' data, distinguishing from sibling tools like get_trader_positions (trader-centric) and get_top_traders (trader rankings vs market positions).

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?

No explicit guidance on when to use versus alternatives like get_trader_positions (user-specific) or get_market_analytics (aggregate data). No mention of prerequisites or filtering limitations.

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/limitless-subgraphs'

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