Skip to main content
Glama
EmjayAhn

Pensieve MCP Server

by EmjayAhn

load_conversation

Retrieve saved conversations from the Pensieve MCP Server to continue previous discussions across AI platforms using a conversation ID.

Instructions

저장된 대화를 불러옵니다

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
conversation_idYes불러올 대화 ID

Implementation Reference

  • The implementation of the load_conversation handler function that retrieves conversation data from the filesystem.
    def load_conversation(conversation_id: str) -> Optional[Dict[str, Any]]:
        """대화를 파일 시스템에서 불러오기"""
        # 캐시 확인
        if conversation_id in conversation_cache:
            return conversation_cache[conversation_id]
        
        # 파일에서 로드
        file_path = STORAGE_DIR / f"{conversation_id}.json"
        if file_path.exists():
            with open(file_path, 'r', encoding='utf-8') as f:
                conversation_data = json.load(f)
                conversation_cache[conversation_id] = conversation_data
                return conversation_data
        
        return None
  • The core logic for loading a conversation from a JSON file.
    def load_conversation(conversation_id: str) -> Optional[Dict[str, Any]]:
        """대화를 파일 시스템에서 불러오기"""
        # 캐시 확인
        if conversation_id in conversation_cache:
            return conversation_cache[conversation_id]
        
        # 파일에서 로드
        file_path = STORAGE_DIR / f"{conversation_id}.json"
        if file_path.exists():
            with open(file_path, 'r', encoding='utf-8') as f:
                conversation_data = json.load(f)
                conversation_cache[conversation_id] = conversation_data
                return conversation_data
        
        return None
  • The MCP tool registration schema for load_conversation, defining its input requirements.
    Tool(
        name="load_conversation",
        description="저장된 대화를 불러옵니다",
        inputSchema={
            "type": "object",
            "properties": {
                "conversation_id": {
                    "type": "string",
                    "description": "불러올 대화 ID"
                }
            },
            "required": ["conversation_id"]
  • Registration of the 'load_conversation' tool with its schema definition in mcp_server/server.py.
    Tool(
        name="load_conversation",
        description="저장된 대화를 불러옵니다",
        inputSchema={
            "type": "object",
            "properties": {
                "conversation_id": {
                    "type": "string",
                    "description": "불러올 대화 ID"
                }
            },
            "required": ["conversation_id"]

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/EmjayAhn/pensieve-mcp'

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