Skip to main content
Glama

createBot

createBot

Generate a new Typebot chatbot by specifying a name and optional description. Ideal for quickly setting up chatbot workflows using the MCP-Typebot server’s JSON interface.

Instructions

Crea un nuevo Typebot. Requiere “name”, opcional “description”

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
descriptionNo
nameYes
workspaceIdNo

Implementation Reference

  • The core handler function that ensures authentication, derives workspaceId, builds the payload, and creates a new Typebot via API POST request.
    export async function createBot(args: CreateBotArgs) {
      ensureAuth(); 
      const workspaceId =
        args.workspaceId || process.env.TYPEBOT_WORKSPACE_ID;
      if (!workspaceId) {
        throw new Error(
          'createBot: falta workspaceId (ni en args ni en process.env)'
        );
      }
    
      const payload = {
        workspaceId,
        typebot: {
          name: args.name,
          description: args.description,
        },
      };
    
      const response = await axios.post(
        'https://app.typebot.io/api/v1/typebots',
        payload
      );
      return response.data;
    }
  • Zod schema for input validation of the createBot tool, matching the CreateBotArgs interface.
    schema: z.object({
      workspaceId: z.string().optional(),
      name:        z.string().min(1, "El campo 'name' es obligatorio."),
      description: z.string().optional(),
    }),
  • src/index.ts:36-44 (registration)
    Tool registration entry in toolsMap, linking the createBot function, its description, and schema for MCP server registration.
    ['createBot', {
      func: createBot,
      description: 'Crea un nuevo Typebot. Requiere “name”, opcional “description”',
      schema: z.object({
        workspaceId: z.string().optional(),
        name:        z.string().min(1, "El campo 'name' es obligatorio."),
        description: z.string().optional(),
      }),
    }],
  • TypeScript type definition for CreateBotArgs used in the handler function signature.
    export interface CreateBotArgs {
      workspaceId?: string;
      name: string;
      description?: string;
    }
  • Helper function ensureAuth() called at the start of createBot to verify Authorization token is set.
    function ensureAuth() {
      const header = axios.defaults.headers.common['Authorization'];
      if (!header) {
        throw new Error(
          'No hay token configurado. Llama primero a authenticate o define TYPEBOT_TOKEN.'
        );
      }
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states that the tool creates a new Typebot, implying a write operation, but doesn't cover permissions needed, whether the creation is idempotent, error conditions, or what the response includes. This leaves significant gaps for a mutation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise with two sentences that directly state the tool's purpose and parameter requirements. It is front-loaded and wastes no words, making it efficient for quick understanding.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of a creation tool with no annotations and no output schema, the description is incomplete. It lacks details on behavioral traits, error handling, return values, and doesn't fully cover all parameters, making it insufficient for reliable agent use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description adds meaningful context beyond the input schema by specifying that 'name' is required and 'description' is optional, which clarifies parameter roles despite 0% schema description coverage. However, it doesn't mention 'workspaceId', leaving one parameter undocumented, slightly reducing effectiveness.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Crea un nuevo Typebot') and resource ('Typebot'), making the purpose evident. It distinguishes from siblings like 'updateBot' or 'deleteBot' by specifying creation. However, it doesn't explicitly differentiate from 'publishBot' which might involve creation aspects.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives like 'updateBot' for modifications or 'listBots' for viewing. The description mentions required and optional parameters but doesn't specify contextual usage scenarios or prerequisites.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/osdeibi/MCP-typebot'

If you have feedback or need assistance with the MCP directory API, please join our Discord server