Skip to main content
Glama
PaulieB14

Limitless MCP

get_recent_activity

Retrieve a unified feed of recent on-chain activity including trades, splits, merges, and redemptions across all markets with market names.

Instructions

Get a unified feed of all recent on-chain activity: trades, splits, merges, and redemptions across both market types with market names.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
firstNo

Implementation Reference

  • The implementation of the 'get_recent_activity' tool handler, which queries recent trades, splits, merges, and redemptions across both market types and processes them into a unified events list.
    async ({ first }) => {
      try {
        const activityQuery = `{
          trades(first: ${first}, orderBy: timestamp, orderDirection: desc) {
            id market { id } type maker taker amountUSD price timestamp txHash
          }
          splits(first: ${first}, orderBy: timestamp, orderDirection: desc) {
            id stakeholder { id } conditionId amountUSD timestamp txHash
          }
          merges(first: ${first}, orderBy: timestamp, orderDirection: desc) {
            id stakeholder { id } conditionId amountUSD timestamp txHash
          }
          redemptions(first: ${first}, orderBy: timestamp, orderDirection: desc) {
            id redeemer { id } conditionId payoutUSD timestamp txHash
          }
        }`;
    
        const { simple, negrisk } = await queryBoth(activityQuery, activityQuery);
    
        const events: any[] = [];
        for (const src of [simple, negrisk]) {
          for (const t of src.trades || []) {
            events.push({
              type: "TRADE",
              subType: t.type,
              conditionId: t.market?.id,
              user: t.maker,
              counterparty: t.taker,
              amountUSD: t.amountUSD,
              price: t.price,
              timestamp: t.timestamp,
              txHash: t.txHash,
            });
          }
          for (const s of src.splits || []) {
            events.push({ type: "SPLIT", conditionId: s.conditionId, user: s.stakeholder?.id, amountUSD: s.amountUSD, timestamp: s.timestamp, txHash: s.txHash });
          }
          for (const m of src.merges || []) {
            events.push({ type: "MERGE", conditionId: m.conditionId, user: m.stakeholder?.id, amountUSD: m.amountUSD, timestamp: m.timestamp, txHash: m.txHash });
          }
          for (const r of src.redemptions || []) {
            events.push({ type: "REDEMPTION", conditionId: r.conditionId, user: r.redeemer?.id, amountUSD: r.payoutUSD, timestamp: r.timestamp, txHash: r.txHash });
          }
        }
    
        events.sort((a, b) => Number(b.timestamp) - Number(a.timestamp));
        const top = events.slice(0, first);
    
        const cids = [...new Set(top.map((e) => e.conditionId).filter(Boolean))];
        const names = new Map<string, string>();
        await Promise.all(cids.map(async (id) => names.set(id, await hydrateName(id))));
        const enriched = top.map((e) => ({
          ...e,
          marketName: names.get(e.conditionId) || e.conditionId,
        }));
    
        return textResult({ count: enriched.length, activity: enriched });
      } catch (e) {
        return errorResult(e);
  • The registration of the 'get_recent_activity' tool in the MCP server, including its description and input schema.
    server.registerTool(
      "get_recent_activity",
      {
        description:
          "Get a unified feed of all recent on-chain activity: trades, splits, merges, and redemptions across both market types with market names.",
        inputSchema: {
          first: z.number().default(30),
        },
      },
Behavior3/5

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

With no annotations provided, the description must carry the full disclosure burden. It successfully enumerates the specific activity types included (trades, splits, merges, redemptions) and mentions 'market names' are included. However, it fails to clarify what 'recent' means (time window), pagination behavior, or whether the feed is real-time vs cached.

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?

The description is a single dense sentence that efficiently conveys the tool's purpose and content types without redundancy. Every element serves to specify the scope or contents of the feed.

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

Completeness3/5

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

Given the lack of output schema and annotations, the description adequately covers what data is returned (activity types and market names) but omits operational context like pagination mechanics, time range constraints for 'recent', and response structure that would be necessary for complete tool selection confidence.

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

Parameters2/5

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

Schema description coverage is 0% for the single 'first' parameter, so the description must compensate. It fails to mention the 'first' parameter entirely, leaving undocumented what '30' represents (presumably result count/limit) and how pagination works.

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 identifies the action ('Get'), resource ('unified feed'), and specific scope ('trades, splits, merges, and redemptions across both market types'). The terms 'unified' and 'across both market types' implicitly distinguish it from sibling tools like get_market_trades or get_trader_trades which likely target specific entities, though explicit differentiation is absent.

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 description implies usage through the word 'unified' (suggesting use when aggregating across markets), but provides no explicit when-to-use guidance or named alternatives. It doesn't clarify whether this should be preferred over get_liquidity_events or specific trade getters.

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