Skip to main content
Glama
mtct

MCP Journaling Server

by mtct

record_interaction

Log user messages and assistant responses to maintain conversation continuity. Enables the LLM to retrieve past interactions for coherent discussion in journaling sessions.

Instructions

Record both the user's message and assistant's response.

Args: user_message: The user's message assistant_message: The assistant's response

Returns: str: Confirmation message

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
assistant_messageYes
user_messageYes

Implementation Reference

  • The main handler function for the 'record_interaction' tool. It appends both user and assistant messages to a global conversation_log with timestamps. Decorated with @mcp.tool(), which also serves as the registration.
    @mcp.tool() async def record_interaction(user_message: str, assistant_message: str) -> str: """ Record both the user's message and assistant's response. Args: user_message: The user's message assistant_message: The assistant's response Returns: str: Confirmation message """ # Add user message first conversation_log.append({ "speaker": "user", "message": user_message, "timestamp": datetime.now().isoformat() }) # Then add assistant message conversation_log.append({ "speaker": "assistant", "message": assistant_message, "timestamp": datetime.now().isoformat() }) return "Conversation updated"

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/mtct/journaling_mcp'

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