listResults
Retrieve 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
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| botId | Yes | ||
| cursor | No | ||
| limit | No | ||
| timeFilter | No | ||
| timeZone | No |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"botId": {
"minLength": 1,
"type": "string"
},
"cursor": {
"type": "string"
},
"limit": {
"maximum": 100,
"minimum": 1,
"type": "integer"
},
"timeFilter": {
"type": "string"
},
"timeZone": {
"type": "string"
}
},
"required": [
"botId"
],
"type": "object"
}
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(), }), }],