@baruchiro/paperless-mcp 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -27,7 +27,7 @@ const utils_1 = require("../api/utils");
|
|
|
27
27
|
const middlewares_1 = require("./utils/middlewares");
|
|
28
28
|
const queryString_1 = require("./utils/queryString");
|
|
29
29
|
function registerCorrespondentTools(server, api) {
|
|
30
|
-
server.tool("list_correspondents", {
|
|
30
|
+
server.tool("list_correspondents", "List all correspondents with optional filtering and pagination. Correspondents represent entities that send or receive documents.", {
|
|
31
31
|
page: zod_1.z.number().optional(),
|
|
32
32
|
page_size: zod_1.z.number().optional(),
|
|
33
33
|
name__icontains: zod_1.z.string().optional(),
|
|
@@ -50,7 +50,7 @@ function registerCorrespondentTools(server, api) {
|
|
|
50
50
|
],
|
|
51
51
|
};
|
|
52
52
|
})));
|
|
53
|
-
server.tool("get_correspondent", { id: zod_1.z.number() }, (0, middlewares_1.withErrorHandling)((args, extra) => __awaiter(this, void 0, void 0, function* () {
|
|
53
|
+
server.tool("get_correspondent", "Get a specific correspondent by ID with full details including matching rules.", { id: zod_1.z.number() }, (0, middlewares_1.withErrorHandling)((args, extra) => __awaiter(this, void 0, void 0, function* () {
|
|
54
54
|
if (!api)
|
|
55
55
|
throw new Error("Please configure API connection first");
|
|
56
56
|
const response = yield api.getCorrespondent(args.id);
|
|
@@ -61,7 +61,7 @@ function registerCorrespondentTools(server, api) {
|
|
|
61
61
|
],
|
|
62
62
|
};
|
|
63
63
|
})));
|
|
64
|
-
server.tool("create_correspondent", {
|
|
64
|
+
server.tool("create_correspondent", "Create a new correspondent with optional matching pattern and algorithm for automatic document assignment.", {
|
|
65
65
|
name: zod_1.z.string(),
|
|
66
66
|
match: zod_1.z.string().optional(),
|
|
67
67
|
matching_algorithm: zod_1.z
|
|
@@ -82,7 +82,7 @@ function registerCorrespondentTools(server, api) {
|
|
|
82
82
|
],
|
|
83
83
|
};
|
|
84
84
|
})));
|
|
85
|
-
server.tool("update_correspondent", {
|
|
85
|
+
server.tool("update_correspondent", "Update an existing correspondent's name, matching pattern, or matching algorithm.", {
|
|
86
86
|
id: zod_1.z.number(),
|
|
87
87
|
name: zod_1.z.string(),
|
|
88
88
|
match: zod_1.z.string().optional(),
|
|
@@ -47,7 +47,7 @@ function registerCustomFieldTools(server, api) {
|
|
|
47
47
|
],
|
|
48
48
|
};
|
|
49
49
|
})));
|
|
50
|
-
server.tool("get_custom_field", { id: zod_1.z.number() }, (0, middlewares_1.withErrorHandling)((args, extra) => __awaiter(this, void 0, void 0, function* () {
|
|
50
|
+
server.tool("get_custom_field", "Get a specific custom field by ID with full details including data type and extra configuration.", { id: zod_1.z.number() }, (0, middlewares_1.withErrorHandling)((args, extra) => __awaiter(this, void 0, void 0, function* () {
|
|
51
51
|
if (!api)
|
|
52
52
|
throw new Error("Please configure API connection first");
|
|
53
53
|
const response = yield api.getCustomField(args.id);
|
|
@@ -55,7 +55,7 @@ function registerCustomFieldTools(server, api) {
|
|
|
55
55
|
content: [{ type: "text", text: JSON.stringify(response) }],
|
|
56
56
|
};
|
|
57
57
|
})));
|
|
58
|
-
server.tool("create_custom_field", {
|
|
58
|
+
server.tool("create_custom_field", "Create a new custom field with a specified data type (string, url, date, boolean, integer, float, monetary, documentlink, or select).", {
|
|
59
59
|
name: zod_1.z.string(),
|
|
60
60
|
data_type: zod_1.z.enum([
|
|
61
61
|
"string",
|
|
@@ -77,7 +77,7 @@ function registerCustomFieldTools(server, api) {
|
|
|
77
77
|
content: [{ type: "text", text: JSON.stringify(response) }],
|
|
78
78
|
};
|
|
79
79
|
})));
|
|
80
|
-
server.tool("update_custom_field", {
|
|
80
|
+
server.tool("update_custom_field", "Update an existing custom field's name, data type, or extra configuration data.", {
|
|
81
81
|
id: zod_1.z.number(),
|
|
82
82
|
name: zod_1.z.string().optional(),
|
|
83
83
|
data_type: zod_1.z
|
|
@@ -50,7 +50,7 @@ function registerDocumentTypeTools(server, api) {
|
|
|
50
50
|
],
|
|
51
51
|
};
|
|
52
52
|
})));
|
|
53
|
-
server.tool("get_document_type", { id: zod_1.z.number() }, (0, middlewares_1.withErrorHandling)((args, extra) => __awaiter(this, void 0, void 0, function* () {
|
|
53
|
+
server.tool("get_document_type", "Get a specific document type by ID with full details including matching rules.", { id: zod_1.z.number() }, (0, middlewares_1.withErrorHandling)((args, extra) => __awaiter(this, void 0, void 0, function* () {
|
|
54
54
|
if (!api)
|
|
55
55
|
throw new Error("Please configure API connection first");
|
|
56
56
|
const response = yield api.request(`/document_types/${args.id}/`);
|
|
@@ -59,7 +59,7 @@ function registerDocumentTypeTools(server, api) {
|
|
|
59
59
|
content: [{ type: "text", text: JSON.stringify(enhancedDocumentType) }],
|
|
60
60
|
};
|
|
61
61
|
})));
|
|
62
|
-
server.tool("create_document_type", {
|
|
62
|
+
server.tool("create_document_type", "Create a new document type with optional matching pattern and algorithm for automatic document classification.", {
|
|
63
63
|
name: zod_1.z.string(),
|
|
64
64
|
match: zod_1.z.string().optional(),
|
|
65
65
|
matching_algorithm: zod_1.z
|
|
@@ -78,7 +78,7 @@ function registerDocumentTypeTools(server, api) {
|
|
|
78
78
|
content: [{ type: "text", text: JSON.stringify(enhancedDocumentType) }],
|
|
79
79
|
};
|
|
80
80
|
})));
|
|
81
|
-
server.tool("update_document_type", {
|
|
81
|
+
server.tool("update_document_type", "Update an existing document type's name, matching pattern, or matching algorithm.", {
|
|
82
82
|
id: zod_1.z.number(),
|
|
83
83
|
name: zod_1.z.string(),
|
|
84
84
|
match: zod_1.z.string().optional(),
|
package/build/tools/documents.js
CHANGED
|
@@ -111,7 +111,7 @@ function registerDocumentTools(server, api) {
|
|
|
111
111
|
],
|
|
112
112
|
};
|
|
113
113
|
})));
|
|
114
|
-
server.tool("post_document", {
|
|
114
|
+
server.tool("post_document", "Upload a new document to Paperless-NGX with optional metadata like title, correspondent, document type, tags, and custom fields.", {
|
|
115
115
|
file: zod_1.z.string(),
|
|
116
116
|
filename: zod_1.z.string(),
|
|
117
117
|
title: zod_1.z.string().optional(),
|
|
@@ -184,7 +184,7 @@ function registerDocumentTools(server, api) {
|
|
|
184
184
|
const docsResponse = yield api.getDocuments(query.toString() ? `?${query.toString()}` : "");
|
|
185
185
|
return (0, documentEnhancer_1.convertDocsWithNames)(docsResponse, api);
|
|
186
186
|
})));
|
|
187
|
-
server.tool("get_document", {
|
|
187
|
+
server.tool("get_document", "Get a specific document by ID with full details including correspondent, document type, tags, and custom fields.", {
|
|
188
188
|
id: zod_1.z.number(),
|
|
189
189
|
}, (0, middlewares_1.withErrorHandling)((args, extra) => __awaiter(this, void 0, void 0, function* () {
|
|
190
190
|
if (!api)
|
|
@@ -241,7 +241,7 @@ function registerDocumentTools(server, api) {
|
|
|
241
241
|
const docsResponse = yield api.searchDocuments(args.query);
|
|
242
242
|
return (0, documentEnhancer_1.convertDocsWithNames)(docsResponse, api);
|
|
243
243
|
})));
|
|
244
|
-
server.tool("download_document", {
|
|
244
|
+
server.tool("download_document", "Download a document file by ID. Returns the document as a base64-encoded resource.", {
|
|
245
245
|
id: zod_1.z.number(),
|
|
246
246
|
original: zod_1.z.boolean().optional(),
|
|
247
247
|
}, (0, middlewares_1.withErrorHandling)((args, extra) => __awaiter(this, void 0, void 0, function* () {
|
package/build/tools/tags.js
CHANGED
|
@@ -39,7 +39,7 @@ function registerTagTools(server, api) {
|
|
|
39
39
|
],
|
|
40
40
|
};
|
|
41
41
|
})));
|
|
42
|
-
server.tool("create_tag", {
|
|
42
|
+
server.tool("create_tag", "Create a new tag with optional color, matching pattern, and matching algorithm for automatic document tagging.", {
|
|
43
43
|
name: zod_1.z.string(),
|
|
44
44
|
color: zod_1.z
|
|
45
45
|
.string()
|
|
@@ -67,7 +67,7 @@ function registerTagTools(server, api) {
|
|
|
67
67
|
],
|
|
68
68
|
};
|
|
69
69
|
})));
|
|
70
|
-
server.tool("update_tag", {
|
|
70
|
+
server.tool("update_tag", "Update an existing tag's name, color, matching pattern, or matching algorithm.", {
|
|
71
71
|
id: zod_1.z.number(),
|
|
72
72
|
name: zod_1.z.string(),
|
|
73
73
|
color: zod_1.z
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@baruchiro/paperless-mcp",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"description": "Model Context Protocol (MCP) server for interacting with Paperless-NGX document management system. Enables AI assistants to manage documents, tags, correspondents, and document types through the Paperless-NGX API.",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"bin": {
|
package/paperless-mcp.dxt
CHANGED
|
Binary file
|