outline-mcp-server 4.4.2 → 4.6.0
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.
- package/README.md +15 -10
- package/build/client.js +9 -9
- package/build/client.js.map +1 -1
- package/build/index.d.ts +1 -9
- package/build/index.d.ts.map +1 -1
- package/build/index.js +19 -22
- package/build/index.js.map +1 -1
- package/build/tools/createCollection.d.ts +2 -0
- package/build/tools/createCollection.d.ts.map +1 -0
- package/build/tools/createCollection.js +59 -0
- package/build/tools/createCollection.js.map +1 -0
- package/build/tools/createDocument.js +19 -19
- package/build/tools/createDocument.js.map +1 -1
- package/build/tools/deleteDocument.js +10 -10
- package/build/tools/deleteDocument.js.map +1 -1
- package/build/tools/getCollection.js +9 -9
- package/build/tools/getCollection.js.map +1 -1
- package/build/tools/getDocument.js +8 -12
- package/build/tools/getDocument.js.map +1 -1
- package/build/tools/listCollections.js +8 -8
- package/build/tools/listCollections.js.map +1 -1
- package/build/tools/listDocuments.js +12 -12
- package/build/tools/listDocuments.js.map +1 -1
- package/build/tools/searchDocuments.js +12 -12
- package/build/tools/searchDocuments.js.map +1 -1
- package/build/tools/updateCollection.d.ts +2 -0
- package/build/tools/updateCollection.d.ts.map +1 -0
- package/build/tools/updateCollection.js +59 -0
- package/build/tools/updateCollection.js.map +1 -0
- package/build/tools/updateDocument.js +18 -18
- package/build/tools/updateDocument.js.map +1 -1
- package/build/types.d.ts +17 -0
- package/build/types.d.ts.map +1 -1
- package/build/utils/importTools.d.ts +5 -0
- package/build/utils/importTools.d.ts.map +1 -0
- package/build/utils/importTools.js +18 -0
- package/build/utils/importTools.js.map +1 -0
- package/package.json +5 -3
package/README.md
CHANGED
@@ -1,10 +1,11 @@
|
|
1
1
|
# Outline MCP Server
|
2
2
|
|
3
|
-
A Model Context Protocol (MCP) server that provides tools for interacting with Outline's API, enabling AI agents to manage documents, collections, and other entities programmatically through the Outline knowledge base platform.
|
3
|
+
A Model Context Protocol (MCP) server that provides tools for interacting with [Outline](https://www.getoutline.com/)'s API, enabling AI agents to manage documents, collections, and other entities programmatically through the Outline knowledge base platform.
|
4
4
|
|
5
5
|
## Features
|
6
6
|
|
7
7
|
- **Document Management**
|
8
|
+
|
8
9
|
- ✅ Create new documents with customizable properties
|
9
10
|
- ✅ Get document details
|
10
11
|
- ✅ Update existing documents
|
@@ -15,16 +16,18 @@ A Model Context Protocol (MCP) server that provides tools for interacting with O
|
|
15
16
|
- **Collection Management**
|
16
17
|
- ✅ Get collection details
|
17
18
|
- ✅ List collections
|
18
|
-
-
|
19
|
+
- ✅ Create and update collections
|
20
|
+
|
21
|
+
> **Note:** The SSE server implementation uses [Supergateway](https://github.com/supercorp-ai/supergateway), which provides more reliable connectivity when used with Cursor's MCP integration.
|
22
|
+
|
23
|
+
## Quick Start
|
19
24
|
|
20
|
-
|
25
|
+
### Prerequisites
|
21
26
|
|
22
27
|
- Node.js (v18 or higher)
|
23
28
|
- An Outline account with API access
|
24
29
|
- Outline API key with appropriate permissions
|
25
30
|
|
26
|
-
## Quick Start
|
27
|
-
|
28
31
|
### Installation
|
29
32
|
|
30
33
|
```bash
|
@@ -40,11 +43,13 @@ OUTLINE_API_KEY=… outline-mcp-server --port 7070
|
|
40
43
|
```
|
41
44
|
|
42
45
|
### Env
|
43
|
-
|
44
|
-
- `
|
46
|
+
|
47
|
+
- `OUTLINE_API_KEY` (_required_): your API key for outline, duh
|
48
|
+
- `OUTLINE_BASE_URL` (_optional_): Alternative URL for your outline API (if using an alt domain/self-hosting)
|
45
49
|
|
46
50
|
### CLI Options
|
47
|
-
|
51
|
+
|
52
|
+
- `--port <number>` (_optional_): Specify the port on which the server will run (default: 6060)
|
48
53
|
|
49
54
|
### Usage
|
50
55
|
|
@@ -76,7 +81,7 @@ OUTLINE_BASE_URL=https://your-outline-instance.com/api # Optional, defaults to
|
|
76
81
|
```
|
77
82
|
|
78
83
|
```bash
|
79
|
-
# Run the project as an SSE server endpoint
|
84
|
+
# Run the project as an SSE server endpoint
|
80
85
|
npm run start
|
81
86
|
|
82
87
|
# Run the project as an stdio process
|
@@ -85,4 +90,4 @@ npm run start:stdio
|
|
85
90
|
|
86
91
|
## License
|
87
92
|
|
88
|
-
MIT
|
93
|
+
MIT
|
package/build/client.js
CHANGED
@@ -1,13 +1,13 @@
|
|
1
|
-
import axios from
|
2
|
-
import { config } from
|
3
|
-
import { dirname, join } from
|
4
|
-
import { fileURLToPath } from
|
1
|
+
import axios from 'axios';
|
2
|
+
import { config } from 'dotenv';
|
3
|
+
import { dirname, join } from 'path';
|
4
|
+
import { fileURLToPath } from 'url';
|
5
5
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
6
|
-
config({ path: join(__dirname,
|
6
|
+
config({ path: join(__dirname, '..', '.env') });
|
7
7
|
const API_KEY = process.env.OUTLINE_API_KEY;
|
8
|
-
const API_URL = process.env.OUTLINE_API_URL ||
|
8
|
+
const API_URL = process.env.OUTLINE_API_URL || 'https://app.getoutline.com/api';
|
9
9
|
if (!API_KEY) {
|
10
|
-
throw new Error(
|
10
|
+
throw new Error('OUTLINE_API_KEY environment variable is required');
|
11
11
|
}
|
12
12
|
console.log('Connecting to API URL:', API_URL);
|
13
13
|
// Create axios client with authentication
|
@@ -15,8 +15,8 @@ export const outlineClient = axios.create({
|
|
15
15
|
baseURL: API_URL,
|
16
16
|
headers: {
|
17
17
|
Authorization: `Bearer ${API_KEY}`,
|
18
|
-
|
19
|
-
Accept:
|
18
|
+
'Content-Type': 'application/json',
|
19
|
+
Accept: 'application/json',
|
20
20
|
},
|
21
21
|
});
|
22
22
|
//# sourceMappingURL=client.js.map
|
package/build/client.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,OAAO,EAAE,IAAI,EA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AkD,CAAC,CAAC;AACtE,CAAC;AAED,OAAO,CAAC,GAAG,CAAC,wBAAwB,EAAE,OAAO,CAAC,CAAC;AAE/C,0CAA0C;AAC1C,MAAM,CAAC,MAAM,aAAa,GAAG,KAAK,CAAC,MAAM,CAAC;IACxC,OAAO,EAAE,OAAO;IAChB,OAAO,EAAE;QACP,aAAa,EAAE,UAAU,OAAO,EAAE;QAClC,cAAc,EAAE,kBAAkB;QAClC,MAAM,EAAE,kBAAkB;KAC3B;CACF,CAAC,CAAC"}
|
package/build/index.d.ts
CHANGED
@@ -1,11 +1,3 @@
|
|
1
1
|
#!/usr/bin/env node
|
2
|
-
|
3
|
-
import "./tools/deleteDocument.js";
|
4
|
-
import "./tools/getCollection.js";
|
5
|
-
import "./tools/getDocument.js";
|
6
|
-
import "./tools/listCollections.js";
|
7
|
-
import "./tools/listDocuments.js";
|
8
|
-
import "./tools/listTeams.js";
|
9
|
-
import "./tools/searchDocuments.js";
|
10
|
-
import "./tools/updateDocument.js";
|
2
|
+
export {};
|
11
3
|
//# sourceMappingURL=index.d.ts.map
|
package/build/index.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
|
package/build/index.js
CHANGED
@@ -1,19 +1,12 @@
|
|
1
1
|
#!/usr/bin/env node
|
2
|
-
import { Server } from
|
3
|
-
import { StdioServerTransport } from
|
4
|
-
import { CallToolRequestSchema, ErrorCode, ListToolsRequestSchema, McpError, } from
|
2
|
+
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
|
3
|
+
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
4
|
+
import { CallToolRequestSchema, ErrorCode, ListToolsRequestSchema, McpError, } from '@modelcontextprotocol/sdk/types.js';
|
5
5
|
// Import tool definitions utility
|
6
|
-
import { getToolDefinitions, getToolHandlers } from
|
7
|
-
|
8
|
-
import
|
9
|
-
|
10
|
-
import "./tools/getCollection.js";
|
11
|
-
import "./tools/getDocument.js";
|
12
|
-
import "./tools/listCollections.js";
|
13
|
-
import "./tools/listDocuments.js";
|
14
|
-
import "./tools/listTeams.js";
|
15
|
-
import "./tools/searchDocuments.js";
|
16
|
-
import "./tools/updateDocument.js";
|
6
|
+
import { getToolDefinitions, getToolHandlers } from './utils/listTools.js';
|
7
|
+
import { registerTools } from './utils/importTools.js';
|
8
|
+
// Dynamically import all tool files
|
9
|
+
registerTools();
|
17
10
|
// Build the capabilities object dynamically from registered tools
|
18
11
|
const toolsCapabilities = {};
|
19
12
|
getToolDefinitions().forEach(tool => {
|
@@ -22,8 +15,8 @@ getToolDefinitions().forEach(tool => {
|
|
22
15
|
// Get the tool handlers
|
23
16
|
const toolHandlers = getToolHandlers();
|
24
17
|
const server = new Server({
|
25
|
-
name:
|
26
|
-
version:
|
18
|
+
name: 'outline-mcp',
|
19
|
+
version: '1.0.0',
|
27
20
|
}, {
|
28
21
|
capabilities: {
|
29
22
|
tools: toolsCapabilities,
|
@@ -31,7 +24,7 @@ const server = new Server({
|
|
31
24
|
});
|
32
25
|
// Register request handlers
|
33
26
|
server.setRequestHandler(ListToolsRequestSchema, async () => ({
|
34
|
-
tools: getToolDefinitions()
|
27
|
+
tools: getToolDefinitions(),
|
35
28
|
}));
|
36
29
|
server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
37
30
|
const { params } = request;
|
@@ -45,11 +38,15 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
45
38
|
// Get the handler for this tool
|
46
39
|
const handler = toolHandlers[tool];
|
47
40
|
if (!handler) {
|
48
|
-
return {
|
41
|
+
return {
|
42
|
+
error: { code: ErrorCode.InvalidRequest, message: `No handler found for tool ${tool}` },
|
43
|
+
};
|
49
44
|
}
|
50
45
|
// Call the handler with the provided parameters
|
51
46
|
const result = await handler(parameters);
|
52
|
-
return {
|
47
|
+
return {
|
48
|
+
content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
|
49
|
+
};
|
53
50
|
}
|
54
51
|
catch (error) {
|
55
52
|
if (error instanceof McpError) {
|
@@ -61,10 +58,10 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
61
58
|
async function main() {
|
62
59
|
const transport = new StdioServerTransport();
|
63
60
|
await server.connect(transport);
|
64
|
-
console.log(
|
61
|
+
console.log('Outline MCP server running on stdio');
|
65
62
|
}
|
66
|
-
main().catch(
|
67
|
-
console.error(
|
63
|
+
main().catch(error => {
|
64
|
+
console.error('Server error:', error);
|
68
65
|
process.exit(1);
|
69
66
|
});
|
70
67
|
//# sourceMappingURL=index.js.map
|
package/build/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EACL,qBAAqB,EACrB,SAAS,EACT,sBAAsB,EACtB,QAAQ,GACT,MAAM,oCAAoC,CAAC;AAE5C,kCAAkC;AAClC,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EACL,qBAAqB,EACrB,SAAS,EACT,sBAAsB,EACtB,QAAQ,GACT,MAAM,oCAAoC,CAAC;AAE5C,kCAAkC;AAClC,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC3E,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAEvD,oCA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c,EAAE,OAAO,EAAE,6BAA6B,IAAI,EAAE,EAAE;aACxF,CAAC;QACJ,CAAC;QAED,gDAAgD;QAChD,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,UAAU,CAAC,CAAC;QACzC,OAAO;YACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC;SACnE,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,KAAK,YAAY,QAAQ,EAAE,CAAC;YAC9B,OAAO,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE,EAAE,CAAC;QACjE,CAAC;QACD,OAAO,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,SAAS,CAAC,aAAa,EAAE,OAAO,EAAG,KAAe,CAAC,OAAO,EAAE,EAAE,CAAC;IACzF,CAAC;AACH,CAAC,CAAC,CAAC;AAEH,KAAK,UAAU,IAAI;IACjB,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;IAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAChC,OAAO,CAAC,GAAG,CAAC,qCAAqC,CAAC,CAAC;AACrD,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE;IACnB,OAAO,CAAC,KAAK,CAAC,eAAe,EAAE,KAAK,CAAC,CAAC;IACtC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"createCollection.d.ts","sourceRoot":"","sources":["../../src/tools/createCollection.ts"],"names":[],"mappings":""}
|
@@ -0,0 +1,59 @@
|
|
1
|
+
import { ErrorCode, McpError } from '@modelcontextprotocol/sdk/types.js';
|
2
|
+
import { outlineClient } from '../client.js';
|
3
|
+
import { registerTool } from '../utils/listTools.js';
|
4
|
+
// Register this tool
|
5
|
+
registerTool({
|
6
|
+
name: 'create_collection',
|
7
|
+
description: 'Create a new collection',
|
8
|
+
inputSchema: {
|
9
|
+
properties: {
|
10
|
+
name: {
|
11
|
+
type: 'string',
|
12
|
+
description: 'Title of the collection',
|
13
|
+
},
|
14
|
+
description: {
|
15
|
+
type: 'string',
|
16
|
+
description: 'Content of the collection in markdown format',
|
17
|
+
},
|
18
|
+
permission: {
|
19
|
+
type: 'string',
|
20
|
+
description: 'Permission level for the collection (read, read_write)',
|
21
|
+
},
|
22
|
+
color: {
|
23
|
+
type: 'string',
|
24
|
+
description: 'Hex color code for the collection',
|
25
|
+
},
|
26
|
+
private: {
|
27
|
+
type: 'boolean',
|
28
|
+
description: 'Whether this collection is private',
|
29
|
+
},
|
30
|
+
},
|
31
|
+
required: ['name'],
|
32
|
+
type: 'object',
|
33
|
+
},
|
34
|
+
}, async function handleCreateCollection(args) {
|
35
|
+
try {
|
36
|
+
const payload = {
|
37
|
+
name: args.name,
|
38
|
+
};
|
39
|
+
if (args.description !== undefined) {
|
40
|
+
payload.description = args.description;
|
41
|
+
}
|
42
|
+
if (args.permission !== undefined) {
|
43
|
+
payload.permission = args.permission;
|
44
|
+
}
|
45
|
+
if (args.color !== undefined) {
|
46
|
+
payload.color = args.color;
|
47
|
+
}
|
48
|
+
if (args.private !== undefined) {
|
49
|
+
payload.private = args.private;
|
50
|
+
}
|
51
|
+
const response = await outlineClient.post('/collections.create', payload);
|
52
|
+
return response.data.data;
|
53
|
+
}
|
54
|
+
catch (error) {
|
55
|
+
console.error('Error creating collection:', error.message);
|
56
|
+
throw new McpError(ErrorCode.InvalidRequest, error.message);
|
57
|
+
}
|
58
|
+
});
|
59
|
+
//# sourceMappingURL=createCollection.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"createCollection.js","sourceRoot":"","sources":["../../src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CAAC;QAC7B,CAAC;QAED,IAAI,IAAI,CAAC,OAAO,KAAK,SAAS,EAAE,CAAC;YAC/B,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;QACjC,CAAC;QAED,MAAM,QAAQ,GAAG,MAAM,aAAa,CAAC,IAAI,CAAC,qBAAqB,EAAE,OAAO,CAAC,CAAC;QAC1E,OAAO,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC;IAC5B,CAAC;IAAC,OAAO,KAAU,EAAE,CAAC;QACpB,OAAO,CAAC,KAAK,CAAC,4BAA4B,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;QAC3D,MAAM,IAAI,QAAQ,CAAC,SAAS,CAAC,cAAc,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;IAC9D,CAAC;AACH,CAAC,CACF,CAAC"}
|
@@ -1,40 +1,40 @@
|
|
1
|
-
import { ErrorCode, McpError } from
|
2
|
-
import { outlineClient } from
|
3
|
-
import { registerTool } from
|
1
|
+
import { ErrorCode, McpError } from '@modelcontextprotocol/sdk/types.js';
|
2
|
+
import { outlineClient } from '../client.js';
|
3
|
+
import { registerTool } from '../utils/listTools.js';
|
4
4
|
// Register this tool
|
5
5
|
registerTool({
|
6
|
-
name:
|
7
|
-
description:
|
6
|
+
name: 'create_document',
|
7
|
+
description: 'Create a new document',
|
8
8
|
inputSchema: {
|
9
9
|
properties: {
|
10
10
|
title: {
|
11
|
-
type:
|
12
|
-
description:
|
11
|
+
type: 'string',
|
12
|
+
description: 'Title of the document',
|
13
13
|
},
|
14
14
|
text: {
|
15
|
-
type:
|
16
|
-
description:
|
15
|
+
type: 'string',
|
16
|
+
description: 'Content of the document in markdown format',
|
17
17
|
},
|
18
18
|
collectionId: {
|
19
|
-
type:
|
20
|
-
description:
|
19
|
+
type: 'string',
|
20
|
+
description: 'ID of the collection to add the document to',
|
21
21
|
},
|
22
22
|
parentDocumentId: {
|
23
|
-
type:
|
24
|
-
description:
|
23
|
+
type: 'string',
|
24
|
+
description: 'ID of the parent document (if creating a nested document)',
|
25
25
|
},
|
26
26
|
publish: {
|
27
|
-
type:
|
27
|
+
type: 'boolean',
|
28
28
|
default: true,
|
29
|
-
description:
|
29
|
+
description: 'Whether to publish the document immediately',
|
30
30
|
},
|
31
31
|
template: {
|
32
|
-
type:
|
33
|
-
description:
|
32
|
+
type: 'boolean',
|
33
|
+
description: 'Whether this document is a template',
|
34
34
|
},
|
35
35
|
},
|
36
|
-
required: [
|
37
|
-
type:
|
36
|
+
required: ['title', 'text', 'collectionId'],
|
37
|
+
type: 'object',
|
38
38
|
},
|
39
39
|
}, async function handleCreateDocument(args) {
|
40
40
|
try {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"createDocument.js","sourceRoot":"","sources":["../../src/tools/createDocument.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAErD,qBAAqB;AACrB,YAAY,
|
1
|
+
{"version":3,"file":"createDocument.js","sourceRoot":"","sources":["../../src/tools/createDocument.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAErD,qBAAqB;AACrB,YAAY,CACV;IACE,IAAI,EAAE,iBAAiB;IACvB,WAAW,EAAE,uBAAuB;IACpC,WAAW,EAAE;QACX,UAAU,EAAE;YACV,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,uBAAuB;aACrC;YACD,IAAI,EAAE;gBACJ,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,4CAA4C;aAC1D;YACD,YAAY,EAAE;gB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C;QACzD,MAAM,IAAI,QAAQ,CAAC,SAAS,CAAC,cAAc,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;IAC9D,CAAC;AACH,CAAC,CACF,CAAC"}
|
@@ -1,24 +1,24 @@
|
|
1
|
-
import { ErrorCode, McpError } from
|
2
|
-
import { outlineClient } from
|
3
|
-
import { registerTool } from
|
1
|
+
import { ErrorCode, McpError } from '@modelcontextprotocol/sdk/types.js';
|
2
|
+
import { outlineClient } from '../client.js';
|
3
|
+
import { registerTool } from '../utils/listTools.js';
|
4
4
|
// Register this tool
|
5
5
|
registerTool({
|
6
|
-
name:
|
7
|
-
description:
|
6
|
+
name: 'delete_document',
|
7
|
+
description: 'Delete a document',
|
8
8
|
inputSchema: {
|
9
9
|
properties: {
|
10
10
|
id: {
|
11
|
-
type:
|
12
|
-
description:
|
11
|
+
type: 'string',
|
12
|
+
description: 'ID of the document to delete',
|
13
13
|
},
|
14
14
|
},
|
15
|
-
required: [
|
16
|
-
type:
|
15
|
+
required: ['documentId'],
|
16
|
+
type: 'object',
|
17
17
|
},
|
18
18
|
}, async function handleDeleteDocument(args) {
|
19
19
|
try {
|
20
20
|
const response = await outlineClient.post(`/documents.delete`, {
|
21
|
-
id: args.id
|
21
|
+
id: args.id,
|
22
22
|
});
|
23
23
|
return { success: response.status === 200 };
|
24
24
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"deleteDocument.js","sourceRoot":"","sources":["../../src/tools/deleteDocument.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAErD,qBAAqB;AACrB,YAAY,
|
1
|
+
{"version":3,"file":"deleteDocument.js","sourceRoot":"","sources":["../../src/tools/deleteDocument.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAErD,qBAAqB;AACrB,YAAY,CACV;IACE,IAAI,EAAE,iBAAiB;IACvB,WAAW,EAAE,mBAAmB;IAChC,WAAW,EAAE;QACX,UAAU,EAAE;YACV,EAAE,EAAE;gBACF,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,8BAA8B;aAC5C;SACF;QACD,QAAQ,EAAE,CAAC,YAAY,CAAC;QACxB,IAAI,EAAE,QAAQ;KACf;CACF,EACD,KAAK,UAAU,oBAAoB,CAAC,IAAwB;IAC1D,IAAI,CAAC;QACH,MAAM,QAAQ,GAAG,MAAM,aAAa,CAAC,IAAI,CAAC,mBAAmB,EAAE;YAC7D,EAAE,EAAE,IAAI,CAAC,EAAE;SACZ,CAAC,CAAC;QACH,OAAO,EAAE,OAAO,EAAE,QAAQ,CAAC,MAAM,KAAK,GAAG,EAAE,CAAC;IAC9C,CAAC;IAAC,OAAO,KAAU,EAAE,CAAC;QACpB,OAAO,CAAC,KAAK,CAAC,0BAA0B,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;QACzD,MAAM,IAAI,QAAQ,CAAC,SAAS,CAAC,cAAc,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;IAC9D,CAAC;AACH,CAAC,CACF,CAAC"}
|
@@ -1,19 +1,19 @@
|
|
1
|
-
import { ErrorCode, McpError } from
|
2
|
-
import { outlineClient } from
|
3
|
-
import { registerTool } from
|
1
|
+
import { ErrorCode, McpError } from '@modelcontextprotocol/sdk/types.js';
|
2
|
+
import { outlineClient } from '../client.js';
|
3
|
+
import { registerTool } from '../utils/listTools.js';
|
4
4
|
// Register this tool
|
5
5
|
registerTool({
|
6
|
-
name:
|
7
|
-
description:
|
6
|
+
name: 'get_collection',
|
7
|
+
description: 'Get details about a specific collection',
|
8
8
|
inputSchema: {
|
9
9
|
properties: {
|
10
10
|
id: {
|
11
|
-
type:
|
12
|
-
description:
|
11
|
+
type: 'string',
|
12
|
+
description: 'ID of the collection to retrieve',
|
13
13
|
},
|
14
14
|
},
|
15
|
-
required: [
|
16
|
-
type:
|
15
|
+
required: ['id'],
|
16
|
+
type: 'object',
|
17
17
|
},
|
18
18
|
}, async function handleGetCollection(args) {
|
19
19
|
try {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"getCollection.js","sourceRoot":"","sources":["../../src/tools/getCollection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAErD,qBAAqB;AACrB,YAAY,
|
1
|
+
{"version":3,"file":"getCollection.js","sourceRoot":"","sources":["../../src/tools/getCollection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAErD,qBAAqB;AACrB,YAAY,CACV;IACE,IAAI,EAAE,gBAAgB;IACtB,WAAW,EAAE,yCAAyC;IACtD,WAAW,EAAE;QACX,UAAU,EAAE;YACV,EAAE,EAAE;gBACF,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,kCAAkC;aAChD;SACF;QACD,QAAQ,EAAE,CAAC,IAAI,CAAC;QAChB,IAAI,EAAE,QAAQ;KACf;CACF,EACD,KAAK,UAAU,mBAAmB,CAAC,IAAuB;IACxD,IAAI,CAAC;QACH,MAAM,QAAQ,GAAG,MAAM,aAAa,CAAC,IAAI,CAAC,mBAAmB,EAAE,EAAE,EAAE,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC;QAChF,OAAO,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC;IAC5B,CAAC;IAAC,OAAO,KAAU,EAAE,CAAC;QACpB,OAAO,CAAC,KAAK,CAAC,2BAA2B,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;QAC1D,MAAM,IAAI,QAAQ,CAAC,SAAS,CAAC,cAAc,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;IAC9D,CAAC;AACH,CAAC,CACF,CAAC"}
|
@@ -1,22 +1,18 @@
|
|
1
|
-
import { ErrorCode, McpError } from
|
2
|
-
import { outlineClient } from
|
3
|
-
import { registerTool } from
|
1
|
+
import { ErrorCode, McpError } from '@modelcontextprotocol/sdk/types.js';
|
2
|
+
import { outlineClient } from '../client.js';
|
3
|
+
import { registerTool } from '../utils/listTools.js';
|
4
4
|
// Register this tool
|
5
5
|
registerTool({
|
6
|
-
name:
|
7
|
-
description:
|
6
|
+
name: 'get_document',
|
7
|
+
description: 'Get details about a specific document. At least id XOR shareId are required.',
|
8
8
|
inputSchema: {
|
9
9
|
properties: {
|
10
10
|
id: {
|
11
|
-
type:
|
12
|
-
description:
|
11
|
+
type: 'string',
|
12
|
+
description: 'Unique identifier for the document. Either the UUID or the urlId is acceptable',
|
13
13
|
},
|
14
|
-
shareId: {
|
15
|
-
type: "string",
|
16
|
-
description: "Share ID (urlId) of the document to retrieve"
|
17
|
-
}
|
18
14
|
},
|
19
|
-
type:
|
15
|
+
type: 'object',
|
20
16
|
},
|
21
17
|
}, async function handleGetDocument(args) {
|
22
18
|
try {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"getDocument.js","sourceRoot":"","sources":["../../src/tools/getDocument.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAErD,qBAAqB;AACrB,YAAY,
|
1
|
+
{"version":3,"file":"getDocument.js","sourceRoot":"","sources":["../../src/tools/getDocument.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAErD,qBAAqB;AACrB,YAAY,CACV;IACE,IAAI,EAAE,cAAc;IACpB,WAAW,EAAE,8EAA8E;IAC3F,WAAW,EAAE;QACX,UAAU,EAAE;YACV,EAAE,EAAE;gBACF,IAAI,EAAE,QAAQ;gBACd,WAAW,EACT,gFAAgF;aACnF;SACF;QACD,IAAI,EAAE,QAAQ;KACf;CACF,EACD,KAAK,UAAU,iBAAiB,CAAC,IAAqB;IACpD,IAAI,CAAC;QACH,MAAM,QAAQ,GAAG,MAAM,aAAa,CAAC,IAAI,CAAC,iBAAiB,EAAE,EAAE,EAAE,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC;QAC9E,OAAO,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC;IAC5B,CAAC;IAAC,OAAO,KAAU,EAAE,CAAC;QACpB,OAAO,CAAC,KAAK,CAAC,yBAAyB,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;QACxD,MAAM,IAAI,QAAQ,CAAC,SAAS,CAAC,cAAc,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;IAC9D,CAAC;AACH,CAAC,CACF,CAAC"}
|
@@ -1,18 +1,18 @@
|
|
1
|
-
import { ErrorCode, McpError } from
|
2
|
-
import { outlineClient } from
|
3
|
-
import { registerTool } from
|
1
|
+
import { ErrorCode, McpError } from '@modelcontextprotocol/sdk/types.js';
|
2
|
+
import { outlineClient } from '../client.js';
|
3
|
+
import { registerTool } from '../utils/listTools.js';
|
4
4
|
// Register this tool
|
5
5
|
registerTool({
|
6
|
-
name:
|
7
|
-
description:
|
6
|
+
name: 'list_collections',
|
7
|
+
description: 'List all collections in the Outline workspace',
|
8
8
|
inputSchema: {
|
9
9
|
properties: {
|
10
10
|
limit: {
|
11
|
-
type:
|
12
|
-
description:
|
11
|
+
type: 'number',
|
12
|
+
description: 'Maximum number of collections to return (optional)',
|
13
13
|
},
|
14
14
|
},
|
15
|
-
type:
|
15
|
+
type: 'object',
|
16
16
|
},
|
17
17
|
}, async function handleListCollections(args) {
|
18
18
|
try {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"listCollections.js","sourceRoot":"","sources":["../../src/tools/listCollections.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAErD,qBAAqB;AACrB,YAAY,
|
1
|
+
{"version":3,"file":"listCollections.js","sourceRoot":"","sources":["../../src/tools/listCollections.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAErD,qBAAqB;AACrB,YAAY,CACV;IACE,IAAI,EAAE,kBAAkB;IACxB,WAAW,EAAE,+CAA+C;IAC5D,WAAW,EAAE;QACX,UAAU,EAAE;YACV,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,oDAAoD;aAClE;SACF;QACD,IAAI,EAAE,QAAQ;KACf;CACF,EACD,KAAK,UAAU,qBAAqB,CAAC,IAAyB;IAC5D,IAAI,CAAC;QACH,MAAM,MAAM,GAAwB,EAAE,CAAC;QAEvC,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;YACf,MAAM,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QAC5B,CAAC;QAED,MAAM,QAAQ,GAAG,MAAM,aAAa,CAAC,IAAI,CAAC,mBAAmB,EAAE,MAAM,CAAC,CAAC;QACvE,OAAO,QAAQ,CAAC,IAAI,CAAC,IAAI,IAAI,EAAE,CAAC;IAClC,CAAC;IAAC,OAAO,KAAU,EAAE,CAAC;QACpB,OAAO,CAAC,KAAK,CAAC,4BAA4B,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;QAC3D,MAAM,IAAI,QAAQ,CAAC,SAAS,CAAC,cAAc,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;IAC9D,CAAC;AACH,CAAC,CACF,CAAC"}
|
@@ -1,26 +1,26 @@
|
|
1
|
-
import { ErrorCode, McpError } from
|
2
|
-
import { outlineClient } from
|
3
|
-
import { registerTool } from
|
1
|
+
import { ErrorCode, McpError } from '@modelcontextprotocol/sdk/types.js';
|
2
|
+
import { outlineClient } from '../client.js';
|
3
|
+
import { registerTool } from '../utils/listTools.js';
|
4
4
|
// Register this tool
|
5
5
|
registerTool({
|
6
|
-
name:
|
7
|
-
description:
|
6
|
+
name: 'list_documents',
|
7
|
+
description: 'List documents in the Outline workspace with optional filters',
|
8
8
|
inputSchema: {
|
9
9
|
properties: {
|
10
10
|
collectionId: {
|
11
|
-
type:
|
12
|
-
description:
|
11
|
+
type: 'string',
|
12
|
+
description: 'Filter by collection ID (optional)',
|
13
13
|
},
|
14
14
|
query: {
|
15
|
-
type:
|
16
|
-
description:
|
15
|
+
type: 'string',
|
16
|
+
description: 'Search query to filter documents (optional)',
|
17
17
|
},
|
18
18
|
limit: {
|
19
|
-
type:
|
20
|
-
description:
|
19
|
+
type: 'number',
|
20
|
+
description: 'Maximum number of documents to return (optional)',
|
21
21
|
},
|
22
22
|
},
|
23
|
-
type:
|
23
|
+
type: 'object',
|
24
24
|
},
|
25
25
|
}, async function handleListDocuments(args) {
|
26
26
|
try {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"listDocuments.js","sourceRoot":"","sources":["../../src/tools/listDocuments.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAErD,qBAAqB;AACrB,YAAY,
|
1
|
+
{"version":3,"file":"listDocuments.js","sourceRoot":"","sources":["../../src/tools/listDocuments.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAErD,qBAAqB;AACrB,YAAY,CACV;IACE,IAAI,EAAE,gBAAgB;IACtB,WAAW,EAAE,+DAA+D;IAC5E,WAAW,EAAE;QACX,UAAU,EAAE;YACV,YAAY,EAAE;gBACZ,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,oCAAoC;aAClD;YACD,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,6CAA6C;aAC3D;YACD,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,kDAAkD;aAChE;SACF;QACD,IAAI,EAAE,QAAQ;KACf;CACF,EACD,KAAK,UAAU,mBAAmB,CAAC,IAAuB;IACxD,IAAI,CAAC;QACH,MAAM,MAAM,GAAwB,EAAE,CAAC;QAEvC,IAAI,IAAI,CAAC,YAAY,EAAE,CAAC;YACtB,MAAM,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC;QAC1C,CAAC;QACD,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;YACf,MAAM,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QAC5B,CAAC;QACD,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;YACf,MAAM,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QAC5B,CAAC;QAED,MAAM,QAAQ,GAAG,MAAM,aAAa,CAAC,IAAI,CAAC,iBAAiB,EAAE,MAAM,CAAC,CAAC;QACrE,OAAO,QAAQ,CAAC,IAAI,CAAC,IAAI,IAAI,EAAE,CAAC;IAClC,CAAC;IAAC,OAAO,KAAU,EAAE,CAAC;QACpB,OAAO,CAAC,KAAK,CAAC,0BAA0B,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;QACzD,MAAM,IAAI,QAAQ,CAAC,SAAS,CAAC,cAAc,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;IAC9D,CAAC;AACH,CAAC,CACF,CAAC"}
|
@@ -1,28 +1,28 @@
|
|
1
|
-
import { ErrorCode, McpError } from
|
2
|
-
import { outlineClient } from
|
3
|
-
import { registerTool } from
|
1
|
+
import { ErrorCode, McpError } from '@modelcontextprotocol/sdk/types.js';
|
2
|
+
import { outlineClient } from '../client.js';
|
3
|
+
import { registerTool } from '../utils/listTools.js';
|
4
4
|
// Register this tool
|
5
5
|
registerTool({
|
6
|
-
name:
|
7
|
-
description:
|
6
|
+
name: 'search_documents',
|
7
|
+
description: 'Search for documents in the Outline workspace',
|
8
8
|
inputSchema: {
|
9
9
|
properties: {
|
10
10
|
query: {
|
11
|
-
type:
|
12
|
-
description:
|
11
|
+
type: 'string',
|
12
|
+
description: 'Search query to filter documents',
|
13
13
|
},
|
14
14
|
limit: {
|
15
|
-
type:
|
16
|
-
description:
|
15
|
+
type: 'number',
|
16
|
+
description: 'Maximum number of documents to return (optional)',
|
17
17
|
},
|
18
18
|
},
|
19
|
-
required: [
|
20
|
-
type:
|
19
|
+
required: ['query'],
|
20
|
+
type: 'object',
|
21
21
|
},
|
22
22
|
}, async function handleSearchDocuments(args) {
|
23
23
|
try {
|
24
24
|
const params = {
|
25
|
-
query: args.query
|
25
|
+
query: args.query,
|
26
26
|
};
|
27
27
|
if (args.limit) {
|
28
28
|
params.limit = args.limit;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"searchDocuments.js","sourceRoot":"","sources":["../../src/tools/searchDocuments.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAErD,qBAAqB;AACrB,YAAY,
|
1
|
+
{"version":3,"file":"searchDocuments.js","sourceRoot":"","sources":["../../src/tools/searchDocuments.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAErD,qBAAqB;AACrB,YAAY,CACV;IACE,IAAI,EAAE,kBAAkB;IACxB,WAAW,EAAE,+CAA+C;IAC5D,WAAW,EAAE;QACX,UAAU,EAAE;YACV,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,kCAAkC;aAChD;YACD,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,kDAAkD;aAChE;SACF;QACD,QAAQ,EAAE,CAAC,OAAO,CAAC;QACnB,IAAI,EAAE,QAAQ;KACf;CACF,EACD,KAAK,UAAU,qBAAqB,CAAC,IAAyB;IAC5D,IAAI,CAAC;QACH,MAAM,MAAM,GAAwB;YAClC,KAAK,EAAE,IAAI,CAAC,KAAK;SAClB,CAAC;QAEF,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;YACf,MAAM,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QAC5B,CAAC;QAED,MAAM,QAAQ,GAAG,MAAM,aAAa,CAAC,IAAI,CAAC,mBAAmB,EAAE,MAAM,CAAC,CAAC;QACvE,OAAO,QAAQ,CAAC,IAAI,CAAC,IAAI,IAAI,EAAE,CAAC;IAClC,CAAC;IAAC,OAAO,KAAU,EAAE,CAAC;QACpB,OAAO,CAAC,KAAK,CAAC,4BAA4B,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;QAC3D,MAAM,IAAI,QAAQ,CAAC,SAAS,CAAC,cAAc,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;IAC9D,CAAC;AACH,CAAC,CACF,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"updateCollection.d.ts","sourceRoot":"","sources":["../../src/tools/updateCollection.ts"],"names":[],"mappings":""}
|
@@ -0,0 +1,59 @@
|
|
1
|
+
import { ErrorCode, McpError } from '@modelcontextprotocol/sdk/types.js';
|
2
|
+
import { outlineClient } from '../client.js';
|
3
|
+
import { registerTool } from '../utils/listTools.js';
|
4
|
+
// Register this tool
|
5
|
+
registerTool({
|
6
|
+
name: 'update_collection',
|
7
|
+
description: 'Update an existing collection',
|
8
|
+
inputSchema: {
|
9
|
+
properties: {
|
10
|
+
id: {
|
11
|
+
type: 'string',
|
12
|
+
description: 'ID of the collection to update',
|
13
|
+
},
|
14
|
+
name: {
|
15
|
+
type: 'string',
|
16
|
+
description: 'New title for the collection',
|
17
|
+
},
|
18
|
+
description: {
|
19
|
+
type: 'string',
|
20
|
+
description: 'New description for the collection',
|
21
|
+
},
|
22
|
+
permission: {
|
23
|
+
type: 'string',
|
24
|
+
description: 'New permission level for the collection (read, read_write)',
|
25
|
+
},
|
26
|
+
color: {
|
27
|
+
type: 'string',
|
28
|
+
description: 'New hex color code for the collection',
|
29
|
+
},
|
30
|
+
},
|
31
|
+
required: ['id'],
|
32
|
+
type: 'object',
|
33
|
+
},
|
34
|
+
}, async function handleUpdateCollection(args) {
|
35
|
+
try {
|
36
|
+
const payload = {
|
37
|
+
id: args.id,
|
38
|
+
};
|
39
|
+
if (args.name !== undefined) {
|
40
|
+
payload.name = args.name;
|
41
|
+
}
|
42
|
+
if (args.description !== undefined) {
|
43
|
+
payload.description = args.description;
|
44
|
+
}
|
45
|
+
if (args.permission !== undefined) {
|
46
|
+
payload.permission = args.permission;
|
47
|
+
}
|
48
|
+
if (args.color !== undefined) {
|
49
|
+
payload.color = args.color;
|
50
|
+
}
|
51
|
+
const response = await outlineClient.post('/collections.update', payload);
|
52
|
+
return response.data.data;
|
53
|
+
}
|
54
|
+
catch (error) {
|
55
|
+
console.error('Error updating collection:', error.message);
|
56
|
+
throw new McpError(ErrorCode.InvalidRequest, error.message);
|
57
|
+
}
|
58
|
+
});
|
59
|
+
//# sourceMappingURL=updateCollection.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"updateCollection.js","sourceRoot":"","sources":["../../src/tools/updateCollection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAErD,qBAAqB;AACrB,YAAY,CACV;IACE,IAAI,EAAE,mBAAmB;IACzB,WAAW,EAAE,+BAA+B;IAC5C,WAAW,EAAE;QACX,UAAU,EAAE;YACV,EAAE,EAAE;gBACF,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,gCAAgC;aAC9C;YACD,IAAI,EAAE;gBACJ,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,8BAA8B;aAC5C;YACD,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,oCAAoC;aAClD;YACD,UAAU,EAAE;gBACV,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,4DAA4D;aAC1E;YACD,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,uCAAuC;aACrD;SACF;QACD,QAAQ,EAAE,CAAC,IAAI,CAAC;QAChB,IAAI,EAAE,QAAQ;KACf;CACF,EACD,KAAK,UAAU,sBAAsB,CAAC,IAA0B;IAC9D,IAAI,CAAC;QACH,MAAM,OAAO,GAAwB;YACnC,EAAE,EAAE,IAAI,CAAC,EAAE;SACZ,CAAC;QAEF,IAAI,IAAI,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;YAC5B,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;QAC3B,CAAC;QAED,IAAI,IAAI,CAAC,WAAW,KAAK,SAAS,EAAE,CAAC;YACnC,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC;QACzC,CAAC;QAED,IAAI,IAAI,CAAC,UAAU,KAAK,SAAS,EAAE,CAAC;YAClC,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC;QACvC,CAAC;QAED,IAAI,IAAI,CAAC,KAAK,KAAK,SAAS,EAAE,CAAC;YAC7B,OAAO,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QAC7B,CAAC;QAED,MAAM,QAAQ,GAAG,MAAM,aAAa,CAAC,IAAI,CAAC,qBAAqB,EAAE,OAAO,CAAC,CAAC;QAC1E,OAAO,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC;IAC5B,CAAC;IAAC,OAAO,KAAU,EAAE,CAAC;QACpB,OAAO,CAAC,KAAK,CAAC,4BAA4B,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;QAC3D,MAAM,IAAI,QAAQ,CAAC,SAAS,CAAC,cAAc,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;IAC9D,CAAC;AACH,CAAC,CACF,CAAC"}
|
@@ -1,40 +1,40 @@
|
|
1
|
-
import { ErrorCode, McpError } from
|
2
|
-
import { outlineClient } from
|
3
|
-
import { registerTool } from
|
1
|
+
import { ErrorCode, McpError } from '@modelcontextprotocol/sdk/types.js';
|
2
|
+
import { outlineClient } from '../client.js';
|
3
|
+
import { registerTool } from '../utils/listTools.js';
|
4
4
|
// Register this tool
|
5
5
|
registerTool({
|
6
|
-
name:
|
7
|
-
description:
|
6
|
+
name: 'update_document',
|
7
|
+
description: 'Update an existing document',
|
8
8
|
inputSchema: {
|
9
9
|
properties: {
|
10
10
|
documentId: {
|
11
|
-
type:
|
12
|
-
description:
|
11
|
+
type: 'string',
|
12
|
+
description: 'ID of the document to update',
|
13
13
|
},
|
14
14
|
title: {
|
15
|
-
type:
|
16
|
-
description:
|
15
|
+
type: 'string',
|
16
|
+
description: 'New title for the document',
|
17
17
|
},
|
18
18
|
text: {
|
19
|
-
type:
|
20
|
-
description:
|
19
|
+
type: 'string',
|
20
|
+
description: 'New content for the document in markdown format',
|
21
21
|
},
|
22
22
|
publish: {
|
23
|
-
type:
|
24
|
-
description:
|
23
|
+
type: 'boolean',
|
24
|
+
description: 'Whether to publish the document',
|
25
25
|
},
|
26
26
|
done: {
|
27
|
-
type:
|
28
|
-
description:
|
27
|
+
type: 'boolean',
|
28
|
+
description: 'Whether the document is marked as done',
|
29
29
|
},
|
30
30
|
},
|
31
|
-
required: [
|
32
|
-
type:
|
31
|
+
required: ['documentId'],
|
32
|
+
type: 'object',
|
33
33
|
},
|
34
34
|
}, async function handleUpdateDocument(args) {
|
35
35
|
try {
|
36
36
|
const payload = {
|
37
|
-
id: args.documentId
|
37
|
+
id: args.documentId,
|
38
38
|
};
|
39
39
|
if (args.title !== undefined) {
|
40
40
|
payload.title = args.title;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"updateDocument.js","sourceRoot":"","sources":["../../src/tools/updateDocument.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAErD,qBAAqB;AACrB,YAAY,
|
1
|
+
{"version":3,"file":"updateDocument.js","sourceRoot":"","sources":["../../src/tools/updateDocument.ts"],"names":[],"mappings":"AAAA,OAA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IAAI,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;YAC5B,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;QAC3B,CAAC;QAED,MAAM,QAAQ,GAAG,MAAM,aAAa,CAAC,IAAI,CAAC,mBAAmB,EAAE,OAAO,CAAC,CAAC;QACxE,OAAO,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC;IAC5B,CAAC;IAAC,OAAO,KAAU,EAAE,CAAC;QACpB,OAAO,CAAC,KAAK,CAAC,0BAA0B,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;QACzD,MAAM,IAAI,QAAQ,CAAC,SAAS,CAAC,cAAc,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;IAC9D,CAAC;AACH,CAAC,CACF,CAAC"}
|
package/build/types.d.ts
CHANGED
@@ -3,6 +3,9 @@ export type Collection = {
|
|
3
3
|
name: string;
|
4
4
|
description?: string;
|
5
5
|
icon?: string;
|
6
|
+
color?: string;
|
7
|
+
permission?: string;
|
8
|
+
private?: boolean;
|
6
9
|
};
|
7
10
|
export type Document = {
|
8
11
|
id: string;
|
@@ -61,4 +64,18 @@ export type SearchDocumentsArgs = {
|
|
61
64
|
collectionId?: string;
|
62
65
|
limit?: number;
|
63
66
|
};
|
67
|
+
export type CreateCollectionArgs = {
|
68
|
+
name: string;
|
69
|
+
description?: string;
|
70
|
+
permission?: string;
|
71
|
+
color?: string;
|
72
|
+
private?: boolean;
|
73
|
+
};
|
74
|
+
export type UpdateCollectionArgs = {
|
75
|
+
id: string;
|
76
|
+
name?: string;
|
77
|
+
description?: string;
|
78
|
+
permission?: string;
|
79
|
+
color?: string;
|
80
|
+
};
|
64
81
|
//# sourceMappingURL=types.d.ts.map
|
package/build/types.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AACA,MAAM,MAAM,UAAU,GAAG;IACvB,EAAE,EAAE,MA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AC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"importTools.d.ts","sourceRoot":"","sources":["../../src/utils/importTools.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,wBAAgB,aAAa,IAAI,IAAI,CAWpC"}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import fs from 'fs';
|
2
|
+
import path from 'path';
|
3
|
+
import { fileURLToPath } from 'url';
|
4
|
+
/**
|
5
|
+
* Dynamically imports all tool files from the tools directory
|
6
|
+
*/
|
7
|
+
export function registerTools() {
|
8
|
+
// Get the directory path
|
9
|
+
const __filename = fileURLToPath(import.meta.url);
|
10
|
+
const __dirname = path.dirname(__filename);
|
11
|
+
const toolsDir = path.join(__dirname, '..', 'tools');
|
12
|
+
// Import all tool files
|
13
|
+
const toolFiles = fs.readdirSync(toolsDir).filter(file => file.endsWith('.js'));
|
14
|
+
for (const file of toolFiles) {
|
15
|
+
import(`../tools/${file}`);
|
16
|
+
}
|
17
|
+
}
|
18
|
+
//# sourceMappingURL=importTools.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"importTools.js","sourceRoot":"","sources":["../../src/utils/importTools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AAEpC;;GAEG;AACH,MAAM,UAAU,aAAa;IAC3B,yBAAyB;IACzB,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAClD,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;IAC3C,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;IAErD,wBAAwB;IACxB,MAAM,SAAS,GAAG,EAAE,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;IAChF,KAAK,MAAM,IAAI,IAAI,SAAS,EAAE,CAAC;QAC7B,MAAM,CAAC,YAAY,IAAI,EAAE,CAAC,CAAC;IAC7B,CAAC;AACH,CAAC"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "outline-mcp-server",
|
3
|
-
"version": "4.
|
3
|
+
"version": "4.6.0",
|
4
4
|
"description": "An MCP server for interacting with Outline's API",
|
5
5
|
"type": "module",
|
6
6
|
"bin": {
|
@@ -25,8 +25,9 @@
|
|
25
25
|
"watch": "tsc --watch",
|
26
26
|
"inspector": "npx @modelcontextprotocol/inspector build/index.js",
|
27
27
|
"dev": "npm run build && npm run start",
|
28
|
-
"start:stdio": "npm run build && echo 'build done. running...\n' &&node build/index.js",
|
29
|
-
"start": "npx -y supergateway --port 6060 --stdio \"npm run start:stdio\""
|
28
|
+
"start:stdio": "npm run build && echo 'build done. running...\n' && node build/index.js",
|
29
|
+
"start": "npx -y supergateway --port 6060 --stdio \"npm run start:stdio\"",
|
30
|
+
"format": "prettier --write \"src/**/*.{ts,tsx,js,jsx,json}\""
|
30
31
|
},
|
31
32
|
"dependencies": {
|
32
33
|
"@modelcontextprotocol/sdk": "0.6.0",
|
@@ -35,6 +36,7 @@
|
|
35
36
|
},
|
36
37
|
"devDependencies": {
|
37
38
|
"@types/node": "^20.11.24",
|
39
|
+
"prettier": "^3.2.5",
|
38
40
|
"typescript": "^5.3.3"
|
39
41
|
},
|
40
42
|
"keywords": [
|