Skip to main content
Glama

create_agent_chat_event

Post agent execution events like tool calls, results, thoughts, errors, and tasks in chat rooms to document workflow progress without direct participant mentions.

Instructions

Post an event in a chat room (tool_call, tool_result, thought, error, task).

Creates a new event in a chat room. Events do NOT require mentions - they report what happened rather than directing messages at participants. Event types and their content/metadata structure: - **tool_call**: Agent invokes a tool - content: Human-readable description (e.g., "Calling send_direct_message_service") - metadata: {"function": {"name": "fn_name", "arguments": {...}}, "id": "call_id", "type": "function"} - **tool_result**: Result from tool execution - content: Human-readable summary (e.g., "Message sent successfully") - metadata: {"success": true, "message": "...", ...result data} - **thought**: Agent's internal reasoning - content: The reasoning text - metadata: Optional - **error**: Error or failure notification - content: Error message - metadata: {"error_code": "...", "details": {...}} - **task**: Task-related message - content: Task message - metadata: Optional For text messages with mentions, use create_agent_chat_message instead. Args: chat_id: The unique identifier of the chat room (required). content: Human-readable event content (required). message_type: Event type (required). One of: 'tool_call', 'tool_result', 'thought', 'error', 'task'. metadata: Optional JSON object with structured event data. Structure varies by message_type. Returns: JSON string containing the created event details. Examples: # Tool call event create_agent_chat_event( chat_id="123", content="Calling weather_service", message_type="tool_call", metadata='{"function": {"name": "get_weather", "arguments": {"city": "NYC"}}, "id": "call_1", "type": "function"}' ) # Tool result event create_agent_chat_event( chat_id="123", content="Weather retrieved successfully", message_type="tool_result", metadata='{"success": true, "temperature": 72, "conditions": "sunny"}' ) # Thought event create_agent_chat_event( chat_id="123", content="I should check the weather before suggesting outdoor activities", message_type="thought" )

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chat_idYes
contentYes
message_typeYes
metadataNo

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/thenvoi/thenvoi-mcp'

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