Skip to main content
Glama
Sifu213
by Sifu213

get-top-selling-collections

Retrieve top-selling NFT collections on Magic Eden testnet to analyze market trends and identify high-volume performers by specifying a time period.

Instructions

Retrieve top selling NFT collections on Magic Eden testnet

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
periodYesMagic Eden user address on Monad testnet

Implementation Reference

  • The handler function that fetches top selling NFT collections from the Magic Eden API for the given period, sorts them by sales count, formats the output, and handles errors by returning text content.
    async ({ period }) => {
      const url =
      `https://api-mainnet.magiceden.dev/v3/rtp/monad-testnet/collections/trending/v1?period=${period}&limit=50&sortBy=sales&normalizeRoyalties=false&useNonFlaggedFloorAsk=false`
    
      try {
        const res = await fetch(url);
        if (!res.ok) {
          throw new Error(`MagicEden API error: ${res.status} ${res.statusText}`);
        }
    
        const data =
          (await res.json()) as { collections: Array<{ name: string; count: number }> };
    
        // Sort by number of sales (count) and build output lines
        const lines = data.collections
          .sort((a, b) => b.count - a.count)
          .map(item => `${item.name}: ${item.count} sales`);
    
        const output = lines.join("\n");
    
        return {
          content: [
            {
              type: "text",
              text: output,
            },
          ],
        };
      } catch (err) {
        const msg = err instanceof Error ? err.message : String(err);
        return {
          content: [
            {
              type: "text",
              text: `Failed to fetch trending collections : ${msg}`,
            },
          ],
        };
      }
    }
  • Zod schema defining the input parameter 'period' as a string for the tool.
    {
    period: z.string().describe("Magic Eden user address on Monad testnet"),
    },
  • Registers the 'get-top-selling-collections' tool with the MCP server, providing the tool name and description.
    server.tool(
      "get-top-selling-collections",
      "Retrieve top selling NFT collections on Magic Eden testnet",
  • Initializes the MCP server instance declaring the 'top-selling-collections' capability.
    const server = new McpServer({
      name: "monad-mcp-magiceden",
      version: "0.0.2",
      capabilities: ["top-selling-collections"],
    });
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions retrieving data but lacks details on rate limits, authentication needs, response format, or any side effects. This leaves significant gaps in understanding how the tool behaves in practice.

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, direct sentence that efficiently conveys the core function without unnecessary words. It is appropriately sized for a simple tool, though it could be slightly more structured by including key details like output format or usage context.

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

Completeness2/5

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

Given the lack of annotations and output schema, the description is incomplete. It does not explain what the tool returns, potential errors, or behavioral traits like performance or limitations. For a tool with no structured support, the description should provide more context to be fully helpful.

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 schema description coverage is 100%, with the parameter 'period' documented in the schema. The description does not add any meaning beyond the schema, such as explaining what 'period' represents or valid values. However, with high schema coverage, the baseline score of 3 is appropriate as the schema handles the parameter documentation adequately.

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 states the action ('Retrieve') and resource ('top selling NFT collections on Magic Eden testnet'), making the purpose understandable. However, with no sibling tools mentioned, it cannot demonstrate differentiation from alternatives, which prevents a score of 5.

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?

The description provides no guidance on when to use this tool versus alternatives, prerequisites, or constraints. It merely states what the tool does without context for its application, leaving usage unclear beyond the basic function.

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/Sifu213/monad-mcp-magiceden'

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