-
Notifications
You must be signed in to change notification settings - Fork 0
API Reference
Martin Schultheiss edited this page Nov 25, 2025
·
1 revision
Complete documentation of all Context Processor tools.
Context Processor exposes 6 tools via the Model Context Protocol:
| Tool | Purpose |
|---|---|
save_context |
Create/update context with optional preprocessing |
load_context |
Retrieve context by ID |
list_contexts |
List all contexts with optional filtering |
list_models |
List available pre-processing models |
get_model_info |
Get detailed model configuration |
delete_context |
Remove context permanently |
Creates a new context or updates an existing one.
{
"title": "My Document",
"content": "Document content...",
"tags": ["tag1", "tag2"],
"metadata": { "custom": "data" },
"model": "comprehensive"
}-
title(string, required) - Context title (max 200 chars) -
content(string, required) - Main content to store -
tags(string[], optional) - Organizational tags -
metadata(object, optional) - Custom metadata -
model(string, optional) - Pre-processing model to apply
-
clarify- Improve clarity and readability -
search_optimized- Extract keywords for search -
analysis- Content metrics and analysis -
comprehensive- All strategies combined -
web_enhanced- URL detection and analysis -
null- No preprocessing (default)
Returns a ContextItem with the saved data and metadata.
Retrieves a specific context by ID.
{
"contextId": "ctx-12345-abcde"
}-
contextId(string, required) - ID to retrieve
Returns the ContextItem or null if not found.
Lists all contexts with optional filtering.
{
"tags": ["react"],
"limit": 10,
"offset": 0
}-
tags(string[], optional) - Filter by tags (AND logic) -
limit(number, optional) - Max results (default: 100) -
offset(number, optional) - Pagination offset (default: 0)
Returns array of ContextItems matching filters.
Lists all available pre-processing models.
{
"models": [
{
"name": "clarify",
"description": "Improves clarity",
"strategies": ["clarify"]
}
]
}Gets detailed information about a specific model.
{
"modelName": "comprehensive"
}Returns model configuration and strategy details.
Removes a context permanently.
{
"contextId": "ctx-12345-abcde"
}{
"deleted": true,
"id": "ctx-12345-abcde"
}interface ContextItem {
id: string;
title: string;
content: string;
tags: string[];
metadata?: Record<string, any>;
createdAt: number;
updatedAt: number;
}Errors are returned as structured objects:
{
"code": "INVALID_INPUT",
"message": "Context title is required",
"details": { "field": "title" }
}-
INVALID_INPUT- Missing or invalid parameters -
CONTEXT_NOT_FOUND- Context ID doesn't exist -
STORAGE_ERROR- File system issue -
PROCESSING_ERROR- Pre-processing failed -
VALIDATION_ERROR- Content validation failed
- Use meaningful tags - 3-5 per context
- Limit content size - Prefer multiple smaller contexts
- Batch operations - Process multiple items efficiently
- Cache models - Load model info once
- Use pagination - For large datasets
- Add metadata - For filtering and organization
- Clean up - Delete obsolete contexts regularly