Skip to main content
Glama
PaulieB14

Limitless MCP

get_market_analytics

Retrieve comprehensive market analytics by conditionId, combining on-chain data like volume and trades with metadata such as title and categories for complete market analysis.

Instructions

Get full analytics for a specific market by conditionId. Combines on-chain data (volume, trades, fees, resolution status) with market metadata (title, description, categories). Queries both subgraphs to find the market.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
conditionIdYesThe conditionId (hex) of the market

Implementation Reference

  • The registration and handler implementation for the 'get_market_analytics' tool, which queries market and condition data from subgraphs and fetches metadata to provide a comprehensive market report.
    server.registerTool(
      "get_market_analytics",
      {
        description:
          "Get full analytics for a specific market by conditionId. Combines on-chain data (volume, trades, fees, resolution status) with market metadata (title, description, categories). Queries both subgraphs to find the market.",
        inputSchema: {
          conditionId: z.string().describe("The conditionId (hex) of the market"),
        },
      },
      async ({ conditionId }) => {
        try {
          const marketQuery = (entity: string) => `{
            ${entity}(id: "${conditionId}") {
              id venue tradesCount buysCount sellsCount
              volumeUSD buyVolumeUSD sellVolumeUSD feesUSD
              createdAt createdTx
            }
            condition(id: "${conditionId}") {
              id oracle questionId outcomeSlotCount resolved
              payoutNumerators resolvedAt resolvedTx createdAt
            }
          }`;
    
          const [simpleData, negriskData, meta] = await Promise.all([
            querySimple(marketQuery("market")),
            queryNegRisk(marketQuery("negRiskMarket")),
            getMarketMeta(conditionId),
          ]);
    
          const onChain = simpleData.market || negriskData.negRiskMarket;
          const condition = simpleData.condition || negriskData.condition;
          const marketType = simpleData.market ? "simple" : negriskData.negRiskMarket ? "negrisk" : "unknown";
    
          return textResult({
            title: meta?.title || "Unknown",
            description: meta?.description || "",
            categories: meta?.categories || [],
            slug: meta?.slug || "",
            currentPrices: meta?.prices || [],
            expirationDate: meta?.expirationDate || "",
            tradeType: meta?.tradeType || "",
            marketType,
            onChain: onChain || null,
            condition: condition || null,
          });
        } catch (e) {
          return errorResult(e);
        }
      }
    );
Behavior3/5

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

No annotations provided. Description adds the behavioral detail that it 'Queries both subgraphs,' indicating data source complexity, but lacks other critical behavioral disclosures like error handling (what happens if conditionId invalid), rate limits, or authentication requirements.

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?

Three sentences efficiently structured: purpose declaration, data scope enumeration, and implementation detail. All content earns its place without redundancy, though 'Queries both subgraphs' is implementation detail that could be optional.

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?

Compensates adequately for missing output schema by enumerating return fields (volume, trades, fees, resolution status, title, description, categories). Adequate for a single-parameter tool, though return structure/format remains unspecified.

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 100% with conditionId well-documented in schema (type, hex format). Description references the parameter ('by conditionId') but adds no additional semantic detail beyond the schema description, warranting baseline score of 3.

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?

States specific action (Get) and resource (full analytics for a specific market). Distinguishes from siblings by listing comprehensive data components (volume, trades, fees, resolution status, metadata) vs partial-data tools like get_market_trades.

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 this versus siblings (e.g., get_market_lifecycle, get_market_daily_snapshots). While it implies comprehensiveness by listing data components, it does not specify prerequisites or when to prefer alternatives.

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