MCP API Reference
Complete API documentation for Task Genius MCP tools
This document provides comprehensive documentation for all MCP tools available in Task Genius. Each tool includes parameters, return values, and practical examples.
Authentication
All API calls require authentication using one of two methods:
Method A: Separate Headers
Method B: Combined Bearer (Recommended)
Protocol Flow
1. Initialize Session
2. Use Tools
Include the session ID in subsequent requests:
Query Tools
query_tasks
Query tasks with advanced filtering and sorting options.
Parameters:
Example:
Response:
query_project_tasks
Get all tasks for a specific project.
Parameters:
Example:
query_context_tasks
Get all tasks for a specific context.
Parameters:
query_by_priority
Filter tasks by priority level.
Parameters:
query_by_due_date
Find tasks within a date range.
Parameters:
search_tasks
Full-text search across task content.
Parameters:
Example:
Create Tools
create_task
Create a single task with full metadata support.
Parameters:
Example:
Response:
create_task_in_daily_note
Create a task specifically in today's daily note.
Parameters:
add_project_quick_capture
Quick capture with automatic project tagging.
Parameters:
batch_create_tasks
Create multiple tasks efficiently in one operation.
Parameters:
Example:
batch_create_subtasks
Add multiple subtasks to an existing parent task.
Parameters:
Update Tools
update_task
Update any properties of an existing task.
Parameters:
update_task_status
Change task completion status.
Parameters:
batch_update_task_status
Update multiple task statuses at once.
Parameters:
Example:
batch_update_text
Find and replace text across multiple tasks.
Parameters:
postpone_tasks
Reschedule tasks to a new date.
Parameters:
List Tools
list_all_metadata
Get all unique tags, projects, and contexts in your vault.
Parameters: None
Response:
list_tasks_for_period
List tasks for a specific time period.
Parameters:
Example:
list_tasks_in_range
Get tasks between two dates.
Parameters:
Delete Tools
delete_task
Remove a task by ID.
Parameters:
Response:
Error Handling
All tools return errors in standard JSON-RPC format:
Common Error Codes
Code | Meaning | Solution |
---|---|---|
-32700 | Parse error | Check JSON syntax |
-32600 | Invalid request | Verify request structure |
-32601 | Method not found | Check tool name spelling |
-32602 | Invalid params | Review parameter requirements |
-32603 | Internal error | Check server logs |
-32000 | Server error | Retry or check server status |
Rate Limiting
To ensure optimal performance:
- Batch operations when possible (use batch_* tools)
- Limit query results to necessary data
- Use pagination for large result sets
- Cache responses when appropriate
Best Practices
1. Use Specific Filters
2. Handle Pagination
3. Error Recovery
4. Optimize Batch Operations
WebSocket Support (Future)
The MCP server currently uses HTTP. WebSocket support for real-time updates is planned:
SDK Examples
JavaScript/TypeScript
Python
Next Steps
- Explore Use Cases for practical examples
- Review Client Configuration for your tools
- Check Troubleshooting for common issues
API Tip: Always include a limit
parameter in queries to prevent overwhelming responses. Start with small limits during development.