Skip to main content
Glama

chat

Build and refine AI workflows through natural language conversation. Describe your workflow needs in plain English to get structured recommendations, integration guidance, and iterative design support without manual JSON construction.

Instructions

Send a message to the AgentLed AI agent and get a response. The agent can reason, plan, and build workflows through natural language conversation — no need to construct pipeline JSON manually.

Use this tool when you want to:

  • Build a workflow from a high-level description ("Create a lead enrichment workflow for SaaS companies")

  • Get recommendations on how to structure a workflow

  • Ask questions about available integrations or capabilities

  • Iterate on workflow design through conversation

The agent has access to the same planning tools, workflow builder, and workspace context as the in-app chat.

For multi-turn conversations, pass the session_id returned from the first message to maintain context across messages.

Example: chat("Build me a workflow that takes a LinkedIn company URL, enriches the data, and scores it by ICP fit")

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
messageYesThe message to send to the AI agent
session_idNoSession ID for multi-turn conversations. Use the session_id from a previous response to continue the same conversation.

Implementation Reference

  • The async handler function for the 'chat' tool that calls the agent API.
    async ({ message, session_id }, extra) => {
        const client = clientFactory(extra);
        try {
            const result = await client.chat(message, session_id);
    
            if (result.error) {
                return {
                    content: [{
                        type: 'text' as const,
                        text: `Chat error: ${result.error}`,
                    }],
                    isError: true,
                };
            }
    
            return {
                content: [{
                    type: 'text' as const,
                    text: result.response || JSON.stringify(result, null, 2),
                }],
            };
        } catch (error: any) {
            return {
                content: [{
                    type: 'text' as const,
                    text: `Chat request failed: ${error?.message || 'Unknown error'}`,
                }],
                isError: true,
            };
        }
    }
  • Registration function for the 'chat' tool using server.tool.
    export function registerChatTools(server: McpServer, clientFactory: ClientFactory) {
    
        server.tool(
            'chat',
            `Send a message to the AgentLed AI agent and get a response. The agent can reason, plan, and build workflows through natural language conversation — no need to construct pipeline JSON manually.
    
    Use this tool when you want to:
    - Build a workflow from a high-level description ("Create a lead enrichment workflow for SaaS companies")
    - Get recommendations on how to structure a workflow
    - Ask questions about available integrations or capabilities
    - Iterate on workflow design through conversation
    
    The agent has access to the same planning tools, workflow builder, and workspace context as the in-app chat.
    
    For multi-turn conversations, pass the session_id returned from the first message to maintain context across messages.
    
    Example: chat("Build me a workflow that takes a LinkedIn company URL, enriches the data, and scores it by ICP fit")`,
            {
                message: z.string().describe('The message to send to the AI agent'),
                session_id: z.string().optional().describe('Session ID for multi-turn conversations. Use the session_id from a previous response to continue the same conversation.'),
            },
            async ({ message, session_id }, extra) => {
                const client = clientFactory(extra);
                try {
                    const result = await client.chat(message, session_id);
    
                    if (result.error) {
                        return {
                            content: [{
                                type: 'text' as const,
                                text: `Chat error: ${result.error}`,
                            }],
                            isError: true,
                        };
                    }
    
                    return {
                        content: [{
                            type: 'text' as const,
                            text: result.response || JSON.stringify(result, null, 2),
                        }],
                    };
                } catch (error: any) {
                    return {
                        content: [{
                            type: 'text' as const,
                            text: `Chat request failed: ${error?.message || 'Unknown error'}`,
                        }],
                        isError: true,
                    };
                }
            }
        );
    }
  • Input validation schema for the 'chat' tool using Zod.
    {
        message: z.string().describe('The message to send to the AI agent'),
        session_id: z.string().optional().describe('Session ID for multi-turn conversations. Use the session_id from a previous response to continue the same conversation.'),
    },
Behavior4/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 effectively describes key behaviors: the agent's capabilities ('reason, plan, and build workflows'), multi-turn conversation handling ('pass the session_id... to maintain context'), and integration with the platform ('access to the same planning tools... as the in-app chat'). It doesn't mention rate limits or authentication requirements, but provides substantial operational context.

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 well-structured and efficiently organized: it starts with a clear purpose statement, follows with specific usage guidelines in bullet points, adds important behavioral context, and concludes with a concrete example. Every sentence serves a distinct purpose without redundancy or unnecessary elaboration.

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

Completeness4/5

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

For a conversational AI tool with no annotations and no output schema, the description provides substantial context about capabilities, usage patterns, and multi-turn conversation handling. It could be more complete by describing response formats or error conditions, but it adequately covers the tool's primary function and integration within the workflow automation 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 100%, providing solid baseline documentation for both parameters. The description adds minimal parameter-specific information beyond the schema - it mentions session_id for 'multi-turn conversations' and provides an example showing message usage, but doesn't elaborate on parameter constraints or formats. This meets the baseline expectation when schema coverage is complete.

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

Purpose5/5

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

The description clearly states the tool's purpose: 'Send a message to the AgentLed AI agent and get a response.' It specifies the verb ('send a message') and resource ('AgentLed AI agent'), and distinguishes itself from sibling tools by focusing on conversational AI interaction rather than direct workflow manipulation tools like create_workflow or update_workflow.

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

Usage Guidelines5/5

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

The description provides explicit usage scenarios with a bulleted list: 'Use this tool when you want to: - Build a workflow from a high-level description... - Get recommendations... - Ask questions... - Iterate on workflow design...' It clearly differentiates when to use this conversational tool versus direct workflow manipulation tools among its siblings.

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

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/Agentled/mcp-server'

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