Skip to main content
Glama

startChat

startChat

Initiate a chat session with a Typebot using a specific botId, optionally include chat context for personalized interactions via the MCP-Typebot server.

Instructions

Inicia un chat con un Typebot. Requiere botId, opcional chat.context

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
botIdYes
chatNo

Implementation Reference

  • The core handler function that implements the 'startChat' tool logic. It authenticates, validates botId, prepares payload with optional chat context, and POSTs to Typebot API to start a chat session.
    export async function startChat(args: StartChatArgs) {
      ensureAuth();
    
      const { botId, chat } = args;
      if (!botId) throw new Error('startChat: falta botId');
    
      const payload: Record<string, any> = {};
      if (chat) payload.chat = chat;
    
      const response = await axios.post(
        `https://app.typebot.io/api/v1/typebots/${botId}/chat/start`,
        payload
      );
      return response.data;
    }
  • TypeScript interface defining the input parameters for the startChat function: required botId and optional chat object with context.
    export interface StartChatArgs {
      botId: string;
      chat?: {
        context?: Record<string, any>;
      };
    }
  • Zod schema for input validation of the 'startChat' tool, used in MCP tool registration.
    schema: z.object({
      botId: z.string().min(1, "El campo 'botId' es obligatorio."),
      chat: z.object({
        context: z.record(z.any()).optional(),
      }).optional(),
    }),
  • src/index.ts:90-99 (registration)
    Registration entry in toolsMap for the 'startChat' tool, including func reference, description, and input schema, which is later used to register the tool with the MCP server.
    ['startChat', {
      func: startChat,
      description: 'Inicia un chat con un Typebot. Requiere botId, opcional chat.context',
      schema: z.object({
        botId: z.string().min(1, "El campo 'botId' es obligatorio."),
        chat: z.object({
          context: z.record(z.any()).optional(),
        }).optional(),
      }),
    }],
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 the tool initiates a chat, implying a write/mutation operation, but doesn't describe what happens after initiation (e.g., returns a chat ID, starts a session, requires authentication, or has rate limits). This leaves significant gaps in understanding the tool's behavior beyond the basic action.

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 a single, efficient sentence that front-loads the core purpose and includes essential parameter information. There is no wasted text, and it effectively communicates the necessary details in a compact form, making it easy to parse quickly.

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 tool's complexity (2 parameters with nested objects, no output schema, and no annotations), the description is incomplete. It lacks details on what the tool returns (e.g., a chat object or session ID), error conditions, authentication needs, or how it integrates with sibling tools like listResults. This makes it inadequate for fully understanding the tool's use in context.

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

Parameters3/5

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

Schema description coverage is 0%, so the description must compensate. It adds value by specifying that botId is required and chat.context is optional, which clarifies parameter roles beyond the schema's structural definition. However, it doesn't explain what botId represents (e.g., a bot identifier string) or what chat.context contains (e.g., initial conversation data), leaving semantics partially unclear.

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 ('Inicia un chat') and resource ('con un Typebot'), making the purpose understandable. It distinguishes from siblings like createBot or getBot by focusing on chat initiation rather than bot management. However, it doesn't explicitly differentiate from potential chat-related siblings that might not exist in the current list.

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?

The description mentions that botId is required and chat.context is optional, which provides basic parameter guidance. However, it offers no guidance on when to use this tool versus alternatives, such as whether this is for starting new chats versus continuing existing ones, or how it relates to other bot operations like publishBot or listResults.

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