Skip to main content
Glama

list_marketplace_offers

Retrieve active token trading offers from the loyalty program marketplace to view available trades and manage rewards.

Instructions

List active token trading offers on the marketplace

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
statusNoFilter: active/completed/cancelled
limitNoMax results (1-100)

Implementation Reference

  • The handler logic for the 'list_marketplace_offers' tool, which fetches data from the 'marketplace_offers' table in Supabase.
    handler: async ({ status, limit }: any) => {
      const err = authGuard();
      if (err) return T(err);
      const { data, error } = await db().from("marketplace_offers").select("*").eq("status", status || "active").order("created_at", { ascending: false }).limit(Math.min(limit || 50, 100));
      if (error) return T(JSON.stringify({ error: error.message }));
      return T(JSON.stringify({ offers: data || [] }));
    },
  • Registration of the 'list_marketplace_offers' tool within the MCP server.
    mcpServer.tool("list_marketplace_offers", {
      description: "List active token trading offers on the marketplace",
      inputSchema: { type: "object" as const, properties: { status: { type: "string", description: "Filter: active/completed/cancelled" }, limit: { type: "number", description: "Max results (1-100)" } } },
      handler: async ({ status, limit }: any) => {
        const err = authGuard();
        if (err) return T(err);
        const { data, error } = await db().from("marketplace_offers").select("*").eq("status", status || "active").order("created_at", { ascending: false }).limit(Math.min(limit || 50, 100));
        if (error) return T(JSON.stringify({ error: error.message }));
        return T(JSON.stringify({ offers: data || [] }));
      },
    });

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/aspekt19/unboxed-loyalty-spark'

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