@attrove/mcp 0.1.4 → 0.1.6

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.
Files changed (70) hide show
  1. package/cjs/{src/__mocks__ → __mocks__}/version.js +1 -2
  2. package/cjs/{src/constants.js → constants.js} +0 -1
  3. package/cjs/{src/index.js → index.js} +11 -12
  4. package/cjs/package.json +1 -69
  5. package/cjs/{src/server.js → server.js} +45 -40
  6. package/cjs/{src/tools → tools}/index.js +12 -13
  7. package/cjs/{src/tools → tools}/integrations.js +7 -6
  8. package/cjs/{src/tools → tools}/query.js +11 -12
  9. package/cjs/{src/tools → tools}/search.js +26 -25
  10. package/cjs/{src/version.js → version.js} +13 -12
  11. package/{types/src → esm}/__mocks__/version.d.ts +1 -0
  12. package/esm/__mocks__/version.d.ts.map +1 -0
  13. package/esm/{src/__mocks__ → __mocks__}/version.js +1 -1
  14. package/esm/__mocks__/version.js.map +1 -0
  15. package/{types/src → esm}/constants.d.ts +1 -0
  16. package/esm/constants.d.ts.map +1 -0
  17. package/esm/constants.js.map +1 -0
  18. package/{types/src → esm}/index.d.ts +5 -4
  19. package/esm/index.d.ts.map +1 -0
  20. package/esm/{src/index.js → index.js} +3 -3
  21. package/esm/index.js.map +1 -0
  22. package/esm/package.json +1 -69
  23. package/{types/src → esm}/server.d.ts +2 -1
  24. package/esm/server.d.ts.map +1 -0
  25. package/esm/{src/server.js → server.js} +44 -38
  26. package/esm/server.js.map +1 -0
  27. package/{types/src → esm}/tools/index.d.ts +4 -3
  28. package/esm/tools/index.d.ts.map +1 -0
  29. package/esm/{src/tools → tools}/index.js +3 -3
  30. package/esm/tools/index.js.map +1 -0
  31. package/{types/src → esm}/tools/integrations.d.ts +2 -1
  32. package/esm/tools/integrations.d.ts.map +1 -0
  33. package/esm/{src/tools → tools}/integrations.js +7 -5
  34. package/esm/tools/integrations.js.map +1 -0
  35. package/{types/src → esm}/tools/query.d.ts +2 -1
  36. package/esm/tools/query.d.ts.map +1 -0
  37. package/esm/{src/tools → tools}/query.js +11 -11
  38. package/esm/tools/query.js.map +1 -0
  39. package/{types/src → esm}/tools/search.d.ts +2 -1
  40. package/esm/tools/search.d.ts.map +1 -0
  41. package/esm/{src/tools → tools}/search.js +25 -23
  42. package/esm/tools/search.js.map +1 -0
  43. package/{types/src → esm}/version.d.ts +1 -0
  44. package/esm/version.d.ts.map +1 -0
  45. package/esm/{src/version.js → version.js} +16 -14
  46. package/esm/version.js.map +1 -0
  47. package/package.json +7 -6
  48. package/cjs/README.md +0 -247
  49. package/cjs/bin/attrove-mcp.js +0 -69
  50. package/cjs/src/__mocks__/version.js.map +0 -1
  51. package/cjs/src/constants.js.map +0 -1
  52. package/cjs/src/index.js.map +0 -1
  53. package/cjs/src/server.js.map +0 -1
  54. package/cjs/src/tools/index.js.map +0 -1
  55. package/cjs/src/tools/integrations.js.map +0 -1
  56. package/cjs/src/tools/query.js.map +0 -1
  57. package/cjs/src/tools/search.js.map +0 -1
  58. package/cjs/src/version.js.map +0 -1
  59. package/esm/README.md +0 -247
  60. package/esm/bin/attrove-mcp.js +0 -69
  61. package/esm/src/__mocks__/version.js.map +0 -1
  62. package/esm/src/constants.js.map +0 -1
  63. package/esm/src/index.js.map +0 -1
  64. package/esm/src/server.js.map +0 -1
  65. package/esm/src/tools/index.js.map +0 -1
  66. package/esm/src/tools/integrations.js.map +0 -1
  67. package/esm/src/tools/query.js.map +0 -1
  68. package/esm/src/tools/search.js.map +0 -1
  69. package/esm/src/version.js.map +0 -1
  70. /package/esm/{src/constants.js → constants.js} +0 -0
@@ -5,3 +5,4 @@
5
5
  */
6
6
  export declare function getVersion(): string;
7
7
  export declare function resetVersionCache(): void;
8
+ //# sourceMappingURL=version.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../../../../packages/mcp/src/__mocks__/version.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,wBAAgB,UAAU,IAAI,MAAM,CAEnC;AAED,wBAAgB,iBAAiB,IAAI,IAAI,CAExC"}
@@ -4,7 +4,7 @@
4
4
  * This avoids the import.meta.url ESM issue when running tests with ts-jest.
5
5
  */
6
6
  export function getVersion() {
7
- return '1.0.0-test';
7
+ return "1.0.0-test";
8
8
  }
9
9
  export function resetVersionCache() {
10
10
  // No-op in mock
@@ -0,0 +1 @@
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["../../../../../packages/mcp/src/__mocks__/version.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,UAAU,UAAU;IACxB,OAAO,YAAY,CAAC;AACtB,CAAC;AAED,MAAM,UAAU,iBAAiB;IAC/B,gBAAgB;AAClB,CAAC"}
@@ -11,3 +11,4 @@
11
11
  * will be truncated with an ellipsis to keep output manageable.
12
12
  */
13
13
  export declare const MAX_BODY_PREVIEW_LENGTH = 200;
14
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../packages/mcp/src/constants.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB,MAAM,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../packages/mcp/src/constants.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;;;GAKG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,GAAG,CAAC"}
@@ -26,7 +26,8 @@
26
26
  *
27
27
  * @packageDocumentation
28
28
  */
29
- export { createServer, startServer, getConfigFromEnv } from './server';
30
- export type { McpServerConfig } from './server';
31
- export { allToolDefinitions, queryToolDefinition, searchToolDefinition, integrationsToolDefinition, } from './tools';
32
- export { getVersion } from './version';
29
+ export { createServer, startServer, getConfigFromEnv } from "./server.js";
30
+ export type { McpServerConfig } from "./server.js";
31
+ export { allToolDefinitions, queryToolDefinition, searchToolDefinition, integrationsToolDefinition, } from "./tools/index.js";
32
+ export { getVersion } from "./version.js";
33
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../packages/mcp/src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC1E,YAAY,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD,OAAO,EACL,kBAAkB,EAClB,mBAAmB,EACnB,oBAAoB,EACpB,0BAA0B,GAC3B,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC"}
@@ -26,7 +26,7 @@
26
26
  *
27
27
  * @packageDocumentation
28
28
  */
29
- export { createServer, startServer, getConfigFromEnv } from './server';
30
- export { allToolDefinitions, queryToolDefinition, searchToolDefinition, integrationsToolDefinition, } from './tools';
31
- export { getVersion } from './version';
29
+ export { createServer, startServer, getConfigFromEnv } from "./server.js";
30
+ export { allToolDefinitions, queryToolDefinition, searchToolDefinition, integrationsToolDefinition, } from "./tools/index.js";
31
+ export { getVersion } from "./version.js";
32
32
  //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/mcp/src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAG1E,OAAO,EACL,kBAAkB,EAClB,mBAAmB,EACnB,oBAAoB,EACpB,0BAA0B,GAC3B,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC"}
package/esm/package.json CHANGED
@@ -1,69 +1 @@
1
- {
2
- "name": "@attrove/mcp",
3
- "version": "0.1.4",
4
- "description": "MCP server for Attrove - AI-powered context retrieval for Claude and Cursor",
5
- "main": "./dist/cjs/index.js",
6
- "module": "./dist/esm/index.js",
7
- "types": "./dist/types/index.d.ts",
8
- "bin": {
9
- "attrove-mcp": "./bin/attrove-mcp.js"
10
- },
11
- "exports": {
12
- ".": {
13
- "import": {
14
- "types": "./dist/types/index.d.ts",
15
- "default": "./dist/esm/index.js"
16
- },
17
- "require": {
18
- "types": "./dist/types/index.d.ts",
19
- "default": "./dist/cjs/index.js"
20
- }
21
- }
22
- },
23
- "files": [
24
- "dist",
25
- "bin",
26
- "README.md"
27
- ],
28
- "sideEffects": false,
29
- "keywords": [
30
- "attrove",
31
- "mcp",
32
- "model-context-protocol",
33
- "claude",
34
- "cursor",
35
- "ai",
36
- "rag",
37
- "llm"
38
- ],
39
- "author": "Attrove <support@attrove.com>",
40
- "license": "MIT",
41
- "repository": {
42
- "type": "git",
43
- "url": "https://github.com/attrove/attrove-js.git",
44
- "directory": "packages/mcp"
45
- },
46
- "homepage": "https://attrove.com/docs/mcp",
47
- "bugs": {
48
- "url": "https://github.com/attrove/attrove-js/issues"
49
- },
50
- "engines": {
51
- "node": ">=18.0.0"
52
- },
53
- "scripts": {
54
- "build": "nx build mcp",
55
- "test": "nx test mcp"
56
- },
57
- "dependencies": {
58
- "@modelcontextprotocol/sdk": "^1.0.0",
59
- "@attrove/sdk": "*"
60
- },
61
- "devDependencies": {
62
- "@types/node": "^20.0.0",
63
- "typescript": "~5.7.0"
64
- },
65
- "publishConfig": {
66
- "access": "public"
67
- },
68
- "type": "module"
69
- }
1
+ {"type": "module"}
@@ -4,7 +4,7 @@
4
4
  * Model Context Protocol server that enables AI assistants like Claude
5
5
  * to access user context through the Attrove API.
6
6
  */
7
- import { Server } from '@modelcontextprotocol/sdk/server/index.js';
7
+ import { Server } from "@modelcontextprotocol/sdk/server/index.js";
8
8
  /**
9
9
  * Configuration for the MCP server.
10
10
  */
@@ -36,3 +36,4 @@ export declare function startServer(config: McpServerConfig): Promise<void>;
36
36
  * @throws {Error} If required environment variables are missing
37
37
  */
38
38
  export declare function getConfigFromEnv(): McpServerConfig;
39
+ //# sourceMappingURL=server.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../../../packages/mcp/src/server.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AAgEnE;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAiID;;GAEG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,eAAe,GAAG,MAAM,CAgH5D;AAED;;GAEG;AACH,wBAAsB,WAAW,CAAC,MAAM,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CAIxE;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,IAAI,eAAe,CAwBlD"}
@@ -4,12 +4,12 @@
4
4
  * Model Context Protocol server that enables AI assistants like Claude
5
5
  * to access user context through the Attrove API.
6
6
  */
7
- import { Server } from '@modelcontextprotocol/sdk/server/index.js';
8
- import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
9
- import { CallToolRequestSchema, ListToolsRequestSchema } from '@modelcontextprotocol/sdk/types.js';
10
- import { Attrove, isAttroveError, ValidationError, ErrorCodes } from '@attrove/sdk';
11
- import { allToolDefinitions, executeQueryTool, executeSearchTool, executeIntegrationsTool, } from './tools';
12
- import { getVersion } from './version';
7
+ import { Server } from "@modelcontextprotocol/sdk/server/index.js";
8
+ import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
9
+ import { CallToolRequestSchema, ListToolsRequestSchema, } from "@modelcontextprotocol/sdk/types.js";
10
+ import { Attrove, isAttroveError, ValidationError, ErrorCodes, } from "@attrove/sdk";
11
+ import { allToolDefinitions, executeQueryTool, executeSearchTool, executeIntegrationsTool, } from "./tools/index.js";
12
+ import { getVersion } from "./version.js";
13
13
  /**
14
14
  * Validate that a value is an array of strings.
15
15
  * Returns undefined if value is null/undefined.
@@ -22,8 +22,8 @@ function validateStringArray(value, fieldName) {
22
22
  if (!Array.isArray(value)) {
23
23
  throw new ValidationError(`${fieldName} must be an array of strings, received ${typeof value}`, ErrorCodes.VALIDATION_INVALID_FORMAT, { field: fieldName, received: typeof value });
24
24
  }
25
- if (!value.every((item) => typeof item === 'string')) {
26
- const types = value.map(item => typeof item).join(', ');
25
+ if (!value.every((item) => typeof item === "string")) {
26
+ const types = value.map((item) => typeof item).join(", ");
27
27
  throw new ValidationError(`${fieldName} must contain only strings, received types: [${types}]`, ErrorCodes.VALIDATION_INVALID_FORMAT, { field: fieldName, receivedTypes: types });
28
28
  }
29
29
  return value;
@@ -34,17 +34,19 @@ function validateStringArray(value, fieldName) {
34
34
  * @throws {ValidationError} If arguments are missing or invalid
35
35
  */
36
36
  function validateQueryInput(args) {
37
- if (!args || typeof args !== 'object') {
38
- throw new ValidationError('Missing or invalid arguments. Expected an object with a "query" field.', ErrorCodes.VALIDATION_REQUIRED_FIELD, { expected: 'object with query field', received: typeof args });
37
+ if (!args || typeof args !== "object") {
38
+ throw new ValidationError('Missing or invalid arguments. Expected an object with a "query" field.', ErrorCodes.VALIDATION_REQUIRED_FIELD, { expected: "object with query field", received: typeof args });
39
39
  }
40
40
  const input = args;
41
- if (typeof input.query !== 'string' || input.query.trim() === '') {
42
- throw new ValidationError('Missing required parameter "query". Please provide a question to ask.', ErrorCodes.VALIDATION_REQUIRED_FIELD, { field: 'query' });
41
+ if (typeof input.query !== "string" || input.query.trim() === "") {
42
+ throw new ValidationError('Missing required parameter "query". Please provide a question to ask.', ErrorCodes.VALIDATION_REQUIRED_FIELD, { field: "query" });
43
43
  }
44
44
  return {
45
45
  query: input.query,
46
- integration_ids: validateStringArray(input.integration_ids, 'integration_ids'),
47
- include_sources: typeof input.include_sources === 'boolean' ? input.include_sources : undefined,
46
+ integration_ids: validateStringArray(input.integration_ids, "integration_ids"),
47
+ include_sources: typeof input.include_sources === "boolean"
48
+ ? input.include_sources
49
+ : undefined,
48
50
  };
49
51
  }
50
52
  /**
@@ -53,19 +55,21 @@ function validateQueryInput(args) {
53
55
  * @throws {ValidationError} If arguments are missing or invalid
54
56
  */
55
57
  function validateSearchInput(args) {
56
- if (!args || typeof args !== 'object') {
57
- throw new ValidationError('Missing or invalid arguments. Expected an object with a "query" field.', ErrorCodes.VALIDATION_REQUIRED_FIELD, { expected: 'object with query field', received: typeof args });
58
+ if (!args || typeof args !== "object") {
59
+ throw new ValidationError('Missing or invalid arguments. Expected an object with a "query" field.', ErrorCodes.VALIDATION_REQUIRED_FIELD, { expected: "object with query field", received: typeof args });
58
60
  }
59
61
  const input = args;
60
- if (typeof input.query !== 'string' || input.query.trim() === '') {
61
- throw new ValidationError('Missing required parameter "query". Please provide a search query.', ErrorCodes.VALIDATION_REQUIRED_FIELD, { field: 'query' });
62
+ if (typeof input.query !== "string" || input.query.trim() === "") {
63
+ throw new ValidationError('Missing required parameter "query". Please provide a search query.', ErrorCodes.VALIDATION_REQUIRED_FIELD, { field: "query" });
62
64
  }
63
65
  return {
64
66
  query: input.query,
65
- after_date: typeof input.after_date === 'string' ? input.after_date : undefined,
66
- before_date: typeof input.before_date === 'string' ? input.before_date : undefined,
67
- sender_domains: validateStringArray(input.sender_domains, 'sender_domains'),
68
- include_body_text: typeof input.include_body_text === 'boolean' ? input.include_body_text : undefined,
67
+ after_date: typeof input.after_date === "string" ? input.after_date : undefined,
68
+ before_date: typeof input.before_date === "string" ? input.before_date : undefined,
69
+ sender_domains: validateStringArray(input.sender_domains, "sender_domains"),
70
+ include_body_text: typeof input.include_body_text === "boolean"
71
+ ? input.include_body_text
72
+ : undefined,
69
73
  };
70
74
  }
71
75
  /**
@@ -89,12 +93,14 @@ function formatErrorResponse(error) {
89
93
  detailParts.push(`Details: ${JSON.stringify(error.details)}`);
90
94
  }
91
95
  catch (serializeError) {
92
- const reason = serializeError instanceof Error ? serializeError.message : 'Unknown reason';
96
+ const reason = serializeError instanceof Error
97
+ ? serializeError.message
98
+ : "Unknown reason";
93
99
  detailParts.push(`Details: [Not serializable: ${reason}]`);
94
100
  }
95
101
  }
96
102
  if (detailParts.length > 0) {
97
- errorDetails = detailParts.join('\n');
103
+ errorDetails = detailParts.join("\n");
98
104
  }
99
105
  }
100
106
  else if (error instanceof Error) {
@@ -107,7 +113,7 @@ function formatErrorResponse(error) {
107
113
  ? `Error: ${errorMessage}\n\n${errorDetails}`
108
114
  : `Error: ${errorMessage}`;
109
115
  return {
110
- content: [{ type: 'text', text }],
116
+ content: [{ type: "text", text }],
111
117
  isError: true,
112
118
  };
113
119
  }
@@ -116,7 +122,7 @@ function formatErrorResponse(error) {
116
122
  */
117
123
  export function createServer(config) {
118
124
  const server = new Server({
119
- name: 'attrove',
125
+ name: "attrove",
120
126
  version: getVersion(),
121
127
  }, {
122
128
  capabilities: {
@@ -147,20 +153,20 @@ export function createServer(config) {
147
153
  // and programming bugs in validation don't get caught as API errors
148
154
  let validatedInput;
149
155
  switch (name) {
150
- case 'attrove_query':
156
+ case "attrove_query":
151
157
  validatedInput = validateQueryInput(args);
152
158
  break;
153
- case 'attrove_search':
159
+ case "attrove_search":
154
160
  validatedInput = validateSearchInput(args);
155
161
  break;
156
- case 'attrove_integrations':
162
+ case "attrove_integrations":
157
163
  // No input validation needed
158
164
  break;
159
165
  default:
160
166
  return {
161
167
  content: [
162
168
  {
163
- type: 'text',
169
+ type: "text",
164
170
  text: `Unknown tool: ${name}. Available tools: attrove_query, attrove_search, attrove_integrations`,
165
171
  },
166
172
  ],
@@ -171,13 +177,13 @@ export function createServer(config) {
171
177
  try {
172
178
  let result;
173
179
  switch (name) {
174
- case 'attrove_query':
180
+ case "attrove_query":
175
181
  result = await executeQueryTool(client, validatedInput);
176
182
  break;
177
- case 'attrove_search':
183
+ case "attrove_search":
178
184
  result = await executeSearchTool(client, validatedInput);
179
185
  break;
180
- case 'attrove_integrations':
186
+ case "attrove_integrations":
181
187
  result = await executeIntegrationsTool(client);
182
188
  break;
183
189
  default:
@@ -187,7 +193,7 @@ export function createServer(config) {
187
193
  return {
188
194
  content: [
189
195
  {
190
- type: 'text',
196
+ type: "text",
191
197
  text: result,
192
198
  },
193
199
  ],
@@ -225,12 +231,12 @@ export function getConfigFromEnv() {
225
231
  const userId = process.env.ATTROVE_USER_ID;
226
232
  const baseUrl = process.env.ATTROVE_BASE_URL;
227
233
  if (!apiKey) {
228
- throw new Error('ATTROVE_API_KEY environment variable is required. ' +
229
- 'Set it to your Attrove API key (sk_...).');
234
+ throw new Error("ATTROVE_API_KEY environment variable is required. " +
235
+ "Set it to your Attrove API key (sk_...).");
230
236
  }
231
237
  if (!userId) {
232
- throw new Error('ATTROVE_USER_ID environment variable is required. ' +
233
- 'Set it to the user ID (UUID) for the user whose context you want to access.');
238
+ throw new Error("ATTROVE_USER_ID environment variable is required. " +
239
+ "Set it to the user ID (UUID) for the user whose context you want to access.");
234
240
  }
235
241
  return {
236
242
  apiKey,
@@ -0,0 +1 @@
1
+ {"version":3,"file":"server.js","sourceRoot":"","sources":["../../../../packages/mcp/src/server.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EACL,qBAAqB,EACrB,sBAAsB,GACvB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EACL,OAAO,EAEP,cAAc,EACd,eAAe,EACf,UAAU,GAEX,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,kBAAkB,EAClB,gBAAgB,EAChB,iBAAiB,EACjB,uBAAuB,GAGxB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;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Tool definitions and executors for the Attrove MCP server.
5
5
  */
6
- import { queryToolDefinition, executeQueryTool, QueryToolInput } from './query';
7
- import { searchToolDefinition, executeSearchTool, SearchToolInput } from './search';
8
- import { integrationsToolDefinition, executeIntegrationsTool } from './integrations';
6
+ import { queryToolDefinition, executeQueryTool, QueryToolInput } from "./query.js";
7
+ import { searchToolDefinition, executeSearchTool, SearchToolInput } from "./search.js";
8
+ import { integrationsToolDefinition, executeIntegrationsTool } from "./integrations.js";
9
9
  export { queryToolDefinition, executeQueryTool, searchToolDefinition, executeSearchTool, integrationsToolDefinition, executeIntegrationsTool, };
10
10
  export type { QueryToolInput, SearchToolInput };
11
11
  /**
@@ -78,3 +78,4 @@ export declare const allToolDefinitions: readonly [{
78
78
  required: never[];
79
79
  };
80
80
  }];
81
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../packages/mcp/src/tools/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,mBAAmB,EACnB,gBAAgB,EAChB,cAAc,EACf,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,oBAAoB,EACpB,iBAAiB,EACjB,eAAe,EAChB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,0BAA0B,EAC1B,uBAAuB,EACxB,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EACL,mBAAmB,EACnB,gBAAgB,EAChB,oBAAoB,EACpB,iBAAiB,EACjB,0BAA0B,EAC1B,uBAAuB,GACxB,CAAC;AAGF,YAAY,EAAE,cAAc,EAAE,eAAe,EAAE,CAAC;AAEhD;;GAEG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAIrB,CAAC"}
@@ -3,9 +3,9 @@
3
3
  *
4
4
  * Tool definitions and executors for the Attrove MCP server.
5
5
  */
6
- import { queryToolDefinition, executeQueryTool } from './query';
7
- import { searchToolDefinition, executeSearchTool } from './search';
8
- import { integrationsToolDefinition, executeIntegrationsTool } from './integrations';
6
+ import { queryToolDefinition, executeQueryTool, } from "./query.js";
7
+ import { searchToolDefinition, executeSearchTool, } from "./search.js";
8
+ import { integrationsToolDefinition, executeIntegrationsTool, } from "./integrations.js";
9
9
  // Re-export tool definitions
10
10
  export { queryToolDefinition, executeQueryTool, searchToolDefinition, executeSearchTool, integrationsToolDefinition, executeIntegrationsTool, };
11
11
  /**
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../packages/mcp/src/tools/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,mBAAmB,EACnB,gBAAgB,GAEjB,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,oBAAoB,EACpB,iBAAiB,GAElB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,0BAA0B,EAC1B,uBAAuB,GACxB,MAAM,mBAAmB,CAAC;AAE3B,6BAA6B;AAC7B,OAAO,EACL,mBAAmB,EACnB,gBAAgB,EAChB,oBAAoB,EACpB,iBAAiB,EACjB,0BAA0B,EAC1B,uBAAuB,GACxB,CAAC;AAKF;;GAEG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,mBAAmB;IACnB,oBAAoB;IACpB,0BAA0B;CAClB,CAAC"}
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * MCP tool for listing and managing connected integrations.
5
5
  */
6
- import { Attrove } from '@attrove/sdk';
6
+ import { Attrove } from "@attrove/sdk";
7
7
  /**
8
8
  * Tool definition for attrove_integrations.
9
9
  */
@@ -20,3 +20,4 @@ export declare const integrationsToolDefinition: {
20
20
  * Execute the integrations tool.
21
21
  */
22
22
  export declare function executeIntegrationsTool(client: Attrove): Promise<string>;
23
+ //# sourceMappingURL=integrations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"integrations.d.ts","sourceRoot":"","sources":["../../../../../packages/mcp/src/tools/integrations.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,OAAO,EAAe,MAAM,cAAc,CAAC;AAEpD;;GAEG;AACH,eAAO,MAAM,0BAA0B;;;;;;;;CAkBtC,CAAC;AAEF;;GAEG;AACH,wBAAsB,uBAAuB,CAC3C,MAAM,EAAE,OAAO,GACd,OAAO,CAAC,MAAM,CAAC,CAsBjB"}
@@ -7,7 +7,7 @@
7
7
  * Tool definition for attrove_integrations.
8
8
  */
9
9
  export const integrationsToolDefinition = {
10
- name: 'attrove_integrations',
10
+ name: "attrove_integrations",
11
11
  description: `List the user's connected integrations (Gmail, Slack, etc.).
12
12
 
13
13
  This tool shows which services the user has connected and their current status. Use this to:
@@ -20,7 +20,7 @@ The response includes:
20
20
  - Provider name (gmail, slack, google_calendar, etc.)
21
21
  - Connection status (connected, disconnected, expired, error, pending)`,
22
22
  inputSchema: {
23
- type: 'object',
23
+ type: "object",
24
24
  properties: {},
25
25
  required: [],
26
26
  },
@@ -31,12 +31,14 @@ The response includes:
31
31
  export async function executeIntegrationsTool(client) {
32
32
  const integrations = await client.integrations.list();
33
33
  if (integrations.length === 0) {
34
- return 'No integrations connected. The user needs to connect their Gmail, Slack, or other services first.';
34
+ return "No integrations connected. The user needs to connect their Gmail, Slack, or other services first.";
35
35
  }
36
36
  let result = `Connected integrations (${integrations.length}):\n`;
37
37
  for (const integration of integrations) {
38
- const status = integration.is_active ? '[Active]' : '[Inactive]';
39
- const authStatus = integration.auth_status === 'connected' ? '' : ` (${integration.auth_status})`;
38
+ const status = integration.is_active ? "[Active]" : "[Inactive]";
39
+ const authStatus = integration.auth_status === "connected"
40
+ ? ""
41
+ : ` (${integration.auth_status})`;
40
42
  result += `\n- **${integration.name}** (${integration.provider})\n`;
41
43
  result += ` - ID: ${integration.id}\n`;
42
44
  result += ` - Status: ${status}${authStatus}\n`;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"integrations.js","sourceRoot":"","sources":["../../../../../packages/mcp/src/tools/integrations.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH;;GAEG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACxC,IAAI,EAAE,sBAAsB;IAC5B,WAAW,EAAE;;;;;;;;;;uEAUwD;IACrE,WAAW,EAAE;QACX,IAAI,EAAE,QAAiB;QACvB,UAAU,EAAE,EAAE;QACd,QAAQ,EAAE,EAAE;KACb;CACF,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAC3C,MAAe;IAEf,MAAM,YAAY,GAAG,MAAM,MAAM,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC;IAEtD,IAAI,YAAY,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC9B,OAAO,mGAAmG,CAAC;IAC7G,CAAC;IAED,IAAI,MAAM,GAAG,2BAA2B,YAAY,CAAC,MAAM,MAAM,CAAC;IAElE,KAAK,MAAM,WAAW,IAAI,YAAY,EAAE,CAAC;QACvC,MAAM,MAAM,GAAG,WAAW,CAAC,SAAS,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,YAAY,CAAC;QACjE,MAAM,UAAU,GACd,WAAW,CAAC,WAAW,KAAK,WAAW;YACrC,CAAC,CAAC,EAAE;YACJ,CAAC,CAAC,KAAK,WAAW,CAAC,WAAW,GAAG,CAAC;QAEtC,MAAM,IAAI,SAAS,WAAW,CAAC,IAAI,OAAO,WAAW,CAAC,QAAQ,KAAK,CAAC;QACpE,MAAM,IAAI,WAAW,WAAW,CAAC,EAAE,IAAI,CAAC;QACxC,MAAM,IAAI,eAAe,MAAM,GAAG,UAAU,IAAI,CAAC;IACnD,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * MCP tool for RAG queries against user context.
5
5
  */
6
- import { Attrove } from '@attrove/sdk';
6
+ import { Attrove } from "@attrove/sdk";
7
7
  /**
8
8
  * Tool definition for attrove_query.
9
9
  */
@@ -45,3 +45,4 @@ export interface QueryToolInput {
45
45
  * Execute the query tool.
46
46
  */
47
47
  export declare function executeQueryTool(client: Attrove, input: QueryToolInput): Promise<string>;
48
+ //# sourceMappingURL=query.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../../../../../packages/mcp/src/tools/query.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,OAAO,EAA+B,MAAM,cAAc,CAAC;AAEpE;;GAEG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;CA+B/B,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAC3B,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED;;GAEG;AACH,wBAAsB,gBAAgB,CACpC,MAAM,EAAE,OAAO,EACf,KAAK,EAAE,cAAc,GACpB,OAAO,CAAC,MAAM,CAAC,CA2BjB"}
@@ -7,7 +7,7 @@
7
7
  * Tool definition for attrove_query.
8
8
  */
9
9
  export const queryToolDefinition = {
10
- name: 'attrove_query',
10
+ name: "attrove_query",
11
11
  description: `Ask a question about the user's communications and get an AI-generated answer.
12
12
 
13
13
  This tool searches across all connected integrations (Gmail, Slack, Google Meet, etc.) and returns a comprehensive answer based on the relevant context.
@@ -18,24 +18,24 @@ Use this tool when the user asks questions like:
18
18
  - "What are the action items from yesterday's standup?"
19
19
  - "When is my next meeting with John?"`,
20
20
  inputSchema: {
21
- type: 'object',
21
+ type: "object",
22
22
  properties: {
23
23
  query: {
24
- type: 'string',
25
- description: 'The question to ask about the user\'s context',
24
+ type: "string",
25
+ description: "The question to ask about the user's context",
26
26
  },
27
27
  integration_ids: {
28
- type: 'array',
29
- items: { type: 'string' },
30
- description: 'Optional: Filter to specific integration IDs (UUIDs)',
28
+ type: "array",
29
+ items: { type: "string" },
30
+ description: "Optional: Filter to specific integration IDs (UUIDs)",
31
31
  },
32
32
  include_sources: {
33
- type: 'boolean',
34
- description: 'Optional: Include source snippets in the response',
33
+ type: "boolean",
34
+ description: "Optional: Include source snippets in the response",
35
35
  default: false,
36
36
  },
37
37
  },
38
- required: ['query'],
38
+ required: ["query"],
39
39
  },
40
40
  };
41
41
  /**
@@ -53,7 +53,7 @@ export async function executeQueryTool(client, input) {
53
53
  // Format the response for MCP
54
54
  let result = response.answer;
55
55
  if (response.sources?.length) {
56
- result += '\n\n**Sources:**';
56
+ result += "\n\n**Sources:**";
57
57
  for (const source of response.sources) {
58
58
  result += `\n- ${source.title}: "${source.snippet}"`;
59
59
  }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"query.js","sourceRoot":"","sources":["../../../../../packages/mcp/src/tools/query.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH;;GAEG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,IAAI,EAAE,eAAe;IACrB,WAAW,EAAE;;;;;;;;uCAQwB;IACrC,WAAW,EAAE;QACX,IAAI,EAAE,QAAiB;QACvB,UAAU,EAAE;YACV,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,8CAA8C;aAC5D;YACD,eAAe,EAAE;gBACf,IAAI,EAAE,OAAO;gBACb,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;gBACzB,WAAW,EAAE,sDAAsD;aACpE;YACD,eAAe,EAAE;gBACf,IAAI,EAAE,SAAS;gBACf,WAAW,EAAE,mDAAmD;gBAChE,OAAO,EAAE,KAAK;aACf;SACF;QACD,QAAQ,EAAE,CAAC,OAAO,CAAC;KACpB;CACF,CAAC;AAWF;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,gBAAgB,CACpC,MAAe,EACf,KAAqB;IAErB,MAAM,OAAO,GAAiB,EAAE,CAAC;IAEjC,IAAI,KAAK,CAAC,eAAe,EAAE,MAAM,EAAE,CAAC;QAClC,OAAO,CAAC,cAAc,GAAG,KAAK,CAAC,eAAe,CAAC;IACjD,CAAC;IACD,IAAI,KAAK,CAAC,eAAe,EAAE,CAAC;QAC1B,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC;IAChC,CAAC;IAED,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;IAE1D,8BAA8B;IAC9B,IAAI,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC;IAE7B,IAAI,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,CAAC;QAC7B,MAAM,IAAI,kBAAkB,CAAC;QAC7B,KAAK,MAAM,MAAM,IAAI,QAAQ,CAAC,OAAO,EAAE,CAAC;YACtC,MAAM,IAAI,OAAO,MAAM,CAAC,KAAK,MAAM,MAAM,CAAC,OAAO,GAAG,CAAC;QACvD,CAAC;IACH,CAAC;IAED,IAAI,QAAQ,CAAC,gBAAgB,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACzC,MAAM,IAAI,iBAAiB,QAAQ,CAAC,gBAAgB,CAAC,MAAM,aAAa,CAAC;IAC3E,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * MCP tool for semantic search across user context.
5
5
  */
6
- import { Attrove } from '@attrove/sdk';
6
+ import { Attrove } from "@attrove/sdk";
7
7
  /**
8
8
  * Tool definition for attrove_search.
9
9
  */
@@ -55,3 +55,4 @@ export interface SearchToolInput {
55
55
  * Execute the search tool.
56
56
  */
57
57
  export declare function executeSearchTool(client: Attrove, input: SearchToolInput): Promise<string>;
58
+ //# sourceMappingURL=search.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../../../../packages/mcp/src/tools/search.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,OAAO,EAIR,MAAM,cAAc,CAAC;AAGtB;;GAEG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4ChC,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;AAED;;GAEG;AACH,wBAAsB,iBAAiB,CACrC,MAAM,EAAE,OAAO,EACf,KAAK,EAAE,eAAe,GACrB,OAAO,CAAC,MAAM,CAAC,CA+GjB"}