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
| Name | Required | Description | Default |
|---|---|---|---|
| show | No | Filter by status (default: all) | |
| page | No | Page number (100 results per page) |
Implementation Reference
- src/tools/user-search.ts:13-22 (registration)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)"), }, - src/tools/user-search.ts:23-34 (handler)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 }; } }