MCP Tools Overview
Complete reference for textrawl's MCP tools
textrawl exposes 12 tools via the Model Context Protocol (MCP). These tools allow Claude and other MCP clients to search, retrieve, create, and manage documents and memories in your knowledge base.
Document Tools
search_knowledge
Hybrid semantic + full-text search using Reciprocal Rank 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.
recall_memories
Semantic search across stored memories using hybrid or semantic-only mode.
relate_entities
Create directed relationships between entities.
get_entity_context
Retrieve all information about an entity including observations and relations.
list_entities
List all known entities with pagination.
forget_entity
Delete an entity and all its associated memories and relations.
memory_stats
Get statistics about stored memories.
Tool Selection Guide
Document Tools
| User Intent | Recommended Tool | Key Parameters |
|---|---|---|
| Find content by meaning | search_knowledge | semanticWeight: 1.5 |
| Find exact keywords | search_knowledge | fullTextWeight: 1.5 |
| Balanced search | search_knowledge | Default weights |
| 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 |
| Search past memories | recall_memories | query, searchMode |
| Connect entities together | relate_entities | fromEntity, relation, toEntity |
| Get all info about an entity | get_entity_context | entityName |
| List all known entities | list_entities | entityTypes, limit |
| Delete an entity completely | forget_entity | entityName, confirm: true |
| View memory statistics | memory_stats | (no parameters) |
Common Patterns
Search and Retrieve
Knowledge Capture
Iterative Refinement
Memory Capture
Context Retrieval
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 (recall_memories):
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 |
OpenAI 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 |
Embedding service not configured | Memory tools need embeddings | Set OPENAI_API_KEY or configure Ollama |
Entity not found | forget_entity with unknown name | Check entity name with list_entities |
Confirmation required | forget_entity without confirm | Set confirm: true to delete |
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