Skip to main content
Glama
PaulieB14

Limitless MCP

get_global_stats

Retrieve comprehensive protocol statistics including total markets, trades, volume, users, splits, merges, and redemptions across all market types.

Instructions

Get combined protocol-wide stats across both simple and negrisk markets. Returns total markets, trades, volume, users, splits, merges, redemptions with per-type breakdown.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The implementation of the `get_global_stats` tool. It queries both subgraphs, sums up the statistics, and returns them as a JSON result.
    server.registerTool(
      "get_global_stats",
      {
        description:
          "Get combined protocol-wide stats across both simple and negrisk markets. Returns total markets, trades, volume, users, splits, merges, redemptions with per-type breakdown.",
      },
      async () => {
        try {
          const { simple, negrisk } = await queryBoth(
            `{ globalStats(id: "0x73696d706c65") { totalMarkets resolvedMarkets totalTradesCount totalVolumeUSD totalFeesUSD totalUsers totalSplits totalMerges totalRedemptions } _meta { block { number } hasIndexingErrors } }`,
            `{ globalStats(id: "0x6e65677269736b") { totalMarkets resolvedMarkets totalTradesCount totalVolumeUSD totalFeesUSD totalUsers totalSplits totalMerges totalRedemptions } _meta { block { number } hasIndexingErrors } }`
          );
    
          const s = simple.globalStats || {};
          const n = negrisk.globalStats || {};
    
          return textResult({
            combined: {
              totalMarkets: (s.totalMarkets || 0) + (n.totalMarkets || 0),
              resolvedMarkets: (s.resolvedMarkets || 0) + (n.resolvedMarkets || 0),
              totalTradesCount:
                BigInt(s.totalTradesCount || "0") + BigInt(n.totalTradesCount || "0"),
              totalVolumeUSD:
                parseFloat(s.totalVolumeUSD || "0") + parseFloat(n.totalVolumeUSD || "0"),
              totalFeesUSD:
                parseFloat(s.totalFeesUSD || "0") + parseFloat(n.totalFeesUSD || "0"),
              totalUsers: (s.totalUsers || 0) + (n.totalUsers || 0),
              totalSplits:
                BigInt(s.totalSplits || "0") + BigInt(n.totalSplits || "0"),
              totalMerges:
                BigInt(s.totalMerges || "0") + BigInt(n.totalMerges || "0"),
              totalRedemptions:
                BigInt(s.totalRedemptions || "0") + BigInt(n.totalRedemptions || "0"),
            },
            simpleMarkets: s,
            negriskMarkets: n,
            sync: {
              simple: simple._meta,
              negrisk: negrisk._meta,
            },
          });
        } catch (e) {
          return errorResult(e);
        }
      }
    );
Behavior4/5

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

With no annotations and no output schema, the description carries the full burden of disclosure. It compensates by enumerating the specific return fields (markets, trades, volume, users, splits, merges, redemptions) and hinting at structure ('per-type breakdown'). However, it omits operational details like caching behavior, rate limits, or real-time vs aggregated data lag.

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?

Two efficiently structured sentences with zero redundancy. First sentence establishes scope and action; second sentence details the return payload. Every clause adds value beyond the structured fields.

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 absence of an output schema, the description adequately covers the return value complexity by listing the specific metrics returned (including domain-specific ones like splits/merges/redemptions). For a zero-parameter read operation, this is sufficient, though mentioning data freshness or pagination would strengthen it further.

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

Parameters4/5

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

Input schema has zero parameters, establishing a baseline of 4 per evaluation rules. The description correctly omits parameter discussion since none exist, requiring no additional semantic clarification beyond the implicit 'no filters applied' nature of a global stats endpoint.

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?

Description clearly states the specific action (Get combined protocol-wide stats), the resource (stats), and the scope (across both simple and negrisk markets). This successfully distinguishes it from siblings like get_market_analytics (per-market) and get_daily_protocol_stats (time-series) by emphasizing the global, combined aggregation.

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

Usage Guidelines3/5

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

The scope mention ('across both simple and negrisk markets') implies this is for aggregate cross-type analysis rather than individual market queries, but there is no explicit when-to-use guidance or named alternatives. The agent must infer when to prefer this over more specific tools like compare_market_types.

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