getBot
Retrieve a Typebot chatbot by its unique ID using the MCP-Typebot server for efficient bot management and integration.
Instructions
Recupera un Typebot por su ID
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| botId | Yes |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"botId": {
"minLength": 1,
"type": "string"
}
},
"required": [
"botId"
],
"type": "object"
}
Implementation Reference
- src/tools/bots.ts:68-77 (handler)The main execution function (handler) for the 'getBot' tool. It ensures authentication, validates botId, and fetches the bot data from the Typebot API using axios.export async function getBot(args: GetBotArgs) { ensureAuth(); const { botId } = args; if (!botId) throw new Error('getBot: falta botId'); const response = await axios.get( `https://app.typebot.io/api/v1/typebots/${botId}` ); return response.data; }
- src/tools/bots.ts:64-66 (schema)TypeScript interface defining the expected input shape for the getBot handler: an object with a required 'botId' string.export interface GetBotArgs { botId: string; }
- src/index.ts:50-54 (registration)The tool registration entry in the toolsMap Map, which includes the handler reference (getBot), description, and Zod input validation schema. This is later used in server.registerTool().['getBot', { func: getBot, description: 'Recupera un Typebot por su ID', schema: z.object({ botId: z.string().min(1, "El campo 'botId' es obligatorio.") }), }],
- src/index.ts:53-53 (schema)Zod schema for input validation of the 'getBot' tool, requiring a non-empty 'botId' string.schema: z.object({ botId: z.string().min(1, "El campo 'botId' es obligatorio.") }),