Skip to main content
Glama

KnowledgeSmith MCP Server

MCP Server for Graphiti memory and document chunking. Previously included RBT document editing tools (now archived).

📦 Archive Notice

RBT Document Editor Tools (Archived 2025-10-09)

The RBT document editing功能已於 2025-10-09 封存,改用原生 Claude Code Read/Edit/Write 工具以降低維護成本和 token 使用。

封存內容:

  • document_service.py - 文件服務

  • document_parser.py - 文件解析器

  • 11 個 editor MCP 工具(get_outline, read_content, update_block 等)

  • templates/ - 文件模板

  • cache.py - 文件快取

保留功能:

  • ✅ chunking/ - 文件分塊與同步功能

  • ✅ graphiti_tools.py - Graphiti 記憶體功能(8 個工具)

如何恢復封存的代碼:

# 查看封存版本
git show v-with-editor

# 恢復特定檔案
git checkout v-with-editor -- rbt_mcp_server/document_service.py

# 或建立分支使用完整封存版本
git checkout -b restore-editor v-with-editor

Related MCP server: Semantic Cache MCP

🎯 Current Features

Graphiti Knowledge Graph Integration

  • Intelligent Chunking: Automatically split documents into semantic chunks based on document structure (sections for RBT, H3 headings for Markdown)

  • Incremental Sync: Only update changed chunks, preserving unchanged content

  • Neo4j Backend: Store document chunks as episodes in Graphiti knowledge graph

  • graphiti-memory Compatible: Drop-in replacement with same search_nodes/search_facts API

  • 8 MCP Tools: add_document, search_memory_nodes, search_memory_facts, get_episodes, delete_episode, get_entity_edge, delete_entity_edge, clear_graph

📦 Installation

Prerequisites

1. Setup Neo4j Database

Using Docker (recommended):

docker run \
  -p 7474:7474 \
  -p 7687:7687 \
  -e NEO4J_AUTH=neo4j/your-password \
  --name neo4j \
  neo4j:latest

Verify at: http://localhost:7474

2. Get OpenAI API Key

Required for Graphiti embeddings and graph operations.

Install MCP Server

Option 1: Install from source (uv)

# Clone repository
git clone https://github.com/yourusername/KnowledgeSmith.git
cd KnowledgeSmith

# Install with uv
uv pip install -e .

Option 2: Direct installation

uv pip install rbt-mcp-server

🚀 Quick Start

1. Configure Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "graphiti-memory-server": {
      "type": "stdio",
      "command": "rbt-mcp-server",
      "env": {
        "RBT_ROOT_DIR": "/path/to/your/document/root",
        "NEO4J_URI": "bolt://localhost:7687",
        "NEO4J_USER": "neo4j",
        "NEO4J_PASSWORD": "your-password",
        "OPENAI_API_KEY": "your-openai-api-key"
      }
    }
  }
}

Required Environment Variables:

  • RBT_ROOT_DIR: Root directory for document comparison (required for add_document tool)

  • NEO4J_URI, NEO4J_USER, NEO4J_PASSWORD: Neo4j database connection

  • OPENAI_API_KEY: OpenAI API key for Graphiti embeddings

Or use full uv command:

{
  "mcpServers": {
    "graphiti-memory-server": {
      "type": "stdio",
      "command": "uv",
      "args": ["run", "rbt-mcp-server"],
      "env": {
        "RBT_ROOT_DIR": "/path/to/your/document/root",
        "NEO4J_URI": "bolt://localhost:7687",
        "NEO4J_USER": "neo4j",
        "NEO4J_PASSWORD": "your-password",
        "OPENAI_API_KEY": "your-openai-api-key"
      }
    }
  }
}

2. Set Environment Variables (Optional - if not using Claude Desktop)

# Required for add_document tool
export RBT_ROOT_DIR=/path/to/your/document/root

# Required for Graphiti integration
export NEO4J_URI=bolt://localhost:7687
export NEO4J_USER=neo4j
export NEO4J_PASSWORD=your-password
export OPENAI_API_KEY=your-openai-api-key

3. Test the Server

rbt-mcp-server

📚 Available MCP Tools

Document Management

  1. add_document - Sync documents to knowledge graph with automatic chunking

    • Supports Markdown (chunked by H3 headings) and RBT documents

    • Incremental sync: only updates changed chunks

Knowledge Graph Query

  1. search_memory_nodes - Search knowledge graph nodes (entities, preferences, procedures)

  2. search_memory_facts - Search knowledge graph facts (relationships)

  3. get_episodes - Retrieve recent memory episodes

Data Management

  1. delete_episode - Delete specific episode

  2. get_entity_edge - Get entity relationship edge by UUID

  3. delete_entity_edge - Delete entity relationship edge

  4. clear_graph - Clear all data from knowledge graph (⚠️ irreversible)

🔗 Graphiti Integration Usage

Adding Documents to Knowledge Graph

General Markdown Documents:

add_document(
    new_file_path="/absolute/path/to/document.md",
    project_id="my-project",
    file_path="docs/guide.md"  # relative path for general docs
)

RBT Documents (REQ/BP/TASK):

add_document(
    new_file_path="/absolute/path/to/TASK-001.md",
    project_id="knowledge-smith",
    feature_id="my-feature",
    rbt_type="TASK",
    file_path="001"  # task number for TASK documents
)

Searching Knowledge

# Search for nodes (entities, preferences, procedures)
results = await search_nodes(
    query="documentation preferences",
    group_ids=["knowledge-smith"],
    entity="Preference",
    max_nodes=10
)

# Search for facts (relationships)
facts = await search_facts(
    query="task dependencies",
    group_ids=["knowledge-smith"],
    max_facts=10
)

Difference from graphiti-memory MCP

This MCP server extends the original graphiti-memory MCP with document chunking capabilities:

  • Original graphiti-memory: Stores entire documents as single episodes

  • This MCP (graphiti-chunk-mcp): Automatically chunks documents into semantic sections

    • RBT documents: Split by section (sec-*)

    • Markdown documents: Split by H3 headings (###)

    • Incremental updates: Only sync changed chunks

API Compatibility: All search_nodes, search_facts, get_episodes functions maintain the same interface as graphiti-memory.

📖 Documentation

🧪 Development

Install development dependencies:

uv sync --dev

Run tests:

RBT_ROOT_DIR=/test/root uv run pytest -v

Test coverage:

RBT_ROOT_DIR=/test/root uv run pytest --cov=rbt_mcp_server --cov-report=html

📝 License

MIT License

🤝 Contributing

Contributions welcome! Please open an issue or submit a pull request.

Available Tools

8 tools
add_documentA
Compare new file with ROOT original file and sync differences to Graphiti.

This tool compares a modified document with its original version in the ROOT
directory, chunks both versions, identifies changes, and syncs the differences
to the Graphiti knowledge graph.

Args:
    new_file_path: Absolute path to the new/modified file
    project_id: Project identifier (e.g., "knowledge-smith")
    feature_id: Feature identifier (required for RBT documents)
    rbt_type: RBT document type ("REQ"/"BP"/"TASK"). Leave as None for general documents.
    file_path:
        - For RBT TASK: task identifier (e.g., "006")
        - For general files: relative path (e.g., "todos/xxx.md" or "docs/todos/xxx.md")
          Note: "docs/" prefix is optional and will be handled automatically.

Returns:
    Sync statistics:
    {
        "status": "success",
        "added": 3,      # Number of chunks added
        "updated": 2,    # Number of chunks updated
        "deleted": 1,    # Number of chunks deleted
        "unchanged": 5,  # Number of chunks unchanged
        "total": 11      # Total chunks
    }

Raises:
    FileNotFoundError: If new file not found
    ValueError: If invalid rbt_type or parameter combination

Examples:
    # RBT TASK document
    add_document(
        new_file_path="/Users/me/workspace/TASK-006-AddDocument.md",
        project_id="knowledge-smith",
        feature_id="graphiti-chunk-mcp",
        rbt_type="TASK",
        file_path="006"
    )

    # RBT BP document
    add_document(
        new_file_path="/Users/me/workspace/BP-graphiti-chunk-mcp.md",
        project_id="knowledge-smith",
        feature_id="graphiti-chunk-mcp",
        rbt_type="BP"
    )

    # General document (both work)
    add_document(
        new_file_path="/Users/me/workspace/TODO-001.md",
        project_id="General",
        file_path="todos/TODO-001.md"  # or "docs/todos/TODO-001.md"
    )

@REQ: REQ-graphiti-chunk-mcp
@BP: BP-graphiti-chunk-mcp
@TASK: TASK-006-AddDocument
ParametersJSON Schema
NameRequiredDescriptionDefault
new_file_pathYes
project_idYes
feature_idNo
rbt_typeNo
file_pathNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.5/5.0
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 the tool's behavior: comparing files, chunking, identifying changes, and syncing differences. It also mentions error conditions (FileNotFoundError, ValueError) and includes examples, though it could elaborate more on side effects or performance implications.

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 well-structured with sections for purpose, arguments, returns, raises, and examples, making it easy to navigate. It is appropriately sized but includes some redundancy (e.g., repeating parameter details in examples). Every sentence adds value, though minor trimming could improve conciseness.

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

Completeness5/5

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

Given the tool's complexity (5 parameters, mutation operation) and no annotations, the description is highly complete. It covers purpose, parameters, return values (with output schema), error cases, and examples. The presence of an output schema reduces the need to explain returns in detail, and the description fills all other gaps effectively.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 0%, so the description must compensate. It provides detailed semantics for all 5 parameters, including usage notes, examples, and distinctions between RBT and general documents. This adds significant value beyond the basic schema, fully documenting parameter meanings and constraints.

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 specific action: 'compare new file with ROOT original file and sync differences to Graphiti.' It explicitly mentions chunking both versions, identifying changes, and syncing to a knowledge graph, which distinguishes it from sibling tools that focus on deletion, retrieval, or search operations.

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

Usage Guidelines4/5

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

The description provides clear context for usage through examples and parameter explanations, such as distinguishing between RBT and general documents. However, it does not explicitly state when to use this tool versus alternatives or mention any prerequisites beyond parameter requirements.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

clear_graphA
Clear all data from the graph memory and rebuild indices.

WARNING: This operation is irreversible and will delete all data from the graph!
Use with extreme caution.

Returns:
    Success message dictionary

Example:
    clear_graph()

@REQ: REQ-graphiti-chunk-mcp
@BP: BP-graphiti-chunk-mcp
@TASK: TASK-007-MCPTools
ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.8/5.0
Behavior5/5

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

Since no annotations are provided, the description carries the full burden of behavioral disclosure. It effectively communicates critical behavioral traits: the irreversible destructive nature ('will delete all data'), the rebuild indices behavior, and the return format ('Success message dictionary'). This provides essential context beyond what the empty input schema offers.

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 well-structured with clear sections: purpose statement, warning, return information, and example. While the example and metadata tags (@REQ, @BP, @TASK) could be considered extraneous, the core description is appropriately sized and front-loaded with the most critical information.

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

Completeness5/5

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

Given this is a destructive operation with no annotations, the description provides complete context: purpose, irreversible nature, warning, return format, and example. The existence of an output schema means the description doesn't need to detail return values, and it appropriately focuses on behavioral implications.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0 parameters and 100% schema description coverage, the baseline would be 4. The description appropriately doesn't discuss parameters since none exist, and instead focuses on the tool's behavior and consequences, which is the correct emphasis for a parameterless destructive operation.

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 specific action ('clear all data from the graph memory and rebuild indices'), identifies the resource ('graph memory'), and distinguishes this destructive operation from sibling tools that perform more targeted operations like add_document, delete_entity_edge, or search functions.

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 guidance with a WARNING section stating 'Use with extreme caution' and noting the operation is irreversible. It clearly distinguishes this from other tools by emphasizing it deletes ALL data, unlike sibling tools that perform selective operations.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

delete_entity_edgeC
Delete an entity edge from the graph memory.

Args:
    uuid: UUID of the entity edge to delete

Returns:
    Success message dictionary

Example:
    delete_entity_edge(uuid="edge-uuid-123")

@REQ: REQ-graphiti-chunk-mcp
@BP: BP-graphiti-chunk-mcp
@TASK: TASK-007-MCPTools
ParametersJSON Schema
NameRequiredDescriptionDefault
uuidYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

C2.9/5.0
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. It states this is a deletion operation, implying it's destructive, but doesn't clarify if it's irreversible, requires specific permissions, affects related data, or has side effects like cascading deletions. The example and return statement add minimal context, leaving significant gaps for a mutation tool.

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 appropriately sized and front-loaded with the core purpose in the first sentence. Additional sections (Args, Returns, Example) are structured but include some redundancy (e.g., the example repeats the function call). The metadata tags (@REQ, @BP, @TASK) are extraneous for tool selection, slightly reducing efficiency.

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

Completeness3/5

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

Given one parameter with 0% schema coverage and an output schema (implied by 'Returns'), the description is moderately complete. It covers the basic operation and parameter intent but lacks details on behavioral traits, error handling, and usage context. For a destructive tool with no annotations, it should provide more guidance on safety and prerequisites to be fully adequate.

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 0%, so the schema provides no parameter details. The description adds basic semantics by explaining 'uuid' as 'UUID of the entity edge to delete', which clarifies its purpose. However, it doesn't specify format constraints (e.g., UUID version), validation rules, or where to obtain the UUID, resulting in incomplete compensation for the low coverage.

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

Purpose4/5

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

The description clearly states the verb ('Delete') and resource ('entity edge from the graph memory'), making the purpose specific and understandable. It distinguishes from siblings like 'get_entity_edge' (read vs. delete) and 'clear_graph' (delete all vs. specific edge). However, it doesn't explicitly differentiate from 'delete_episode', which might be a related but different resource type.

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. It doesn't mention prerequisites (e.g., needing the UUID from a prior operation), when not to use it (e.g., for bulk deletions), or direct comparisons to siblings like 'delete_episode' or 'clear_graph'. Usage is implied through the example but not explicitly stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

delete_episodeB
Delete an episode from the graph memory.

Args:
    uuid: UUID of the episode to delete

Returns:
    Success message dictionary

Example:
    delete_episode(uuid="episode-uuid-123")

@REQ: REQ-graphiti-chunk-mcp
@BP: BP-graphiti-chunk-mcp
@TASK: TASK-007-MCPTools
ParametersJSON Schema
NameRequiredDescriptionDefault
uuidYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

B3.1/5.0
Behavior2/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 states the tool deletes an episode, implying a destructive mutation, but doesn't cover critical aspects like whether deletion is permanent, requires specific permissions, has side effects on related graph elements, or handles invalid UUIDs. The mention of a 'Success message dictionary' return is minimal behavioral context.

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 well-structured and appropriately sized, with a clear purpose statement, parameter explanation, return note, and example. Every sentence adds value, and it's front-loaded with the core action. Minor trimming of meta-tags like '@REQ' could improve conciseness, but overall it's efficient.

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

Completeness3/5

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

Given the tool's complexity (destructive operation with 1 parameter) and the presence of an output schema (which handles return values), the description is moderately complete. It covers the basic purpose and parameter semantics but lacks usage guidelines, detailed behavioral context (e.g., deletion permanence), and integration with sibling tools, leaving gaps for an AI agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description adds significant value beyond the input schema, which has 0% description coverage. It explains that 'uuid' is the 'UUID of the episode to delete', clarifying the parameter's purpose and format, and provides an example with a sample UUID. This compensates well for the schema's lack of documentation, though it could elaborate on UUID format constraints.

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

Purpose4/5

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

The description clearly states the action ('Delete') and resource ('an episode from the graph memory'), making the purpose unambiguous. However, it doesn't explicitly differentiate from sibling tools like 'clear_graph' (which might delete all episodes) or 'delete_entity_edge' (which deletes different graph elements), so it misses full sibling distinction.

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. For example, it doesn't mention when to choose 'delete_episode' over 'clear_graph' for bulk deletion or how it relates to 'get_episodes' for verification. There's also no mention of prerequisites or error conditions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_entity_edgeA
Get an entity edge from the graph memory by its UUID.

Args:
    uuid: UUID of the entity edge to retrieve

Returns:
    Entity edge dictionary containing edge details:
    {
        "uuid": "edge-uuid",
        "source_node_uuid": "source-uuid",
        "target_node_uuid": "target-uuid",
        "fact": "relationship description",
        "episodes": ["episode-uuid-1", "episode-uuid-2"],
        "valid_at": "2025-01-01T00:00:00Z",
        "invalid_at": null
    }

Example:
    get_entity_edge(uuid="edge-uuid-123")

@REQ: REQ-graphiti-chunk-mcp
@BP: BP-graphiti-chunk-mcp
@TASK: TASK-007-MCPTools
ParametersJSON Schema
NameRequiredDescriptionDefault
uuidYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.2/5.0
Behavior3/5

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

With no annotations provided, the description carries full burden. It discloses this is a retrieval operation (non-destructive) and specifies the return format, but doesn't mention error handling (e.g., what happens if UUID doesn't exist), authentication needs, rate limits, or performance characteristics. It adds basic behavioral context but leaves gaps.

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 efficiently structured: purpose statement first, followed by Args/Returns/Example sections. Every sentence adds value—no fluff. The example is minimal yet complete. The metadata tags (@REQ, @BP, @TASK) are extraneous but don't detract from core clarity.

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?

Given 1 parameter, no annotations, but with an output schema (implied by Returns section), the description is mostly complete. It covers purpose, parameter meaning, and return structure. However, for a read operation with no annotations, it could better address error cases or prerequisites (e.g., required permissions).

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It clearly explains the single parameter ('UUID of the entity edge to retrieve'), adding essential meaning beyond the schema's generic string type. However, it doesn't specify UUID format constraints (e.g., UUIDv4 pattern) or validation rules.

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 specific action ('Get an entity edge') and resource ('from the graph memory by its UUID'), distinguishing it from siblings like delete_entity_edge (destructive) or search_memory_facts (search-based). The verb 'retrieve' precisely indicates a read operation without ambiguity.

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

Usage Guidelines4/5

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

The description implies usage when you know the exact UUID of an entity edge, but doesn't explicitly contrast with alternatives like search_memory_facts for unknown UUIDs or get_episodes for related data. It provides clear context (retrieval by UUID) but lacks explicit when-not-to-use guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_episodesB
Get the most recent memory episodes for a specific group.

Args:
    group_id: ID of the group to retrieve episodes from. If not provided, uses the default group_id.
    last_n: Number of most recent episodes to retrieve (default: 10)

Returns:
    List of episode dictionaries

Example:
    get_episodes(group_id="knowledge-smith", last_n=5)

@REQ: REQ-graphiti-chunk-mcp
@BP: BP-graphiti-chunk-mcp
@TASK: TASK-007-MCPTools
ParametersJSON Schema
NameRequiredDescriptionDefault
group_idNo
last_nNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

B3.3/5.0
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. It states the tool retrieves 'most recent memory episodes,' implying a read-only operation, but doesn't disclose other traits like authentication needs, rate limits, error handling, or what 'memory episodes' entail. The description lacks details on behavioral aspects beyond the basic function, leaving gaps for the agent.

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 appropriately sized and front-loaded, starting with the core purpose, followed by parameter explanations, return value, and an example. Every sentence adds value without redundancy, and the structure is logical and efficient, making it easy for an agent to parse quickly.

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?

Given the tool's moderate complexity (2 parameters, no annotations, but has an output schema), the description is fairly complete. It covers the purpose, parameters, and return value, and the output schema likely handles return details, reducing the need for more in the description. However, it lacks usage guidelines and some behavioral context, which holds it back from a perfect score.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description adds significant meaning beyond the input schema, which has 0% description coverage. It explains that 'group_id' is for retrieving episodes from a specific group, with a default fallback, and 'last_n' specifies the number of most recent episodes to retrieve, including the default value. This compensates well for the schema's lack of descriptions, providing clear semantics for both parameters.

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

Purpose4/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: 'Get the most recent memory episodes for a specific group.' It specifies the verb ('Get'), resource ('memory episodes'), and scope ('for a specific group'), which is clear and specific. However, it doesn't explicitly distinguish this tool from sibling tools like 'search_memory_facts' or 'search_memory_nodes', which might also retrieve memory-related data, so it doesn't reach the highest score.

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. It mentions retrieving episodes for a group but doesn't compare it to sibling tools like 'search_memory_facts' or 'search_memory_nodes', which might serve similar purposes. There's no mention of prerequisites, exclusions, or specific contexts for usage, leaving the agent with little direction.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

search_memory_factsB
Search the graph memory for relevant facts.

Args:
    query: The search query
    group_ids: Optional list of group IDs to filter results
    max_facts: Maximum number of facts to return (default: 10)
    center_node_uuid: Optional UUID of a node to center the search around

Returns:
    List of fact dictionaries containing search results

Example:
    search_memory_facts(
        query="implementation dependencies",
        group_ids=["knowledge-smith"],
        max_facts=10
    )

@REQ: REQ-graphiti-chunk-mcp
@BP: BP-graphiti-chunk-mcp
@TASK: TASK-007-MCPTools
ParametersJSON Schema
NameRequiredDescriptionDefault
queryYes
group_idsNo
max_factsNo
center_node_uuidNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

B3.3/5.0
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It mentions the tool 'returns' results but doesn't describe what happens during execution (e.g., search algorithm, performance characteristics, error conditions, or rate limits). For a search tool with zero annotation coverage, this leaves significant behavioral gaps.

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 with clear sections (purpose, args, returns, example) and uses minimal, purposeful sentences. Every element adds value without redundancy, and the example provides concrete usage guidance efficiently.

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?

Given the tool's moderate complexity (4 parameters, 1 required) and the presence of an output schema (which handles return value documentation), the description provides adequate context. The parameter semantics are well-covered, and the example adds practical guidance. The main gap is the lack of behavioral context and usage guidelines relative to siblings.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description provides clear semantic explanations for all 4 parameters in the 'Args' section, adding meaningful context beyond the schema's 0% description coverage. Each parameter is explained with purpose and defaults where applicable, fully compensating for the schema's lack of descriptions.

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

Purpose4/5

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

The description clearly states the verb ('search') and resource ('graph memory for relevant facts'), making the purpose immediately understandable. However, it doesn't differentiate this tool from its sibling 'search_memory_nodes', which appears to be a related search operation, so it doesn't achieve the highest score for sibling differentiation.

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_memory_nodes' or other siblings. There's no mention of prerequisites, appropriate contexts, or exclusions, leaving the agent with minimal usage direction beyond the basic purpose.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

search_memory_nodesB
Search the graph memory for relevant node summaries.

These contain a summary of all of a node's relationships with other nodes.

Note: entity is a single entity type to filter results (permitted: "Preference", "Procedure").

Args:
    query: The search query
    group_ids: Optional list of group IDs to filter results
    max_nodes: Maximum number of nodes to return (default: 10)
    center_node_uuid: Optional UUID of a node to center the search around
    entity: Optional single entity type to filter results (permitted: "Preference", "Procedure")

Returns:
    List of node dictionaries containing search results

Example:
    search_memory_nodes(
        query="project architecture decisions",
        group_ids=["knowledge-smith"],
        max_nodes=5
    )

@REQ: REQ-graphiti-chunk-mcp
@BP: BP-graphiti-chunk-mcp
@TASK: TASK-007-MCPTools
ParametersJSON Schema
NameRequiredDescriptionDefault
queryYes
group_idsNo
max_nodesNo
center_node_uuidNo
entityNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations provided, the description carries the full burden. It discloses that results are filtered summaries of node relationships and includes an example, but lacks details on permissions, rate limits, error handling, or pagination. It adds some behavioral context (e.g., default max_nodes, entity filtering) but is incomplete for a search tool with multiple parameters.

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 well-structured with a clear opening sentence, explanatory note, parameter details, return statement, and example. It's appropriately sized without wasted sentences, though the entity filtering note is repeated in the parameter list, slightly reducing efficiency.

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?

Given 5 parameters with 0% schema coverage and no annotations, the description does a good job explaining parameters and includes an example. With an output schema present, it doesn't need to detail return values. However, it could better address usage context and behavioral aspects like error cases or performance expectations.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It adds meaningful semantics for all parameters: explains 'query' as the search query, 'group_ids' for filtering, 'max_nodes' with default, 'center_node_uuid' for centering search, and 'entity' with permitted values. This goes beyond the schema's basic titles, though it could elaborate on parameter interactions.

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

Purpose4/5

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

The description clearly states the tool searches for 'relevant node summaries' in 'graph memory' and specifies these summaries contain 'a summary of all of a node's relationships with other nodes.' This provides a specific verb ('search') and resource ('graph memory nodes'), though it doesn't explicitly differentiate from sibling tools like 'search_memory_facts' beyond the resource type.

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?

No guidance is provided on when to use this tool versus alternatives like 'search_memory_facts' or other siblings. The description mentions filtering by entity types but doesn't explain when this filtering is appropriate or what distinguishes this search from other search tools in the context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 21 tool updatesv1.0.0
    • Addedadd_document
    • Removedappend_list_item
    • Removedappend_table_row
    • Removedclear_cache
    • Addedclear_graph
    • Removedcreate_block
    • Removedcreate_document
    • Removedcreate_section
    • Removeddelete_block
    • Addeddelete_entity_edge
    • Addeddelete_episode
    • Addedget_entity_edge
    • Addedget_episodes
    • Removedget_outline
    • Removedread_content
    • Addedsearch_memory_facts
    • Addedsearch_memory_nodes
    • Removedupdate_block
    • Removedupdate_info
    • Removedupdate_section_summary
    • Removedupdate_table_row
  2. 13 tool updates
    • First observedappend_list_item
    • First observedappend_table_row
    • First observedclear_cache
    • First observedcreate_block
    • First observedcreate_document
    • First observedcreate_section
    • First observeddelete_block
    • First observedget_outline
    • First observedread_content
    • First observedupdate_block
    • First observedupdate_info
    • First observedupdate_section_summary
    • First observedupdate_table_row

TDQS

A3.5/5.0
Disambiguation3/5

The tools have some clear distinctions (add_document vs. search operations), but there is notable overlap between delete_entity_edge and delete_episode (both delete operations on graph components) and between search_memory_facts and search_memory_nodes (both search operations with similar parameters). The descriptions help differentiate them, but an agent might occasionally misselect between these pairs.

Naming Consistency5/5

All tools follow a consistent verb_noun naming pattern (e.g., add_document, clear_graph, delete_entity_edge, get_episodes, search_memory_facts). The naming is uniform across all eight tools, using snake_case throughout without any deviations or mixed conventions.

Tool Count4/5

With 8 tools, the count is reasonable for a document editor and graph memory management system. It covers core operations like adding documents, clearing data, deleting entities, retrieving information, and searching. However, it feels slightly thin for a full CRUD lifecycle, as there are no update tools for entities or episodes, but the scope is still well-defined.

Completeness3/5

The toolset covers key operations for document syncing and graph memory management, including add, delete, get, and search functions. However, there are notable gaps: no update tools for entities or episodes, and no create tools for entities or episodes independently (only via add_document). This could lead to dead ends when agents need to modify existing graph data without replacing entire documents.

Maintenance

ActivityInactive
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    C
    maintenance
    A line-oriented text file editor. Optimized for LLM tools with efficient partial file access to minimize token usage.
    6
    199
    MIT
  • A
    license
    A
    quality
    B
    maintenance
    Reduces token consumption by over 80% through intelligent file caching, returning only diffs for modified files and suppressing unchanged content. It features a suite of 12 tools for semantic search, batch reading, and efficient file editing to optimize LLM interactions with large codebases.
    13
    2
    MIT
  • A
    license
    B
    quality
    B
    maintenance
    Enables LLMs to efficiently read, write, and refactor code using precise AST-based operations, reducing token usage and context window waste.
    25
    33
    3
    MIT

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/leo7nel23/KnowledgeSmith-MCP'

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