Skip to main content
Glama

start_streaming_chat

Initiate a real-time chat session with an agent, enabling continuous message exchange. Specify the agent name and initial message to begin streaming interactions.

Instructions

Start a streaming chat session

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
agent_nameYesName of the agent
messageYesInitial message
streamingNoEnable streaming

Implementation Reference

  • Defines the input schema and description for the 'start_streaming_chat' MCP tool.
    {
      name: 'start_streaming_chat',
      description: 'Start a streaming chat session with real-time updates',
      inputSchema: {
        type: 'object',
        properties: {
          agent_name: { type: 'string', description: 'Name of the agent to chat with' },
          message: { type: 'string', description: 'Initial message' },
          streaming: { type: 'boolean', description: 'Enable real-time streaming' },
          progress_token: { type: 'string', description: 'Token for progress notifications' },
        },
        required: ['agent_name', 'message'],
      },
    },
  • Registers the 'start_streaming_chat' tool in the MCP server's ListToolsRequestSchema handler by including it in the static list of available tools.
    this.server.setRequestHandler(ListToolsRequestSchema, async () => ({
      tools: [
        {
          name: 'create_streaming_workflow',
          description: 'Create a workflow with real-time streaming and progress updates',
          inputSchema: {
            type: 'object',
            properties: {
              workflow_name: { type: 'string', description: 'Name for the workflow' },
              workflow_type: { type: 'string', description: 'Type of workflow' },
              agents: { type: 'array', description: 'List of agent configurations' },
              streaming: { type: 'boolean', description: 'Enable streaming' },
              progress_token: { type: 'string', description: 'Progress token' },
            },
            required: ['workflow_name', 'workflow_type', 'agents'],
          },
        },
        {
          name: 'start_streaming_chat',
          description: 'Start a streaming chat session with real-time updates',
          inputSchema: {
            type: 'object',
            properties: {
              agent_name: { type: 'string', description: 'Name of the agent to chat with' },
              message: { type: 'string', description: 'Initial message' },
              streaming: { type: 'boolean', description: 'Enable real-time streaming' },
              progress_token: { type: 'string', description: 'Token for progress notifications' },
            },
            required: ['agent_name', 'message'],
          },
        },
        {
          name: 'create_agent',
          description: 'Create a new AutoGen agent with enhanced capabilities',
          inputSchema: {
            type: 'object',
            properties: {
              name: { type: 'string', description: 'Unique name for the agent' },
              type: { type: 'string', description: 'Agent type' },
              system_message: { type: 'string', description: 'System message' },
              llm_config: { type: 'object', description: 'LLM configuration' },
            },
            required: ['name', 'type'],
          },
        },
        {
          name: 'execute_workflow',
          description: 'Execute a workflow with streaming support',
          inputSchema: {
            type: 'object',
            properties: {
              workflow_name: { type: 'string', description: 'Workflow name' },
              input_data: { type: 'object', description: 'Input data' },
              streaming: { type: 'boolean', description: 'Enable streaming' },
            },
            required: ['workflow_name', 'input_data'],
          },
        },
      ],
    }));
  • Dispatch logic in CallToolRequestSchema handler that identifies 'start_streaming_chat' as a streaming tool and routes it to handleStreamingTool.
    if (toolName === 'create_streaming_workflow' || toolName === 'start_streaming_chat') {
      return await this.handleStreamingTool(toolName, args, progressToken);
    }
  • Executes the 'start_streaming_chat' tool logic: initializes streaming progress notifications, calls the Python backend handler, sends SSE updates if streaming enabled, and completes with final notification.
    private async handleStreamingTool(toolName: string, args: any, progressToken?: string): Promise<any> {
      if (progressToken) {
        await this.sendProgressNotification(progressToken, 25, 'Initializing streaming...');
      }
    
      const result = await this.callPythonHandler(toolName, args);
    
      if (args.streaming && this.sseTransports.size > 0) {
        for (const transport of this.sseTransports.values()) {
          try {
            await transport.send({
              jsonrpc: '2.0',
              method: 'notifications/progress',
              params: {
                progressToken: progressToken || 'streaming',
                progress: 75,
                message: 'Streaming updates...',
                data: result,
              },
            });
          } catch (error) {
            console.error('Error sending streaming update:', error);
          }
        }
      }
    
      if (progressToken) {
        await this.sendProgressNotification(progressToken, 100, 'Streaming completed');
      }
    
      return result;
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 mentions 'streaming' but doesn't explain what that means operationally (e.g., real-time responses, event-driven flow, or connection handling). It also lacks details on permissions, rate limits, session management, or what 'start' implies (e.g., does it return a session ID?). This leaves significant gaps for a tool that likely involves ongoing interaction.

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 just four words: 'Start a streaming chat session'. It's front-loaded with the core action and resource, with no wasted words or redundant information. This efficiency is appropriate given the tool's straightforward name.

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 streaming chat tool (likely involving real-time interaction and session management), no annotations, and no output schema, the description is incomplete. It doesn't cover behavioral aspects like how streaming works, what the output looks like, error handling, or session lifecycle. This leaves the agent under-informed for effective tool invocation.

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 100%, so the input schema already documents all three parameters (agent_name, message, streaming) with clear descriptions. The tool description adds no additional meaning beyond what's in the schema, such as explaining how parameters interact (e.g., whether 'streaming' overrides agent settings) or providing usage examples. This meets the baseline for high schema coverage.

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

Purpose3/5

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

The description 'Start a streaming chat session' clearly states the action (start) and resource (streaming chat session), but it's somewhat vague about what 'streaming chat' entails compared to regular chat. It doesn't differentiate from sibling tools like 'create_streaming_workflow' or 'execute_workflow', leaving ambiguity about when to use this versus those alternatives.

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 provides no guidance on when to use this tool versus sibling tools like 'create_agent', 'create_streaming_workflow', or 'execute_workflow'. There's no mention of prerequisites, alternatives, or specific contexts where this tool is appropriate, leaving the agent to guess based on tool names alone.

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/DynamicEndpoints/Autogen_MCP'

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