deleteBot
Remove a Typebot chatbot by specifying its unique bot ID using this tool on the MCP-Typebot server.
Instructions
Elimina 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:127-136 (handler)The main handler function for the 'deleteBot' tool. It ensures authentication, validates the botId, and sends a DELETE request to the Typebot API to delete the specified bot.export async function deleteBot(args: DeleteBotArgs) { ensureAuth(); const { botId } = args; if (!botId) throw new Error('deleteBot: falta botId'); const response = await axios.delete( `https://app.typebot.io/api/v1/typebots/${botId}` ); return response.data; }
- src/tools/bots.ts:123-125 (schema)TypeScript interface defining the input arguments for the deleteBot function, requiring a botId string.export interface DeleteBotArgs { botId: string; }
- src/index.ts:64-68 (registration)Registration of the 'deleteBot' tool in the MCP server's toolsMap. Specifies the handler function, description, and Zod input schema for validation.['deleteBot', { func: deleteBot, description: 'Elimina un Typebot por su ID', schema: z.object({ botId: z.string().min(1, "El campo 'botId' es obligatorio.") }), }],
- src/index.ts:67-67 (schema)Zod schema used for input validation of the 'deleteBot' tool during registration, ensuring botId is a non-empty string.schema: z.object({ botId: z.string().min(1, "El campo 'botId' es obligatorio.") }),