Skip to main content
Glama

list_user_searches

Retrieve paginated lists of user searches with status filtering for social media analytics across multiple platforms.

Instructions

List all user searches. Returns a paginated list filtered by status.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
showNoFilter by status (default: all)
pageNoPage number (100 results per page)

Implementation Reference

  • Registration of the 'list_user_searches' tool, including its schema/parameter validation.
    server.tool(
      "list_user_searches",
      "List all user searches. Returns a paginated list filtered by status.",
      {
        show: z
          .enum(["all", "started", "finished", "pending", "failed"])
          .optional()
          .describe("Filter by status (default: all)"),
        page: z.number().int().positive().optional().describe("Page number (100 results per page)"),
      },
  • Handler function implementation for 'list_user_searches', which fetches data from the API.
    async (params) => {
      try {
        const queryParts: string[] = [];
        if (params.show) queryParts.push(`show=${params.show}`);
        if (params.page !== undefined) queryParts.push(`page=${params.page}`);
        const query = queryParts.length ? `?${queryParts.join("&")}` : "";
        const data = await apiGet(`/iq/user_search${query}`);
        return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] };
      } catch (e) {
        return { content: [{ type: "text", text: String(e) }], isError: true };
      }
    }

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/rolliinc/rolli-mcp'

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