Compare commits
11 Commits
0a362b37b1
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 910873498a | |||
| 6dcf8aa0ff | |||
| a2926293df | |||
| 308290c122 | |||
| 865a48e1d4 | |||
| 66bb003b91 | |||
| 2f5f361013 | |||
| 3c763fc44f | |||
| 7084a7d5b2 | |||
| 3e9dce4ccb | |||
| 3c23e30b0c |
11
.claude/settings.local.json
Normal file
11
.claude/settings.local.json
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"permissions": {
|
||||
"allow": [
|
||||
"Bash(npm run:*)",
|
||||
"Bash(npm help)",
|
||||
"Bash(git checkout:*)"
|
||||
],
|
||||
"deny": [],
|
||||
"ask": []
|
||||
}
|
||||
}
|
||||
94
CLAUDE.md
Normal file
94
CLAUDE.md
Normal file
@@ -0,0 +1,94 @@
|
||||
# CLAUDE.md
|
||||
|
||||
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
|
||||
|
||||
## Commands
|
||||
|
||||
### Build and Development
|
||||
```bash
|
||||
# Build TypeScript to JavaScript
|
||||
npm run build
|
||||
|
||||
# Watch mode for development
|
||||
npm run dev
|
||||
|
||||
# Run the built server
|
||||
npm start
|
||||
```
|
||||
|
||||
### Testing and Validation
|
||||
Before committing changes, ensure the TypeScript compiles without errors:
|
||||
```bash
|
||||
npm run build
|
||||
```
|
||||
|
||||
## Architecture Overview
|
||||
|
||||
This is an Appwrite Model Context Protocol (MCP) server that provides a comprehensive interface between Claude and Appwrite services. The server is built in TypeScript and uses the official Appwrite Node.js SDK.
|
||||
|
||||
### Key Components
|
||||
|
||||
1. **MCP Server Core** (`src/index.ts`):
|
||||
- Main server class `AppwriteMCPServer` that initializes all Appwrite service clients
|
||||
- Implements 135 tools covering all major Appwrite services
|
||||
- Uses environment variables for configuration (loaded from `.env` in current working directory)
|
||||
|
||||
2. **Service Clients**:
|
||||
- Databases, Users, Storage, Functions, Teams, Account, Health, Messaging, Locale, Avatars
|
||||
- All clients are initialized with API key authentication
|
||||
|
||||
3. **Tool Categories**:
|
||||
- Database operations (create, list, delete databases)
|
||||
- Collection management with attribute and index operations
|
||||
- Document CRUD with query support
|
||||
- User management including MFA, preferences, identities, and messaging targets
|
||||
- Storage bucket and file operations
|
||||
- Function management with deployments and variables
|
||||
- Messaging service (providers, messages, topics, subscribers)
|
||||
- Locale service for internationalization
|
||||
- Avatar generation utilities
|
||||
- Bulk operations for efficient batch processing
|
||||
- Advanced features like schema auto-detection and data analysis
|
||||
|
||||
### Configuration
|
||||
|
||||
The server reads configuration from environment variables:
|
||||
- `APPWRITE_PROJECT_ID`: Target Appwrite project
|
||||
- `APPWRITE_API_ENDPOINT`: Appwrite API endpoint (cloud or self-hosted)
|
||||
- `APPWRITE_API_KEY`: API key with necessary scopes
|
||||
|
||||
The `.env` file is loaded from the current working directory where Claude Code is run, allowing project-specific configurations.
|
||||
|
||||
### Tool Implementation Pattern
|
||||
|
||||
Tools follow a consistent pattern:
|
||||
1. Parse and validate input parameters
|
||||
2. Initialize appropriate Appwrite service client
|
||||
3. Execute the operation with error handling
|
||||
4. Return formatted response with relevant data
|
||||
|
||||
### Error Handling
|
||||
|
||||
All tools implement comprehensive error handling:
|
||||
- Configuration validation before operations
|
||||
- Detailed error messages for debugging
|
||||
- Graceful fallbacks for missing optional parameters
|
||||
|
||||
## Development Guidelines
|
||||
|
||||
1. **Adding New Tools**: Follow the existing pattern in `src/index.ts`, ensuring proper parameter validation and error handling.
|
||||
|
||||
2. **Type Safety**: Leverage TypeScript's strict mode for all new code. The project uses ES2022 target with Node16 module resolution.
|
||||
|
||||
3. **Environment Variables**: Never commit `.env` files. Use `.env.example` as a template for configuration.
|
||||
|
||||
4. **Build Output**: Compiled JavaScript goes to `dist/` directory. Source maps are generated for debugging.
|
||||
|
||||
## Integration Notes
|
||||
|
||||
This server can be integrated with:
|
||||
- Claude Code (CLI) via `claude mcp add` command
|
||||
- Cursor IDE via settings.json configuration
|
||||
- Continue.dev via config.json
|
||||
|
||||
Each integration method supports different configuration approaches, with Claude Code using `.env` files and IDEs requiring inline environment variable configuration.
|
||||
473
README.md
473
README.md
@@ -7,43 +7,31 @@
|
||||

|
||||
|
||||
**Transform Claude into your intelligent Appwrite management assistant**
|
||||
*135 powerful tools • Complete API coverage • Full Messaging & Locale Services • Production-ready*
|
||||
*12 optimized tools • Core Appwrite operations • Context-efficient design • Production-ready*
|
||||
|
||||
</div>
|
||||
|
||||
---
|
||||
|
||||
A comprehensive **Model Context Protocol (MCP)** server that supercharges Claude with native Appwrite integration. Unlike the official implementation, this version includes advanced features like bulk operations, automatic schema validation, complete user management with MFA, storage file operations, function deployments & variables, full messaging service (topics, subscribers, providers), locale & avatars services, and comprehensive error handling.
|
||||
A **context-optimized Model Context Protocol (MCP)** server that provides Claude with essential Appwrite integration. This version focuses on core functionality with action-based combined tools, offering database operations, user management, storage, and team management in an efficient package designed to stay under MCP context limits.
|
||||
|
||||
## 🚀 Features
|
||||
|
||||
**Core Appwrite Management:**
|
||||
- Complete database and collection operations
|
||||
- Document CRUD with full query support
|
||||
- Advanced user management with MFA, identities, preferences
|
||||
- Storage buckets and comprehensive file operations
|
||||
- Serverless function management with deployments & variables
|
||||
- Team and permission management
|
||||
- Complete messaging service (providers, messages, topics, subscribers)
|
||||
- Locale service (countries, currencies, languages, timezones)
|
||||
- Avatars service (icons, QR codes, initials, favicons)
|
||||
**🎯 Core Appwrite Operations:**
|
||||
- **Database Management** - Create, get, list, update, and delete databases with enabled status
|
||||
- **Collection Operations** - Full collection lifecycle with document security and search support
|
||||
- **Document CRUD** - Complete document operations with bulk support and advanced queries
|
||||
- **User Management** - User operations including bulk processing and preferences
|
||||
- **Storage Management** - Complete bucket operations with advanced configuration (file size limits, allowed extensions, compression, encryption, antivirus) and file upload/download
|
||||
- **Team Management** - Team CRUD operations
|
||||
- **Attribute & Index Management** - Schema management with array support and bulk operations
|
||||
- **Health Monitoring** - System health checks
|
||||
|
||||
**🧠 Intelligent Database Assistant:**
|
||||
- **Auto-detect schemas** from sample data
|
||||
- **Data quality analysis** and recommendations
|
||||
- **Duplicate detection** with similarity matching
|
||||
- **Index optimization** suggestions
|
||||
- **Schema migrations** with safety checks
|
||||
|
||||
**🔐 Advanced Authentication & Sessions:**
|
||||
- **Session management** (create, delete, list user sessions)
|
||||
- **Function execution** with logging and monitoring
|
||||
- **Health monitoring** for all Appwrite services
|
||||
|
||||
**⚡ Bulk Operations:**
|
||||
- **Bulk user management** (create, update, delete multiple users)
|
||||
- **Bulk document operations** (create, update, delete multiple documents)
|
||||
- **Efficient batch processing** with detailed success/error reporting
|
||||
**⚡ Action-Based Design:**
|
||||
- **Single tools handle multiple operations** using action parameters
|
||||
- **Bulk operations integrated** into respective categories
|
||||
- **Context-optimized** - Efficient tool design for reduced token usage
|
||||
- **Advanced features** - Document security, file download, bucket encryption, array attributes
|
||||
|
||||
## 📦 Quick Start
|
||||
|
||||
@@ -59,6 +47,9 @@ npm install
|
||||
|
||||
# Build the TypeScript code
|
||||
npm run build
|
||||
|
||||
# On Linux/macOS: Make the compiled file executable
|
||||
chmod +x dist/index.js
|
||||
```
|
||||
|
||||
### 2️⃣ Configuration
|
||||
@@ -175,291 +166,96 @@ Once integrated, you should be able to use commands like:
|
||||
- "Create a new user with email test@example.com"
|
||||
- "Show me all collections in my database"
|
||||
|
||||
## 🛠️ Available Tools (135 Total)
|
||||
## 🛠️ Available Tools (12 Total)
|
||||
|
||||
<details>
|
||||
<summary><strong>🗄️ Database Operations (3 tools)</strong></summary>
|
||||
<summary><strong>🗄️ Database Operations (1 tool)</strong></summary>
|
||||
|
||||
| Tool | Description |
|
||||
|------|-------------|
|
||||
| `create_database` | Create a new database |
|
||||
| `list_databases` | List all databases in your project |
|
||||
| `delete_database` | Delete a database |
|
||||
| Tool | Actions | Description |
|
||||
|------|---------|-------------|
|
||||
| `manage_database` | create, get, list, update, delete | Comprehensive database management with enabled status |
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><strong>📁 Collection Operations (4 tools)</strong></summary>
|
||||
<summary><strong>📁 Collection Operations (1 tool)</strong></summary>
|
||||
|
||||
| Tool | Description |
|
||||
|------|-------------|
|
||||
| `create_collection` | Create a new collection in a database |
|
||||
| `get_collection` | ✨ Get collection details by ID |
|
||||
| `list_collections` | List all collections in a database |
|
||||
| `delete_collection` | Delete a collection from a database |
|
||||
| Tool | Actions | Description |
|
||||
|------|---------|-------------|
|
||||
| `collection_operations` | create, get, list, update, delete | Complete collection lifecycle with document security, enabled status, and search |
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><strong>🏷️ Attribute Management (5 tools)</strong></summary>
|
||||
<summary><strong>🏷️ Attribute Management (1 tool)</strong></summary>
|
||||
|
||||
| Tool | Description |
|
||||
|------|-------------|
|
||||
| `create_attribute` | ✨ Create any attribute type (string, integer, float, boolean, datetime, email, IP, URL, enum, relationship) |
|
||||
| `get_attribute` | ✨ Get attribute details by key |
|
||||
| `update_attribute` | ✨ Update any attribute type with unified interface |
|
||||
| `list_attributes` | List all attributes in a collection |
|
||||
| `delete_attribute` | Delete an attribute from a collection |
|
||||
| Tool | Actions | Description |
|
||||
|------|---------|-------------|
|
||||
| `attribute_operations` | create, get, list, update, delete, bulk_create, bulk_delete | Full attribute management with array support and bulk operations |
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><strong>📊 Index Management (4 tools)</strong></summary>
|
||||
<summary><strong>📊 Index Management (1 tool)</strong></summary>
|
||||
|
||||
| Tool | Description |
|
||||
|------|-------------|
|
||||
| `create_index` | Create an index in a collection (key, fulltext, unique) |
|
||||
| `get_index` | ✨ Get index details by key |
|
||||
| `list_indexes` | List all indexes in a collection |
|
||||
| `delete_index` | Delete an index from a collection |
|
||||
| Tool | Actions | Description |
|
||||
|------|---------|-------------|
|
||||
| `index_operations` | create, get, list, delete | Complete index management |
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><strong>📄 Document Operations (5 tools)</strong></summary>
|
||||
<summary><strong>📄 Document Operations (2 tools)</strong></summary>
|
||||
|
||||
| Tool | Description |
|
||||
|------|-------------|
|
||||
| `create_document` | Create a new document in a collection ✨ *with schema validation* |
|
||||
| `get_document` | Get a document by ID |
|
||||
| `list_documents` | List documents in a collection with optional queries |
|
||||
| `update_document` | Update a document |
|
||||
| `delete_document` | Delete a document |
|
||||
| Tool | Actions/Description |
|
||||
|------|--------------------|
|
||||
| `document_operations` | create, get, update, delete, bulk_create, bulk_update, bulk_delete |
|
||||
| `list_documents` | List documents with advanced queries and pagination |
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><strong>👥 User Management (25 tools)</strong></summary>
|
||||
<summary><strong>👥 User Management (2 tools)</strong></summary>
|
||||
|
||||
| Tool | Description |
|
||||
|------|-------------|
|
||||
| `create_user` | Create a new user |
|
||||
| `list_users` | ✨ List all users with email/phone verification columns |
|
||||
| `get_user` | Get a user by ID |
|
||||
| `update_user_email` | Update user email |
|
||||
| `update_user_name` | Update user name |
|
||||
| `update_user_password` | Update user password |
|
||||
| `update_user_password_hash` | ✨ Update password with specific hash algorithm |
|
||||
| `delete_user` | Delete a user |
|
||||
| `verify_user_email` | ✨ Verify a user's email address |
|
||||
| `unverify_user_email` | ✨ Unverify a user's email address |
|
||||
| `verify_user_phone` | ✨ Verify a user's phone number |
|
||||
| `unverify_user_phone` | ✨ Unverify a user's phone number |
|
||||
| `update_user_mfa` | ✨ Enable/disable MFA for users |
|
||||
| `create_user_mfa_recovery_codes` | ✨ Generate MFA recovery codes |
|
||||
| `update_user_phone_verification` | ✨ Update phone verification status |
|
||||
| `update_user_labels` | ✨ Update user labels for permissions |
|
||||
| `get_user_preferences` | ✨ Get user preferences |
|
||||
| `update_user_preferences` | ✨ Update user preferences |
|
||||
| `list_user_identities` | ✨ List user identities |
|
||||
| `delete_user_identity` | ✨ Delete user identity |
|
||||
| `create_user_target` | ✨ Create messaging targets |
|
||||
| `list_user_targets` | ✨ List messaging targets |
|
||||
| `get_user_target` | ✨ Get messaging target details |
|
||||
| `update_user_target` | ✨ Update messaging target |
|
||||
| `delete_user_target` | ✨ Delete messaging target |
|
||||
| Tool | Actions/Description |
|
||||
|------|--------------------|
|
||||
| `user_operations` | create, get, update, delete, update_preferences, update_labels, bulk_create, bulk_update, bulk_delete |
|
||||
| `list_users` | List users with advanced filtering and pagination |
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><strong>🗂️ Storage Operations (13 tools)</strong></summary>
|
||||
<summary><strong>🗂️ Storage Operations (3 tools)</strong></summary>
|
||||
|
||||
| Tool | Description |
|
||||
|------|-------------|
|
||||
| `create_bucket` | Create a storage bucket |
|
||||
| `list_buckets` | List all storage buckets |
|
||||
| `get_bucket` | Get a bucket by ID |
|
||||
| `update_bucket` | Update a storage bucket |
|
||||
| `delete_bucket` | Delete a storage bucket |
|
||||
| `list_files` | List files in a storage bucket |
|
||||
| `get_file` | ✨ Get file details by ID |
|
||||
| `create_file` | ✨ Upload file to storage bucket |
|
||||
| `update_file` | ✨ Update file metadata |
|
||||
| `get_file_download` | ✨ Get file download URL |
|
||||
| `get_file_preview` | ✨ Get file preview URL with image transformations |
|
||||
| `get_file_view` | ✨ Get file view URL |
|
||||
| `delete_file` | ✨ Delete a file |
|
||||
| Tool | Actions/Description |
|
||||
|------|--------------------|
|
||||
| `bucket_operations` | create, get, list, update, delete - with advanced configuration (file size limits, allowed extensions, compression, encryption, antivirus) |
|
||||
| `file_operations` | get, create, update, delete, list, download - with actual file download implementation |
|
||||
| `get_file_url` | Generate download, preview, or view URLs with transformations |
|
||||
|
||||
</details>
|
||||
|
||||
|
||||
<details>
|
||||
<summary><strong>👨👩👧👦 Team Management (1 tool)</strong></summary>
|
||||
|
||||
| Tool | Actions | Description |
|
||||
|------|---------|-------------|
|
||||
| `team_operations` | create, get, list, update, delete | Complete team management |
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><strong>⚡ Function Management (14 tools)</strong></summary>
|
||||
<summary><strong>🏥 Health Monitoring (1 tool)</strong></summary>
|
||||
|
||||
| Tool | Description |
|
||||
|------|-------------|
|
||||
| `create_function` | Create a new serverless function |
|
||||
| `list_functions` | List all functions |
|
||||
| `get_function` | Get a function by ID |
|
||||
| `update_function` | Update a function |
|
||||
| `delete_function` | Delete a function |
|
||||
| `list_function_deployments` | ✨ List function deployments |
|
||||
| `get_function_deployment` | ✨ Get deployment details |
|
||||
| `update_function_deployment` | ✨ Update deployment status |
|
||||
| `delete_function_deployment` | ✨ Delete deployment |
|
||||
| `create_function_variable` | ✨ Create function variables |
|
||||
| `list_function_variables` | ✨ List function variables |
|
||||
| `get_function_variable` | ✨ Get variable details |
|
||||
| `update_function_variable` | ✨ Update variables |
|
||||
| `delete_function_variable` | ✨ Delete variables |
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><strong>👨👩👧👦 Team Management (5 tools)</strong></summary>
|
||||
|
||||
| Tool | Description |
|
||||
|------|-------------|
|
||||
| `create_team` | Create a new team |
|
||||
| `list_teams` | List all teams |
|
||||
| `get_team` | Get a team by ID |
|
||||
| `update_team` | Update a team |
|
||||
| `delete_team` | Delete a team |
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><strong>📧 Messaging Operations (20 tools)</strong></summary>
|
||||
|
||||
| Tool | Description |
|
||||
|------|-------------|
|
||||
| `create_messaging_provider` | ✨ Create messaging provider |
|
||||
| `list_messaging_providers` | ✨ List messaging providers |
|
||||
| `get_messaging_provider` | ✨ Get messaging provider details |
|
||||
| `update_messaging_provider` | ✨ Update messaging provider |
|
||||
| `delete_messaging_provider` | ✨ Delete messaging provider |
|
||||
| `create_messaging_message` | ✨ Create and send message |
|
||||
| `list_messaging_messages` | ✨ List messages |
|
||||
| `get_messaging_message` | ✨ Get message details |
|
||||
| `update_messaging_message` | ✨ Update message |
|
||||
| `delete_messaging_message` | ✨ Delete message |
|
||||
| `create_messaging_topic` | ✨ Create messaging topic |
|
||||
| `list_messaging_topics` | ✨ List messaging topics |
|
||||
| `get_messaging_topic` | ✨ Get topic details |
|
||||
| `update_messaging_topic` | ✨ Update topic |
|
||||
| `delete_messaging_topic` | ✨ Delete topic |
|
||||
| `create_messaging_subscriber` | ✨ Create topic subscriber |
|
||||
| `list_messaging_subscribers` | ✨ List topic subscribers |
|
||||
| `get_messaging_subscriber` | ✨ Get subscriber details |
|
||||
| `delete_messaging_subscriber` | ✨ Delete subscriber |
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><strong>🌍 Locale Operations (5 tools)</strong></summary>
|
||||
|
||||
| Tool | Description |
|
||||
|------|-------------|
|
||||
| `list_countries` | ✨ List all countries with phone codes |
|
||||
| `list_continents` | ✨ List all continents |
|
||||
| `list_currencies` | ✨ List all currencies |
|
||||
| `list_languages` | ✨ List all languages |
|
||||
| `list_phone_codes` | ✨ List phone codes for countries |
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><strong>🎨 Avatars Operations (7 tools)</strong></summary>
|
||||
|
||||
| Tool | Description |
|
||||
|------|-------------|
|
||||
| `get_browser_icon` | ✨ Get browser icon URL |
|
||||
| `get_credit_card_icon` | ✨ Get credit card icon URL |
|
||||
| `get_favicon` | ✨ Get website favicon URL |
|
||||
| `get_flag_icon` | ✨ Get country flag icon URL |
|
||||
| `get_image_from_url` | ✨ Transform image from URL |
|
||||
| `get_initials_avatar` | ✨ Generate initials avatar URL |
|
||||
| `get_qr_code` | ✨ Generate QR code URL |
|
||||
| `get_health` | Get overall health status of Appwrite services |
|
||||
|
||||
</details>
|
||||
|
||||
---
|
||||
|
||||
### 🌟 **Exclusive Advanced Features**
|
||||
|
||||
<details>
|
||||
<summary><strong>🧠 Smart Schema Operations (4 tools)</strong></summary>
|
||||
|
||||
| Tool | Description |
|
||||
|------|-------------|
|
||||
| `auto_detect_schema` | ✨ Analyze sample data and automatically create collection schema |
|
||||
| `suggest_indexes` | ✨ Recommend optimal indexes based on collection usage patterns |
|
||||
| `validate_document` | ✨ Check document data against collection schema before creation |
|
||||
| `schema_migration` | ✨ Automatically migrate collection schema with data preservation |
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><strong>📊 Data Analysis & Insights (4 tools)</strong></summary>
|
||||
|
||||
| Tool | Description |
|
||||
|------|-------------|
|
||||
| `analyze_collection` | ✨ Get comprehensive data insights and patterns from collections |
|
||||
| `detect_duplicates` | ✨ Find potential duplicate records with similarity scoring |
|
||||
| `data_quality_check` | ✨ Analyze data quality (completeness, validity, consistency) |
|
||||
| `usage_stats` | ✨ Get usage statistics and access patterns for collections |
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><strong>🔐 Authentication & Sessions (3 tools)</strong></summary>
|
||||
|
||||
| Tool | Description |
|
||||
|------|-------------|
|
||||
| `create_session` | ✨ Create a new user session with email and password |
|
||||
| `delete_session` | ✨ Delete a user session |
|
||||
| `list_sessions` | ✨ List all sessions for a user |
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><strong>⚡ Function Execution (3 tools)</strong></summary>
|
||||
|
||||
| Tool | Description |
|
||||
|------|-------------|
|
||||
| `execute_function` | ✨ Execute a function with optional data |
|
||||
| `list_executions` | ✨ List function executions with logs |
|
||||
| `get_execution` | ✨ Get details of a specific function execution |
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><strong>🏥 Health Monitoring (3 tools)</strong></summary>
|
||||
|
||||
| Tool | Description |
|
||||
|------|-------------|
|
||||
| `get_health` | ✨ Get overall health status of Appwrite services |
|
||||
| `get_health_db` | ✨ Get database health status |
|
||||
| `get_health_storage` | ✨ Get storage health status |
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><strong>⚡ Bulk Operations (8 tools)</strong></summary>
|
||||
|
||||
| Tool | Description |
|
||||
|------|-------------|
|
||||
| `bulk_create_attributes` | ✨ Create multiple attributes at once in a collection |
|
||||
| `bulk_delete_attributes` | ✨ Delete multiple attributes at once from a collection |
|
||||
| `bulk_create_users` | ✨ Create multiple users at once |
|
||||
| `bulk_update_users` | ✨ Update multiple users at once |
|
||||
| `bulk_delete_users` | ✨ Delete multiple users at once |
|
||||
| `bulk_create_documents` | ✨ Create multiple documents at once |
|
||||
| `bulk_update_documents` | ✨ Update multiple documents at once |
|
||||
| `bulk_delete_documents` | ✨ Delete multiple documents at once |
|
||||
|
||||
</details>
|
||||
|
||||
> ✨ **Exclusive features** not available in the official Appwrite MCP implementation
|
||||
|
||||
## ⚙️ Configuration Guide
|
||||
|
||||
@@ -470,26 +266,23 @@ Once integrated, you should be able to use commands like:
|
||||
- **Appwrite Cloud**: `https://cloud.appwrite.io/v1`
|
||||
- **Self-hosted**: `https://your-domain.com/v1`
|
||||
3. **🔐 API Key**: Create a new API key in your Appwrite console under **Settings > API Keys**
|
||||
- ✅ Enable all scopes for full functionality
|
||||
- ⚠️ Required scopes: `databases.read`, `databases.write`, `users.read`, `users.write`, `functions.read`, `functions.write`, `storage.read`, `storage.write`, `targets.read`, `targets.write`, `providers.read`, `providers.write`, `messages.read`, `messages.write`, `topics.read`, `topics.write`, `subscribers.read`, `subscribers.write`, `locale.read`, `avatars.read`, `health.read`
|
||||
- ✅ Required scopes: `databases.read`, `databases.write`, `users.read`, `users.write`, `storage.read`, `storage.write`, `teams.read`, `teams.write`, `health.read`
|
||||
|
||||
### 🎯 VS Official Implementation
|
||||
|
||||
| Feature | Our Implementation | Official Appwrite MCP |
|
||||
|---------|-------------------|----------------------|
|
||||
| **Tools Available** | 🟢 135 tools (complete coverage) | 🟡 195 tools (selective enabling) |
|
||||
| **Default Setup** | 🟢 Complete coverage out-of-box | 🟡 Database tools only (context limits) |
|
||||
| **Messaging Service** | 🟢 Complete (providers, messages, topics, subscribers) | 🟡 Selective enabling required |
|
||||
| **Locale & Avatars** | 🟢 Complete internationalization support | 🟡 Selective enabling required |
|
||||
| **Storage Operations** | 🟢 Complete file operations & uploads | 🟡 Basic bucket operations |
|
||||
| **User Management** | 🟢 MFA, identities, preferences, targets | 🟡 Basic CRUD only |
|
||||
| **Functions Service** | 🟢 Deployments & variables included | 🟡 Basic function management |
|
||||
| **Bulk Operations** | 🟢 Full support | 🔴 Not available |
|
||||
| **Schema Validation** | 🟢 Automatic | 🔴 Manual only |
|
||||
| **Error Handling** | 🟢 Comprehensive | 🟡 Basic |
|
||||
| **Tools Available** | 🟢 12 optimized tools (context-efficient) | 🟡 195 tools (selective enabling) |
|
||||
| **Context Usage** | 🟢 Optimized token usage | 🔴 Over 60,000 tokens |
|
||||
| **Tool Design** | 🟢 Action-based combined tools | 🟡 Individual tools for each operation |
|
||||
| **Core Operations** | 🟢 All essential database, user, storage, and team features | 🟡 Database tools only (context limits) |
|
||||
| **Storage Operations** | 🟢 Complete file operations with download & advanced bucket config | 🟡 Basic bucket operations |
|
||||
| **User Management** | 🟢 CRUD + preferences + bulk operations | 🟡 Basic CRUD only |
|
||||
| **Advanced Features** | 🟢 Document security, file encryption, array attributes, compression | 🔴 Limited |
|
||||
| **Bulk Operations** | 🟢 Integrated into respective categories | 🔴 Not available |
|
||||
| **Error Handling** | 🟢 Comprehensive with validation | 🟡 Basic |
|
||||
| **Language** | 🟡 TypeScript/Node.js | 🟢 Python |
|
||||
| **Context Efficiency** | 🟡 All tools use context | 🟢 Selective loading saves context |
|
||||
| **Self-Hosted Focus** | 🟢 Optimized for self-hosted | 🟡 Cloud-first approach |
|
||||
| **Maintenance** | 🟢 Easier with fewer tools | 🟡 Complex with many tools |
|
||||
|
||||
## 🎯 Usage Examples
|
||||
|
||||
@@ -512,14 +305,12 @@ Once integrated, you can use natural language commands with Claude to interact w
|
||||
<summary><strong>🏷️ Schema & Attributes</strong></summary>
|
||||
|
||||
```
|
||||
✨ "Create a string attribute called 'name' in the products collection with max size 255"
|
||||
✨ "Add a boolean attribute 'in_stock' to the products collection"
|
||||
✨ "Create an enum attribute 'status' with values active, inactive, pending"
|
||||
✨ "Add a relationship attribute linking products to categories"
|
||||
✨ "Bulk create attributes: name (string), price (float), in_stock (boolean)"
|
||||
✨ "Bulk delete attributes: old_field1, deprecated_field2, unused_field3"
|
||||
✨ "Create a string attribute called 'name' in the products collection"
|
||||
✨ "Add multiple attributes with bulk create operation"
|
||||
✨ "List all attributes in the products collection"
|
||||
✨ "Update attribute settings for existing fields"
|
||||
✨ "Create a unique index on the 'sku' attribute"
|
||||
✨ "Remove old attributes with bulk delete"
|
||||
```
|
||||
|
||||
</details>
|
||||
@@ -538,21 +329,17 @@ Once integrated, you can use natural language commands with Claude to interact w
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><strong>👥 User & Authentication</strong></summary>
|
||||
<summary><strong>👥 User Management</strong></summary>
|
||||
|
||||
```
|
||||
✨ "Create a new user with email john@example.com and password SecurePass123"
|
||||
✨ "List all users in the project"
|
||||
✨ "Update user xyz123's name to 'John Doe'"
|
||||
✨ "Verify user abc123's email address"
|
||||
✨ "Enable MFA for user xyz123"
|
||||
✨ "Generate MFA recovery codes for user abc456"
|
||||
✨ "Update user labels for permissions: ['admin', 'moderator']"
|
||||
✨ "Get user preferences for user xyz123"
|
||||
✨ "Create messaging target for user notifications"
|
||||
✨ "List all identities for user abc123"
|
||||
✨ "Create a session for user john@example.com"
|
||||
✨ "Bulk create 10 test users for demo purposes"
|
||||
✨ "Create a new user with email john@example.com"
|
||||
✨ "List all users in the project with filtering"
|
||||
✨ "Update user xyz123's name and email"
|
||||
✨ "Update user labels for admin permissions"
|
||||
✨ "Delete inactive user accounts"
|
||||
✨ "Update user preferences for notifications"
|
||||
✨ "Bulk create 10 test users for demo"
|
||||
✨ "Bulk update user information from CSV"
|
||||
```
|
||||
|
||||
</details>
|
||||
@@ -571,88 +358,18 @@ Once integrated, you can use natural language commands with Claude to interact w
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><strong>⚡ Functions & Deployments</strong></summary>
|
||||
|
||||
```
|
||||
✨ "Create a new function for email processing"
|
||||
✨ "List all deployments for function abc123"
|
||||
✨ "Create function variable API_KEY with secret value"
|
||||
✨ "Update function variable to new value"
|
||||
✨ "List all variables for function xyz456"
|
||||
✨ "Execute function with user data payload"
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><strong>🚀 Advanced Features (Exclusive)</strong></summary>
|
||||
|
||||
```
|
||||
🚀 "Create a complete product schema with string, enum, float, and relationship attributes"
|
||||
🚀 "Bulk create 10 attributes at once for my e-commerce collection"
|
||||
🚀 "Add a relationship attribute linking orders to customers with two-way binding"
|
||||
🚀 "Create an enum attribute for user roles with admin, user, moderator values"
|
||||
🚀 "Analyze this sample data and create a collection schema automatically"
|
||||
🚀 "Suggest optimal indexes for my users collection based on usage"
|
||||
🚀 "Validate this document data before creating it"
|
||||
🚀 "Find duplicate records in my customers collection"
|
||||
🚀 "Check the data quality of my orders collection"
|
||||
🚀 "Bulk create 100 user accounts from this CSV data"
|
||||
🚀 "Execute the 'sendWelcomeEmail' function with user data"
|
||||
🚀 "Show me the health status of all Appwrite services"
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><strong>📧 Messaging & Communication</strong></summary>
|
||||
|
||||
```
|
||||
✨ "Create a messaging provider for email notifications"
|
||||
✨ "List all messaging topics"
|
||||
✨ "Create a topic for user announcements"
|
||||
✨ "Add subscribers to the announcements topic"
|
||||
✨ "Send a message to all subscribers"
|
||||
✨ "List all messages and their delivery status"
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><strong>🌍 Internationalization & Locale</strong></summary>
|
||||
|
||||
```
|
||||
✨ "List all supported countries"
|
||||
✨ "Get phone codes for all countries"
|
||||
✨ "Show me all available currencies"
|
||||
✨ "List all supported languages"
|
||||
✨ "Get continent information"
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><strong>🎨 Avatars & Visual Content</strong></summary>
|
||||
|
||||
```
|
||||
✨ "Generate QR code for this URL"
|
||||
✨ "Get flag icon for United States"
|
||||
✨ "Create initials avatar for John Doe"
|
||||
✨ "Get favicon for google.com"
|
||||
✨ "Generate browser icon for Chrome"
|
||||
✨ "Get credit card icon for Visa"
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
### 🎬 **Real-World Scenarios**
|
||||
|
||||
**E-commerce Setup:**
|
||||
```
|
||||
1. "Create an ecommerce database"
|
||||
2. "Auto-detect schema from this product sample data"
|
||||
3. "Bulk import 500 products from my inventory"
|
||||
2. "Create a products collection with attributes"
|
||||
3. "Bulk create product documents from inventory"
|
||||
4. "Set up user authentication for customers"
|
||||
5. "Create indexes for search optimization"
|
||||
```
|
||||
@@ -660,9 +377,9 @@ Once integrated, you can use natural language commands with Claude to interact w
|
||||
**Content Management:**
|
||||
```
|
||||
1. "Create a blog database with posts and comments collections"
|
||||
2. "Validate my blog post structure before saving"
|
||||
3. "Find duplicate content across my posts"
|
||||
4. "Analyze user engagement patterns"
|
||||
2. "Create string and datetime attributes for blog posts"
|
||||
3. "List all blog posts with pagination"
|
||||
4. "Update blog post content and metadata"
|
||||
```
|
||||
|
||||
---
|
||||
@@ -692,7 +409,7 @@ npm start
|
||||
| **❌ Connection failed** | Verify your API endpoint is correct (check for typos) |
|
||||
| **❌ Tools not loading** | Restart your IDE after adding the MCP server |
|
||||
| **❌ Permission denied** | Check that your API key has `databases.write`, `users.write` permissions |
|
||||
| **❌ Schema validation errors** | Use `list_attributes` to check collection schema before creating documents |
|
||||
| **❌ Schema validation errors** | Use `attribute_operations` with list action to check collection schema |
|
||||
|
||||
</details>
|
||||
|
||||
@@ -716,6 +433,6 @@ MIT License - see [LICENSE](LICENSE) file for details
|
||||
|
||||
Built with ❤️ for the Appwrite and Claude communities
|
||||
|
||||
[Report Bug](https://github.com/your-repo/issues) • [Request Feature](https://github.com/your-repo/issues) • [Documentation](https://github.com/your-repo/wiki)
|
||||
[Report Bug](https://git.nebulm.com/smoido/app-write-mcp/issues) • [Request Feature](https://git.nebulm.com/smoido/app-write-mcp/issues) • [Documentation](https://git.nebulm.com/smoido/app-write-mcp/wiki)
|
||||
|
||||
</div>
|
||||
409
removed-tools-backup.ts
Normal file
409
removed-tools-backup.ts
Normal file
@@ -0,0 +1,409 @@
|
||||
/**
|
||||
* REMOVED TOOLS BACKUP
|
||||
*
|
||||
* This file contains all the tools that were removed from the main MCP server
|
||||
* to reduce context usage. These tools can be restored if needed in the future.
|
||||
*
|
||||
* Removed on: 2025-09-05
|
||||
* Reason: Reduce MCP context usage from ~61,830 tokens to under 25,000 tokens
|
||||
*
|
||||
* Categories of removed tools:
|
||||
* 1. Data Analysis & Intelligence Tools (8 tools)
|
||||
* 2. Avatars Service (7 tools)
|
||||
* 3. Locale Service (5 tools)
|
||||
* 4. Advanced User Management (12 tools)
|
||||
* 5. Messaging Targets (5 tools)
|
||||
* 6. Health Monitoring (2 tools) - kept get_health only
|
||||
* 7. Session Management (3 tools)
|
||||
* 8. Function Execution (1 tool)
|
||||
*
|
||||
* Total removed: ~43 tools
|
||||
*/
|
||||
|
||||
// ===== DATA ANALYSIS & INTELLIGENCE TOOLS (8 tools) =====
|
||||
|
||||
// auto_detect_schema - Smart analysis feature
|
||||
const autoDetectSchemaTool = {
|
||||
name: "auto_detect_schema",
|
||||
description: "Analyze sample data and automatically create collection schema with appropriate attributes",
|
||||
inputSchema: {
|
||||
type: "object",
|
||||
properties: {
|
||||
databaseId: { type: "string", description: "ID of the database" },
|
||||
collectionName: { type: "string", description: "Name for the new collection" },
|
||||
collectionId: { type: "string", description: "Custom collection ID (optional)" },
|
||||
sampleData: {
|
||||
type: "array",
|
||||
items: { type: "object" },
|
||||
description: "Array of sample documents to analyze"
|
||||
}
|
||||
},
|
||||
required: ["databaseId", "collectionName", "sampleData"]
|
||||
}
|
||||
};
|
||||
|
||||
// suggest_indexes - Analysis recommendation
|
||||
const suggestIndexesTool = {
|
||||
name: "suggest_indexes",
|
||||
description: "Analyze collection usage patterns and recommend optimal indexes",
|
||||
inputSchema: {
|
||||
type: "object",
|
||||
properties: {
|
||||
databaseId: { type: "string", description: "ID of the database" },
|
||||
collectionId: { type: "string", description: "ID of the collection" },
|
||||
queryPatterns: {
|
||||
type: "array",
|
||||
items: { type: "string" },
|
||||
description: "Common query patterns (optional)"
|
||||
}
|
||||
},
|
||||
required: ["databaseId", "collectionId"]
|
||||
}
|
||||
};
|
||||
|
||||
// validate_document - Pre-validation
|
||||
const validateDocumentTool = {
|
||||
name: "validate_document",
|
||||
description: "Validate document data against collection schema before creation",
|
||||
inputSchema: {
|
||||
type: "object",
|
||||
properties: {
|
||||
databaseId: { type: "string", description: "ID of the database" },
|
||||
collectionId: { type: "string", description: "ID of the collection" },
|
||||
documentData: { type: "object", description: "Document data to validate" }
|
||||
},
|
||||
required: ["databaseId", "collectionId", "documentData"]
|
||||
}
|
||||
};
|
||||
|
||||
// schema_migration - Advanced schema operation
|
||||
const schemaMigrationTool = {
|
||||
name: "schema_migration",
|
||||
description: "Automatically migrate collection schema with data preservation",
|
||||
inputSchema: {
|
||||
type: "object",
|
||||
properties: {
|
||||
databaseId: { type: "string", description: "ID of the database" },
|
||||
collectionId: { type: "string", description: "ID of the collection" },
|
||||
newSchema: {
|
||||
type: "array",
|
||||
items: { type: "object" },
|
||||
description: "New schema definition"
|
||||
},
|
||||
migrationStrategy: {
|
||||
type: "string",
|
||||
enum: ["safe", "aggressive"],
|
||||
description: "Migration strategy (safe, aggressive)",
|
||||
default: "safe"
|
||||
}
|
||||
},
|
||||
required: ["databaseId", "collectionId", "newSchema"]
|
||||
}
|
||||
};
|
||||
|
||||
// analyze_collection - Data insights analysis
|
||||
const analyzeCollectionTool = {
|
||||
name: "analyze_collection",
|
||||
description: "Get comprehensive data insights and patterns from a collection",
|
||||
inputSchema: {
|
||||
type: "object",
|
||||
properties: {
|
||||
databaseId: { type: "string", description: "ID of the database" },
|
||||
collectionId: { type: "string", description: "ID of the collection" },
|
||||
analysisType: {
|
||||
type: "string",
|
||||
enum: ["basic", "detailed", "statistical"],
|
||||
description: "Type of analysis",
|
||||
default: "basic"
|
||||
}
|
||||
},
|
||||
required: ["databaseId", "collectionId"]
|
||||
}
|
||||
};
|
||||
|
||||
// detect_duplicates - Data analysis feature
|
||||
const detectDuplicatesTool = {
|
||||
name: "detect_duplicates",
|
||||
description: "Find potential duplicate records across collections",
|
||||
inputSchema: {
|
||||
type: "object",
|
||||
properties: {
|
||||
databaseId: { type: "string", description: "ID of the database" },
|
||||
collectionId: { type: "string", description: "ID of the collection" },
|
||||
fields: {
|
||||
type: "array",
|
||||
items: { type: "string" },
|
||||
description: "Fields to check for duplicates"
|
||||
},
|
||||
threshold: {
|
||||
type: "number",
|
||||
description: "Similarity threshold (0-1)",
|
||||
default: 0.9
|
||||
}
|
||||
},
|
||||
required: ["databaseId", "collectionId", "fields"]
|
||||
}
|
||||
};
|
||||
|
||||
// data_quality_check - Quality analysis
|
||||
const dataQualityCheckTool = {
|
||||
name: "data_quality_check",
|
||||
description: "Analyze data quality and identify issues (missing fields, invalid formats, etc.)",
|
||||
inputSchema: {
|
||||
type: "object",
|
||||
properties: {
|
||||
databaseId: { type: "string", description: "ID of the database" },
|
||||
collectionId: { type: "string", description: "ID of the collection" },
|
||||
checkType: {
|
||||
type: "string",
|
||||
enum: ["completeness", "validity", "consistency", "all"],
|
||||
description: "Type of quality check",
|
||||
default: "all"
|
||||
}
|
||||
},
|
||||
required: ["databaseId", "collectionId"]
|
||||
}
|
||||
};
|
||||
|
||||
// usage_stats - Analytics feature
|
||||
const usageStatsTool = {
|
||||
name: "usage_stats",
|
||||
description: "Get usage statistics and access patterns for collections and documents",
|
||||
inputSchema: {
|
||||
type: "object",
|
||||
properties: {
|
||||
databaseId: { type: "string", description: "ID of the database" },
|
||||
collectionId: { type: "string", description: "ID of the collection (optional, for all collections if not specified)" },
|
||||
timeRange: {
|
||||
type: "string",
|
||||
enum: ["1d", "7d", "30d", "90d"],
|
||||
description: "Time range for stats",
|
||||
default: "7d"
|
||||
}
|
||||
},
|
||||
required: ["databaseId"]
|
||||
}
|
||||
};
|
||||
|
||||
// ===== AVATARS SERVICE (7 tools) =====
|
||||
|
||||
const avatarTools = [
|
||||
{
|
||||
name: "get_browser_icon",
|
||||
description: "Get browser icon image URL",
|
||||
inputSchema: {
|
||||
type: "object",
|
||||
properties: {
|
||||
code: { type: "string", description: "Browser code" },
|
||||
width: { type: "number", description: "Icon width (optional)" },
|
||||
height: { type: "number", description: "Icon height (optional)" },
|
||||
quality: { type: "number", description: "Image quality (optional)" }
|
||||
},
|
||||
required: ["code"]
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "get_credit_card_icon",
|
||||
description: "Get credit card icon image URL",
|
||||
inputSchema: {
|
||||
type: "object",
|
||||
properties: {
|
||||
code: { type: "string", description: "Credit card code" },
|
||||
width: { type: "number", description: "Icon width (optional)" },
|
||||
height: { type: "number", description: "Icon height (optional)" },
|
||||
quality: { type: "number", description: "Image quality (optional)" }
|
||||
},
|
||||
required: ["code"]
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "get_favicon",
|
||||
description: "Get website favicon URL",
|
||||
inputSchema: {
|
||||
type: "object",
|
||||
properties: {
|
||||
url: { type: "string", description: "Website URL" }
|
||||
},
|
||||
required: ["url"]
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "get_flag_icon",
|
||||
description: "Get country flag icon URL",
|
||||
inputSchema: {
|
||||
type: "object",
|
||||
properties: {
|
||||
code: { type: "string", description: "Country code" },
|
||||
width: { type: "number", description: "Icon width (optional)" },
|
||||
height: { type: "number", description: "Icon height (optional)" },
|
||||
quality: { type: "number", description: "Image quality (optional)" }
|
||||
},
|
||||
required: ["code"]
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "get_image_from_url",
|
||||
description: "Get image from URL with transformations",
|
||||
inputSchema: {
|
||||
type: "object",
|
||||
properties: {
|
||||
url: { type: "string", description: "Image URL" },
|
||||
width: { type: "number", description: "Image width (optional)" },
|
||||
height: { type: "number", description: "Image height (optional)" }
|
||||
},
|
||||
required: ["url"]
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "get_initials_avatar",
|
||||
description: "Generate initials avatar URL",
|
||||
inputSchema: {
|
||||
type: "object",
|
||||
properties: {
|
||||
name: { type: "string", description: "Name for initials" },
|
||||
width: { type: "number", description: "Avatar width (optional)" },
|
||||
height: { type: "number", description: "Avatar height (optional)" },
|
||||
background: { type: "string", description: "Background color (optional)" }
|
||||
},
|
||||
required: ["name"]
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "get_qr_code",
|
||||
description: "Generate QR code URL",
|
||||
inputSchema: {
|
||||
type: "object",
|
||||
properties: {
|
||||
text: { type: "string", description: "Text to encode" },
|
||||
size: { type: "number", description: "QR code size (optional)" },
|
||||
margin: { type: "number", description: "QR code margin (optional)" },
|
||||
download: { type: "boolean", description: "Force download (optional)" }
|
||||
},
|
||||
required: ["text"]
|
||||
}
|
||||
}
|
||||
];
|
||||
|
||||
// ===== LOCALE SERVICE (5 tools) =====
|
||||
|
||||
const localeTools = [
|
||||
{
|
||||
name: "list_countries",
|
||||
description: "List all countries with phone codes"
|
||||
},
|
||||
{
|
||||
name: "list_continents",
|
||||
description: "List all continents"
|
||||
},
|
||||
{
|
||||
name: "list_currencies",
|
||||
description: "List all currencies"
|
||||
},
|
||||
{
|
||||
name: "list_languages",
|
||||
description: "List all languages"
|
||||
},
|
||||
{
|
||||
name: "list_phone_codes",
|
||||
description: "List phone codes for all countries"
|
||||
}
|
||||
];
|
||||
|
||||
// ===== ADVANCED USER MANAGEMENT (12 tools) =====
|
||||
|
||||
const advancedUserTools = [
|
||||
"verify_user_email",
|
||||
"unverify_user_email",
|
||||
"verify_user_phone",
|
||||
"unverify_user_phone",
|
||||
"update_user_mfa",
|
||||
"create_user_mfa_recovery_codes",
|
||||
"update_user_phone_verification",
|
||||
"update_user_password_hash",
|
||||
"list_user_identities",
|
||||
"delete_user_identity",
|
||||
"update_user_labels",
|
||||
"get_user_preferences"
|
||||
];
|
||||
|
||||
// ===== MESSAGING TARGETS (5 tools) =====
|
||||
|
||||
const messagingTargetTools = [
|
||||
"create_user_target",
|
||||
"list_user_targets",
|
||||
"get_user_target",
|
||||
"update_user_target",
|
||||
"delete_user_target"
|
||||
];
|
||||
|
||||
// ===== HEALTH MONITORING (2 tools - kept get_health only) =====
|
||||
|
||||
const healthTools = [
|
||||
"get_health_db",
|
||||
"get_health_storage"
|
||||
];
|
||||
|
||||
// ===== SESSION MANAGEMENT (3 tools) =====
|
||||
|
||||
const sessionTools = [
|
||||
"create_session",
|
||||
"delete_session",
|
||||
"list_sessions"
|
||||
];
|
||||
|
||||
// ===== FUNCTION EXECUTION (1 tool) =====
|
||||
|
||||
const functionExecutionTools = [
|
||||
"execute_function"
|
||||
];
|
||||
|
||||
/**
|
||||
* TOOL IMPLEMENTATIONS
|
||||
*
|
||||
* The actual implementation code for these tools was removed from the main file.
|
||||
* If you need to restore any of these tools:
|
||||
*
|
||||
* 1. Add the tool definition back to the tools list in setupToolHandlers()
|
||||
* 2. Add the case handler back to the handleTool() switch statement
|
||||
* 3. Restore the implementation method to the class
|
||||
*
|
||||
* The implementations used the standard pattern:
|
||||
* - Validate configuration
|
||||
* - Parse input parameters
|
||||
* - Call appropriate Appwrite service method
|
||||
* - Return formatted response
|
||||
* - Handle errors gracefully
|
||||
*/
|
||||
|
||||
export {
|
||||
// Data Analysis Tools
|
||||
autoDetectSchemaTool,
|
||||
suggestIndexesTool,
|
||||
validateDocumentTool,
|
||||
schemaMigrationTool,
|
||||
analyzeCollectionTool,
|
||||
detectDuplicatesTool,
|
||||
dataQualityCheckTool,
|
||||
usageStatsTool,
|
||||
|
||||
// Avatar Tools
|
||||
avatarTools,
|
||||
|
||||
// Locale Tools
|
||||
localeTools,
|
||||
|
||||
// Advanced User Tools
|
||||
advancedUserTools,
|
||||
|
||||
// Messaging Target Tools
|
||||
messagingTargetTools,
|
||||
|
||||
// Health Tools
|
||||
healthTools,
|
||||
|
||||
// Session Tools
|
||||
sessionTools,
|
||||
|
||||
// Function Execution Tools
|
||||
functionExecutionTools
|
||||
};
|
||||
7097
src/index.ts
7097
src/index.ts
File diff suppressed because it is too large
Load Diff
4425
src/index.ts.backup
Normal file
4425
src/index.ts.backup
Normal file
File diff suppressed because it is too large
Load Diff
4425
src/index.ts.old
Normal file
4425
src/index.ts.old
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user