Skip to main content
Glama
EmjayAhn

Pensieve MCP Server

by EmjayAhn

list_conversations

Retrieve stored conversation lists from the Pensieve MCP Server to access and manage cross-platform AI chat history with pagination controls.

Instructions

저장된 대화 목록을 조회합니다

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo조회할 대화 수 (기본값: 50)
offsetNo시작 위치 (기본값: 0)

Implementation Reference

  • Handler function for listing conversations, which reads conversation files from the storage directory.
    def list_conversations(limit: int = 50, offset: int = 0) -> List[Dict[str, Any]]:
        """저장된 모든 대화 목록 반환"""
        conversations = []
        
        # 모든 JSON 파일 읽기
        json_files = sorted(STORAGE_DIR.glob("*.json"), key=lambda x: x.stat().st_mtime, reverse=True)
        
        for file_path in json_files[offset:offset + limit]:
            try:
                with open(file_path, 'r', encoding='utf-8') as f:
                    data = json.load(f)
                    # 메타데이터만 포함한 간략한 정보
                    conversations.append({
                        "id": data["id"],
                        "metadata": data.get("metadata", {}),
                        "created_at": data.get("created_at"),
                        "updated_at": data.get("updated_at"),
                        "message_count": len(data.get("messages", []))
                    })
            except Exception as e:
                print(f"Error loading {file_path}: {e}")
        
        return conversations
  • The actual implementation of the list_conversations function, which reads and returns conversation data from JSON files.
    def list_conversations(limit: int = 50, offset: int = 0) -> List[Dict[str, Any]]:
        """저장된 모든 대화 목록 반환"""
        conversations = []
        
        # 모든 JSON 파일 읽기
        json_files = sorted(STORAGE_DIR.glob("*.json"), key=lambda x: x.stat().st_mtime, reverse=True)
        
        for file_path in json_files[offset:offset + limit]:
            try:
                with open(file_path, 'r', encoding='utf-8') as f:
                    data = json.load(f)
                    # 메타데이터만 포함한 간략한 정보
                    conversations.append({
                        "id": data["id"],
                        "metadata": data.get("metadata", {}),
                        "created_at": data.get("created_at"),
                        "updated_at": data.get("updated_at"),
                        "message_count": len(data.get("messages", []))
                    })
            except Exception as e:
                print(f"Error loading {file_path}: {e}")
  • Tool registration in the list_tools() function.
        name="list_conversations",
        description="저장된 대화 목록을 조회합니다",
        inputSchema={
            "type": "object",
            "properties": {
                "limit": {
                    "type": "integer",
                    "description": "조회할 대화 수 (기본값: 50)",
                    "default": 50
                },
                "offset": {
                    "type": "integer",
                    "description": "시작 위치 (기본값: 0)",
                    "default": 0
                }
            }
        }
    ),
  • Registration of the list_conversations tool with its description and input schema.
    Tool(
        name="list_conversations",
        description="저장된 대화 목록을 조회합니다",
        inputSchema={
            "type": "object",
            "properties": {
                "limit": {
                    "type": "integer",
                    "description": "조회할 대화 수 (기본값: 50)",
                    "default": 50
                },
                "offset": {
                    "type": "integer",
                    "description": "시작 위치 (기본값: 0)",
                    "default": 0
                }
  • Tool dispatch logic for "list_conversations" in call_tool() function.
    elif name == "list_conversations":
        limit = arguments.get("limit", 50)
        offset = arguments.get("offset", 0)
        
        conversations = list_conversations(limit, offset)
        return [TextContent(
            type="text",
            text=json.dumps(conversations, ensure_ascii=False, indent=2)
        )]
  • The tool execution handler in the server's main call loop that processes requests for list_conversations.
    elif name == "list_conversations":
        limit = arguments.get("limit", 50)
        offset = arguments.get("offset", 0)
        
        conversations = list_conversations(limit, offset)
        return [TextContent(
            type="text",
            text=json.dumps(conversations, ensure_ascii=False, indent=2)
        )]
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. While '조회합니다' (retrieve/list) implies a read-only operation, the description doesn't mention pagination behavior (implied by limit/offset parameters), rate limits, authentication requirements, or what constitutes 'stored' conversations. This leaves significant gaps for a tool that presumably accesses user data.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence in Korean that directly states the tool's purpose. There's no wasted language or unnecessary elaboration. However, it could be slightly more front-loaded with key distinguishing information given the sibling tools.

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?

For a data retrieval tool with no annotations and no output schema, the description is insufficient. It doesn't explain what information is returned (conversation titles, dates, IDs?), the format of results, error conditions, or how 'stored conversations' are defined. The agent lacks crucial context to use this tool effectively.

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?

The input schema has 100% description coverage with clear documentation of both parameters (limit and offset with defaults). The tool description adds no parameter information beyond what's in the schema. According to scoring rules, when schema_description_coverage is high (>80%), the baseline is 3 even with no param info in the description.

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 states the verb ('조회합니다' - retrieve/list) and resource ('저장된 대화 목록' - stored conversation list), which gives a basic understanding of the tool's function. However, it doesn't distinguish this tool from sibling tools like 'search_conversations' or clarify what 'stored conversations' means versus other conversation types that might exist in the system.

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 alternatives like 'search_conversations' or 'load_conversation'. There's no mention of prerequisites, typical use cases, or exclusion criteria. The agent must infer usage from the tool name 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

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