publishBot
Deploy a Typebot chatbot to production using its unique bot ID via the MCP-Typebot server. Simplify publishing with a streamlined JSON interface for efficient bot management.
Instructions
Publica un Typebot existente
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:142-152 (handler)The handler function that implements the publishBot tool logic. It authenticates, validates the botId, and sends a POST request to publish the Typebot.export async function publishBot(args: PublishBotArgs) { ensureAuth(); const { botId } = args; if (!botId) throw new Error('publishBot: falta botId'); const response = await axios.post( `https://app.typebot.io/api/v1/typebots/${botId}/publish`, {} ); return response.data; }
- src/tools/bots.ts:138-140 (schema)TypeScript interface defining the input arguments for the publishBot handler.export interface PublishBotArgs { botId: string; }
- src/index.ts:69-73 (registration)Configuration and registration entry for the publishBot tool in the MCP server's toolsMap, including the Zod input schema for validation.['publishBot', { func: publishBot, description: 'Publica un Typebot existente', schema: z.object({ botId: z.string().min(1, "El campo 'botId' es obligatorio.") }), }],
- src/index.ts:19-23 (registration)Import statement that brings the publishBot handler into the main index file for registration.publishBot, unpublishBot, listResults, startChat, } from './tools/bots';