|
| 1 | +- Repo: dvcrn/mcp-server-devonthink |
1 | 2 | # Copilot Instructions |
2 | 3 |
|
3 | 4 | - This project uses [Vitest](https://vitest.dev/) for testing. |
@@ -44,6 +45,7 @@ npm run build # Verify the build works |
44 | 45 | - **`src/tools/`**: Directory containing all tool implementations |
45 | 46 | - **`isRunning.ts`**: Defines the `is_running` tool, which checks if DEVONthink is active |
46 | 47 | - **`createRecord.ts`**: Creates new records in DEVONthink |
| 48 | + - **`importFile.ts`**: Imports existing files or folders into DEVONthink from a POSIX path or file URL |
47 | 49 | - **`deleteRecord.ts`**: Deletes records from DEVONthink |
48 | 50 | - **`moveRecord.ts`**: Moves records between groups |
49 | 51 | - **`getRecordProperties.ts`**: Retrieves detailed properties and metadata for records |
@@ -95,31 +97,32 @@ The MCP server currently provides the following tools: |
95 | 97 |
|
96 | 98 | 1. **`is_running`** - Check if DEVONthink is running |
97 | 99 | 2. **`create_record`** - Create new records (notes, bookmarks, groups) with specified properties |
98 | | -3. **`delete_record`** - Delete records by ID, name, or path |
99 | | -4. **`move_record`** - Move records between groups |
100 | | -5. **`get_record_properties`** - Get detailed metadata and properties for records |
101 | | -6. **`get_record_by_identifier`** - Get a record using either UUID or ID+Database combination (recommended for specific record lookup) |
102 | | -7. **`search`** - Perform text-based searches with various comparison options (now returns both ID and UUID) |
103 | | -8. **`lookup_record`** - Look up records by filename, path, URL, tags, comment, or content hash (exact matches only, no wildcards). Supports `x-devonthink-item://` URLs with percent-encoded identifiers (e.g., email message-IDs) |
104 | | -9. **`create_from_url`** - Create records from web URLs in multiple formats |
105 | | -10. **`get_open_databases`** - Get a list of all currently open databases |
106 | | -11. **`current_database`** - Get information about the currently active database |
107 | | -12. **`selected_records`** - Get information about currently selected records in DEVONthink |
108 | | -13. **`list_group_content`** - Lists the content of a specific group |
109 | | -14. **`get_record_content`** - Gets the content of a specific record |
110 | | -15. **`rename_record`** - Renames a specific record |
111 | | -16. **`add_tags`** - Adds tags to a specific record |
112 | | -17. **`remove_tags`** - Removes tags from a specific record |
113 | | -18. **`classify`** - Get AI-powered suggestions for organizing records |
114 | | -19. **`compare`** - Find similar records or compare two specific records |
115 | | -20. **`replicate_record`** - Replicate records within the same database (creates linked references) |
116 | | -21. **`duplicate_record`** - Duplicate records to any database (creates independent copies) |
117 | | -22. **`convert_record`** - Convert records to different formats (plain text, rich text, markdown, HTML, PDF, etc.) |
118 | | -23. **`update_record_content`** - Update the content of existing records while preserving UUID and metadata |
119 | | -24. **`ask_ai_about_documents`** - Ask AI questions about specific documents for analysis, comparison, or extraction |
120 | | -25. **`check_ai_health`** - Check if DEVONthink's AI services are available and working properly |
121 | | -26. **`create_summary_document`** - Create AI-generated summaries from multiple documents |
122 | | -27. **`get_ai_tool_documentation`** - Get detailed documentation for AI tools including examples and use cases |
| 100 | +3. **`import_file`** - Import an existing file or folder into DEVONthink from a POSIX path or file URL |
| 101 | +4. **`delete_record`** - Delete records by ID, name, or path |
| 102 | +5. **`move_record`** - Move records between groups |
| 103 | +6. **`get_record_properties`** - Get detailed metadata and properties for records |
| 104 | +7. **`get_record_by_identifier`** - Get a record using either UUID or ID+Database combination (recommended for specific record lookup) |
| 105 | +8. **`search`** - Perform text-based searches with various comparison options (now returns both ID and UUID) |
| 106 | +9. **`lookup_record`** - Look up records by filename, path, URL, tags, comment, or content hash (exact matches only, no wildcards). Supports `x-devonthink-item://` URLs with percent-encoded identifiers (e.g., email message-IDs) |
| 107 | +10. **`create_from_url`** - Create records from web URLs in multiple formats |
| 108 | +11. **`get_open_databases`** - Get a list of all currently open databases |
| 109 | +12. **`current_database`** - Get information about the currently active database |
| 110 | +13. **`selected_records`** - Get information about currently selected records in DEVONthink |
| 111 | +14. **`list_group_content`** - Lists the content of a specific group |
| 112 | +15. **`get_record_content`** - Gets the content of a specific record |
| 113 | +16. **`rename_record`** - Renames a specific record |
| 114 | +17. **`add_tags`** - Adds tags to a specific record |
| 115 | +18. **`remove_tags`** - Removes tags from a specific record |
| 116 | +19. **`classify`** - Get AI-powered suggestions for organizing records |
| 117 | +20. **`compare`** - Find similar records or compare two specific records |
| 118 | +21. **`replicate_record`** - Replicate records within the same database (creates linked references) |
| 119 | +22. **`duplicate_record`** - Duplicate records to any database (creates independent copies) |
| 120 | +23. **`convert_record`** - Convert records to different formats (plain text, rich text, markdown, HTML, PDF, etc.) |
| 121 | +24. **`update_record_content`** - Update the content of existing records while preserving UUID and metadata |
| 122 | +25. **`ask_ai_about_documents`** - Ask AI questions about specific documents for analysis, comparison, or extraction |
| 123 | +26. **`check_ai_health`** - Check if DEVONthink's AI services are available and working properly |
| 124 | +27. **`create_summary_document`** - Create AI-generated summaries from multiple documents |
| 125 | +28. **`get_ai_tool_documentation`** - Get detailed documentation for AI tools including examples and use cases |
123 | 126 |
|
124 | 127 | ## Adding New Tools |
125 | 128 |
|
@@ -319,6 +322,11 @@ Refer to `docs/devonthink-javascript-2.md` for comprehensive documentation of av |
319 | 322 |
|
320 | 323 | ## Recent Improvements |
321 | 324 |
|
| 325 | +### File Import Tool (2026-04) |
| 326 | +- Added `import_file` to import existing files or folders with DEVONthink's native `import path` AppleScript/JXA command |
| 327 | +- The tool defaults to the global Inbox when no destination is provided and accepts a destination group UUID or database override for explicit placement |
| 328 | +- This is distinct from `create_record`, which creates DEVONthink-native records and does not ingest an existing file from disk |
| 329 | + |
322 | 330 | ### URL Lookup Fix and Integration Tests (2025-09) |
323 | 331 | - Fixed `lookup_record` to handle `x-devonthink-item://` URLs with percent-encoded identifiers (e.g., email message-IDs) |
324 | 332 | - Previously, these URLs were passed directly to `lookupRecordsWithURL` which searches the `url` property, not `referenceURL` — returning 0 results |
|
0 commit comments