listResults
listResultsRetrieve and manage chatbot interaction results from MCP-Typebot by specifying bot ID, time filters, and result limits to organize and analyze user engagement data effectively.
Instructions
Lista resultados de un Typebot
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"botId": "<botId>"
},
"name": "listResults"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| botId | Yes | ||
| cursor | No | ||
| limit | No | ||
| timeFilter | No | ||
| timeZone | No |
Implementation Reference
- src/tools/bots.ts:185-209 (handler)The main handler function that implements the listResults tool logic, authenticating and calling the Typebot API to list results.
export async function listResults(args: ListResultsArgs) { ensureAuth(); const { botId, limit = 50, cursor, timeFilter = 'last7Days', timeZone, } = args; if (!botId) throw new Error('listResults: falta botId'); if (limit < 1 || limit > 100) { throw new Error('listResults: limit debe estar entre 1 y 100'); } const params: Record<string, any> = { limit, timeFilter }; if (cursor) params.cursor = cursor; if (timeZone) params.timeZone = timeZone; const response = await axios.get( `https://app.typebot.io/api/v1/typebots/${botId}/results`, { params } ); return response.data; } - src/tools/bots.ts:170-183 (schema)TypeScript interface defining the input parameters for the listResults function.
export interface ListResultsArgs { botId: string; limit?: number; cursor?: string; timeFilter?: | 'today' | 'last7Days' | 'last30Days' | 'monthToDate' | 'lastMonth' | 'yearToDate' | 'allTime'; timeZone?: string; } - src/index.ts:82-88 (schema)Zod schema used for input validation of the listResults tool.
schema: z.object({ botId: z.string().min(1, "El campo 'botId' es obligatorio."), limit: z.number().int().min(1).max(100).optional(), cursor: z.string().optional(), timeFilter: z.string().optional(), timeZone: z.string().optional(), }), - src/index.ts:79-89 (registration)Registration configuration for the listResults tool in the tools map, which is later used to register with the MCP server.
['listResults', { func: listResults, description: 'Lista resultados de un Typebot', schema: z.object({ botId: z.string().min(1, "El campo 'botId' es obligatorio."), limit: z.number().int().min(1).max(100).optional(), cursor: z.string().optional(), timeFilter: z.string().optional(), timeZone: z.string().optional(), }), }],