MCP Tools Overview
Complete reference for textrawl's 18 MCP tools
textrawl exposes 18 tools via the Model Context Protocol (MCP). These tools allow Claude and other MCP clients to search, retrieve, create, and manage documents, memories, conversations, and insights in your knowledge base.
Document Tools
search
Hybrid semantic + full-text search using Reciprocal Rank Fusion. Optionally include memories and conversations with weighted cross-source fusion.
get_document
Retrieve full document content by ID, optionally including chunks.
list_documents
Browse documents with pagination and filtering by type or tags.
update_document
Update document title and/or tags for organization.
add_note
Create markdown notes with automatic chunking and embedding.
Memory Tools (Persistent Memory)
Enable with ENABLE_MEMORY=true (default). Requires setup-db-memory.sql schema.
remember_fact
Store facts about entities (people, projects, concepts) with automatic semantic embedding.
build_knowledge
Store multiple facts and relations in a single batch call.
query_memory
Query the memory graph: search memories, look up entity context, or list entities. Modes: search, entity, list.
relate_entities
Create directed relationships between entities.
forget_entity
Delete an entity and all its associated memories and relations.
extract_memories
Extract entities and facts from text using LLM analysis. Requires ENABLE_MEMORY_EXTRACTION=true.
Conversation Tools (Conversation Memory)
Enable with ENABLE_CONVERSATIONS=true (default). Requires setup-db-conversation.sql schema.
save_conversation_context
Save conversation summary and turns for later recall.
query_conversations
Query past conversations: search by content, get by ID/key, or list sessions. Modes: search, get, list.
delete_conversation
Delete a conversation session and all its turns.
Insight Tools (Proactive Discovery)
Enable with ENABLE_INSIGHTS=true (default).
get_insights
View cross-source connections, themes, entity bridges, and outliers discovered from your knowledge base.
discover_connections
Trigger an insight scan to find patterns across your knowledge base. Best used after bulk imports.
dismiss_insight
Dismiss an insight so it no longer appears in results.
Stats
get_stats
Get statistics across all features with scope selection: all, knowledge, memory, conversations, insights.
Tool Selection Guide
Document Tools
| User Intent | Recommended Tool | Key Parameters |
|---|---|---|
| Find content by meaning | search | semanticWeight: 1.5 |
| Find exact keywords | search | fullTextWeight: 1.5 |
| Search everything at once | search | includeMemories: true, includeConversations: true |
| Read full document | get_document | documentId |
| Browse all documents | list_documents | limit, offset |
| Filter by source type | list_documents | sourceType |
| Create new knowledge | add_note | title, content |
| Organize existing docs | update_document | tags |
Memory Tools
| User Intent | Recommended Tool | Key Parameters |
|---|---|---|
| Remember facts about people/projects | remember_fact | entityName, entityType, observation |
| Store many facts at once | build_knowledge | facts, relations |
| Search past memories | query_memory | mode: "search", query |
| Get all info about an entity | query_memory | mode: "entity", entityName |
| List all known entities | query_memory | mode: "list", entityTypes |
| Connect entities together | relate_entities | fromEntity, relation, toEntity |
| Delete an entity completely | forget_entity | entityName, confirm: true |
| Extract facts from text | extract_memories | text, storeResults |
Conversation Tools
| User Intent | Recommended Tool | Key Parameters |
|---|---|---|
| Save conversation for later | save_conversation_context | summary, recentTurns |
| Find past conversations | query_conversations | mode: "search", query |
| Browse conversation history | query_conversations | mode: "list", limit |
| Get full transcript | query_conversations | mode: "get", sessionKey |
| Delete a conversation | delete_conversation | sessionKey, confirm: true |
Insight Tools
| User Intent | Recommended Tool | Key Parameters |
|---|---|---|
| View discovered patterns | get_insights | status, insightType |
| Run insight scan | discover_connections | fullScan, maxChunks |
| Dismiss an insight | dismiss_insight | insightId |
| Check system stats | get_stats | scope: "insights" |
Common Patterns
Search and Retrieve
Comprehensive Context
Knowledge Capture
Memory Capture
Conversation Continuity
Insight Discovery
Response Format
All tools return JSON-formatted responses. Memory tools support two response modes controlled by COMPACT_RESPONSES environment variable.
Compact Mode (Default)
COMPACT_RESPONSES=true - Reduces token usage by 40-60% using short keys and no whitespace.
Key mappings:
| Compact | Verbose | Description |
|---|---|---|
n | name / count | Entity name or result count |
t | type | Entity type |
o | observations | List of observations |
m | memories | List of memories |
c | content | Memory content |
s | score | Relevance score |
r | relations | Entity relations |
ok | success | Operation status |
dup | duplicate | Dedupe detection |
Example (query_memory mode=search):
Verbose Mode
COMPACT_RESPONSES=false - Human-readable responses with full key names and formatting.
Error Handling
Errors are returned in the result object (not as protocol errors):
Common errors:
| Error | Cause | Fix |
|---|---|---|
Database not configured | Missing Supabase credentials | Set SUPABASE_URL and SUPABASE_SERVICE_KEY |
Embedding provider not configured | Missing embedding API | Set OPENAI_API_KEY or configure Ollama |
Document not found | Invalid documentId | Verify UUID from search results |
No updates provided | Empty update request | Provide title or tags |
Entity not found | forget_entity with unknown name | Check entity name with query_memory mode=list |
Confirmation required | forget_entity without confirm | Set confirm: true to delete |
Conversations not enabled | Feature flag off | Set ENABLE_CONVERSATIONS=true |
Memory extraction not enabled | Feature flag off | Set ENABLE_MEMORY_EXTRACTION=true |
Insights not enabled | Feature flag off | Set ENABLE_INSIGHTS=true |
Testing Tools
Use the MCP Inspector to test tools interactively:
Opens a web UI at http://localhost:5173 where you can:
- Select a tool from the dropdown
- Fill in parameters
- Execute and view response
- Debug issues