@qikdev/mcp 6.7.2 → 6.7.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 (45) hide show
  1. package/build/src/tools/content.d.ts +29 -0
  2. package/build/src/tools/content.d.ts.map +1 -0
  3. package/build/src/tools/content.js +153 -0
  4. package/build/src/tools/content.js.map +1 -0
  5. package/build/src/tools/create.d.ts.map +1 -1
  6. package/build/src/tools/create.js +48 -634
  7. package/build/src/tools/create.js.map +1 -1
  8. package/build/src/tools/duplicates.d.ts +27 -0
  9. package/build/src/tools/duplicates.d.ts.map +1 -0
  10. package/build/src/tools/duplicates.js +142 -0
  11. package/build/src/tools/duplicates.js.map +1 -0
  12. package/build/src/tools/index.d.ts.map +1 -1
  13. package/build/src/tools/index.js +66 -0
  14. package/build/src/tools/index.js.map +1 -1
  15. package/build/src/tools/list.d.ts.map +1 -1
  16. package/build/src/tools/list.js +79 -323
  17. package/build/src/tools/list.js.map +1 -1
  18. package/build/src/tools/merge.d.ts +34 -0
  19. package/build/src/tools/merge.d.ts.map +1 -0
  20. package/build/src/tools/merge.js +192 -0
  21. package/build/src/tools/merge.js.map +1 -0
  22. package/build/src/tools/profile-access.d.ts +47 -0
  23. package/build/src/tools/profile-access.d.ts.map +1 -0
  24. package/build/src/tools/profile-access.js +264 -0
  25. package/build/src/tools/profile-access.js.map +1 -0
  26. package/build/src/tools/profile-relationships.d.ts +43 -0
  27. package/build/src/tools/profile-relationships.d.ts.map +1 -0
  28. package/build/src/tools/profile-relationships.js +270 -0
  29. package/build/src/tools/profile-relationships.js.map +1 -0
  30. package/build/src/tools/scope.d.ts +47 -0
  31. package/build/src/tools/scope.d.ts.map +1 -0
  32. package/build/src/tools/scope.js +263 -0
  33. package/build/src/tools/scope.js.map +1 -0
  34. package/build/src/tools/search.d.ts +19 -0
  35. package/build/src/tools/search.d.ts.map +1 -0
  36. package/build/src/tools/search.js +84 -0
  37. package/build/src/tools/search.js.map +1 -0
  38. package/build/src/tools/smartlist.d.ts +26 -0
  39. package/build/src/tools/smartlist.d.ts.map +1 -0
  40. package/build/src/tools/smartlist.js +126 -0
  41. package/build/src/tools/smartlist.js.map +1 -0
  42. package/build/src/tools/update.d.ts.map +1 -1
  43. package/build/src/tools/update.js +44 -345
  44. package/build/src/tools/update.js.map +1 -1
  45. package/package.json +2 -2
@@ -0,0 +1,270 @@
1
+ import { ConfigManager } from "../config.js";
2
+ export const getProfileRelationshipsTool = {
3
+ name: "get_profile_relationships",
4
+ description: `Get all relationships for a profile.
5
+
6
+ Returns family members, household members, and other connections.
7
+ Relationship types include: spouse, parent, child, sibling, friend, guardian, etc.`,
8
+ inputSchema: {
9
+ type: "object",
10
+ properties: {
11
+ profileId: {
12
+ type: "string",
13
+ description: "The profile ID to get relationships for"
14
+ }
15
+ },
16
+ required: ["profileId"]
17
+ },
18
+ };
19
+ export const createRelationshipTool = {
20
+ name: "create_relationship",
21
+ description: `Create a relationship between two or more profiles.
22
+
23
+ **Relationship types:**
24
+ - spouse, partner
25
+ - parent, child
26
+ - sibling
27
+ - friend
28
+ - guardian, ward
29
+ - employer, employee
30
+ - other
31
+
32
+ **Example:**
33
+ \`\`\`json
34
+ {
35
+ "from": ["profileId1"],
36
+ "to": ["profileId2"],
37
+ "relation": "spouse"
38
+ }
39
+ \`\`\`
40
+
41
+ This creates a bidirectional relationship (e.g., if A is spouse of B, B is also spouse of A).`,
42
+ inputSchema: {
43
+ type: "object",
44
+ properties: {
45
+ from: {
46
+ type: "array",
47
+ items: { type: "string" },
48
+ description: "Profile ID(s) on one side of the relationship"
49
+ },
50
+ to: {
51
+ type: "array",
52
+ items: { type: "string" },
53
+ description: "Profile ID(s) on the other side of the relationship"
54
+ },
55
+ relation: {
56
+ type: "string",
57
+ description: "Relationship type: spouse, parent, child, sibling, friend, guardian, etc."
58
+ }
59
+ },
60
+ required: ["from", "to", "relation"]
61
+ },
62
+ };
63
+ export const deleteRelationshipTool = {
64
+ name: "delete_relationship",
65
+ description: `Remove a relationship between profiles.
66
+
67
+ Use get_profile_relationships first to find the relationship ID.`,
68
+ inputSchema: {
69
+ type: "object",
70
+ properties: {
71
+ relationshipId: {
72
+ type: "string",
73
+ description: "The relationship ID to delete"
74
+ }
75
+ },
76
+ required: ["relationshipId"]
77
+ },
78
+ };
79
+ export const createProfileWithRelationshipTool = {
80
+ name: "create_profile_with_relationship",
81
+ description: `Create a new profile and link it to an existing profile in one request.
82
+
83
+ Useful for adding family members. Can optionally copy the address from the existing profile.
84
+
85
+ **Example:** Create a child for an existing parent:
86
+ \`\`\`json
87
+ {
88
+ "existingProfileId": "parentId",
89
+ "relation": "child",
90
+ "copyAddress": true,
91
+ "profile": {
92
+ "firstName": "Jane",
93
+ "lastName": "Doe",
94
+ "gender": "Female"
95
+ }
96
+ }
97
+ \`\`\``,
98
+ inputSchema: {
99
+ type: "object",
100
+ properties: {
101
+ existingProfileId: {
102
+ type: "string",
103
+ description: "The existing profile ID to create a relationship with"
104
+ },
105
+ relation: {
106
+ type: "string",
107
+ description: "Relationship type: spouse, parent, child, sibling, etc."
108
+ },
109
+ copyAddress: {
110
+ type: "boolean",
111
+ description: "Copy the address from the existing profile to the new one"
112
+ },
113
+ profile: {
114
+ type: "object",
115
+ description: "The new profile data (firstName, lastName, gender, etc.)"
116
+ }
117
+ },
118
+ required: ["existingProfileId", "relation", "profile"]
119
+ },
120
+ };
121
+ export async function handleGetProfileRelationships(args) {
122
+ try {
123
+ const configManager = new ConfigManager();
124
+ const config = await configManager.loadConfig();
125
+ if (!config) {
126
+ throw new Error('Qik MCP server not configured. Run setup first.');
127
+ }
128
+ const response = await fetch(`${config.apiUrl || 'https://api.qik.dev'}/profile/${args.profileId}/relationships/list`, {
129
+ headers: {
130
+ 'Authorization': `Bearer ${config.accessToken}`,
131
+ 'Content-Type': 'application/json',
132
+ },
133
+ });
134
+ if (!response.ok) {
135
+ const errorText = await response.text();
136
+ throw new Error(`HTTP ${response.status}: ${errorText}`);
137
+ }
138
+ const data = await response.json();
139
+ return {
140
+ content: [{
141
+ type: "text",
142
+ text: JSON.stringify(data, null, 2)
143
+ }]
144
+ };
145
+ }
146
+ catch (error) {
147
+ return {
148
+ content: [{
149
+ type: "text",
150
+ text: JSON.stringify({ error: error.message }, null, 2)
151
+ }]
152
+ };
153
+ }
154
+ }
155
+ export async function handleCreateRelationship(args) {
156
+ try {
157
+ const configManager = new ConfigManager();
158
+ const config = await configManager.loadConfig();
159
+ if (!config) {
160
+ throw new Error('Qik MCP server not configured. Run setup first.');
161
+ }
162
+ const response = await fetch(`${config.apiUrl || 'https://api.qik.dev'}/profile/relationships/create`, {
163
+ method: 'POST',
164
+ headers: {
165
+ 'Authorization': `Bearer ${config.accessToken}`,
166
+ 'Content-Type': 'application/json',
167
+ },
168
+ body: JSON.stringify({
169
+ from: args.from,
170
+ to: args.to,
171
+ relation: args.relation
172
+ })
173
+ });
174
+ if (!response.ok) {
175
+ const errorText = await response.text();
176
+ throw new Error(`HTTP ${response.status}: ${errorText}`);
177
+ }
178
+ const data = await response.json();
179
+ return {
180
+ content: [{
181
+ type: "text",
182
+ text: JSON.stringify(data, null, 2)
183
+ }]
184
+ };
185
+ }
186
+ catch (error) {
187
+ return {
188
+ content: [{
189
+ type: "text",
190
+ text: JSON.stringify({ error: error.message }, null, 2)
191
+ }]
192
+ };
193
+ }
194
+ }
195
+ export async function handleDeleteRelationship(args) {
196
+ try {
197
+ const configManager = new ConfigManager();
198
+ const config = await configManager.loadConfig();
199
+ if (!config) {
200
+ throw new Error('Qik MCP server not configured. Run setup first.');
201
+ }
202
+ const response = await fetch(`${config.apiUrl || 'https://api.qik.dev'}/profile/relationships/${args.relationshipId}/remove`, {
203
+ method: 'DELETE',
204
+ headers: {
205
+ 'Authorization': `Bearer ${config.accessToken}`,
206
+ 'Content-Type': 'application/json',
207
+ },
208
+ });
209
+ if (!response.ok) {
210
+ const errorText = await response.text();
211
+ throw new Error(`HTTP ${response.status}: ${errorText}`);
212
+ }
213
+ const data = await response.json();
214
+ return {
215
+ content: [{
216
+ type: "text",
217
+ text: JSON.stringify(data, null, 2)
218
+ }]
219
+ };
220
+ }
221
+ catch (error) {
222
+ return {
223
+ content: [{
224
+ type: "text",
225
+ text: JSON.stringify({ error: error.message }, null, 2)
226
+ }]
227
+ };
228
+ }
229
+ }
230
+ export async function handleCreateProfileWithRelationship(args) {
231
+ try {
232
+ const configManager = new ConfigManager();
233
+ const config = await configManager.loadConfig();
234
+ if (!config) {
235
+ throw new Error('Qik MCP server not configured. Run setup first.');
236
+ }
237
+ const response = await fetch(`${config.apiUrl || 'https://api.qik.dev'}/profile/${args.existingProfileId}/relation`, {
238
+ method: 'POST',
239
+ headers: {
240
+ 'Authorization': `Bearer ${config.accessToken}`,
241
+ 'Content-Type': 'application/json',
242
+ },
243
+ body: JSON.stringify({
244
+ relation: args.relation,
245
+ residence: args.copyAddress,
246
+ profile: args.profile
247
+ })
248
+ });
249
+ if (!response.ok) {
250
+ const errorText = await response.text();
251
+ throw new Error(`HTTP ${response.status}: ${errorText}`);
252
+ }
253
+ const data = await response.json();
254
+ return {
255
+ content: [{
256
+ type: "text",
257
+ text: JSON.stringify(data, null, 2)
258
+ }]
259
+ };
260
+ }
261
+ catch (error) {
262
+ return {
263
+ content: [{
264
+ type: "text",
265
+ text: JSON.stringify({ error: error.message }, null, 2)
266
+ }]
267
+ };
268
+ }
269
+ }
270
+ //# sourceMappingURL=profile-relationships.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"profile-relationships.js","sourceRoot":"","sources":["../../../src/tools/profile-relationships.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C,MAAM,CAAC,MAAM,2BAA2B,GAAS;IAC/C,IAAI,EAAE,2BAA2B;IACjC,WAAW,EAAE;;;mFAGoE;IACjF,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBAC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AC;YACxC,MAAM,IAAI,KAAK,CAAC,QAAQ,QAAQ,CAAC,MAAM,KAAK,SAAS,EAAE,CAAC,CAAC;QAC3D,CAAC;QAED,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;QAEnC,OAAO;YACL,OAAO,EAAE,CAAC;oBACR,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;iBACpC,CAAC;SACH,CAAC;IAEJ,CAAC;IAAC,OAAO,KAAU,EAAE,CAAC;QACpB,OAAO;YACL,OAAO,EAAE,CAAC;oBACR,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,OAAO,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC;iBACxD,CAAC;SACH,CAAC;IACJ,CAAC;AACH,CAAC"}
@@ -0,0 +1,47 @@
1
+ import { Tool } from "@modelcontextprotocol/sdk/types.js";
2
+ /**
3
+ * Scope Tools
4
+ *
5
+ * Manage organisational scopes (groups, departments, locations).
6
+ * Scopes are hierarchical containers for organising content and permissions.
7
+ */
8
+ export declare const getScopeTreeTool: Tool;
9
+ export declare const getActionableScopesTool: Tool;
10
+ export declare const addProfileToScopeTool: Tool;
11
+ export declare const removeProfileFromScopeTool: Tool;
12
+ export declare function handleGetScopeTree(args: {}): Promise<{
13
+ content: Array<{
14
+ type: string;
15
+ text: string;
16
+ }>;
17
+ }>;
18
+ export declare function handleGetActionableScopes(args: {
19
+ type: string;
20
+ action: string;
21
+ }): Promise<{
22
+ content: Array<{
23
+ type: string;
24
+ text: string;
25
+ }>;
26
+ }>;
27
+ export declare function handleAddProfileToScope(args: {
28
+ scopeId: string;
29
+ profileId: string;
30
+ positionTitle?: string;
31
+ }): Promise<{
32
+ content: Array<{
33
+ type: string;
34
+ text: string;
35
+ }>;
36
+ }>;
37
+ export declare function handleRemoveProfileFromScope(args: {
38
+ scopeId: string;
39
+ profileId: string;
40
+ positionKey?: string;
41
+ }): Promise<{
42
+ content: Array<{
43
+ type: string;
44
+ text: string;
45
+ }>;
46
+ }>;
47
+ //# sourceMappingURL=scope.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scope.d.ts","sourceRoot":"","sources":["../../../src/tools/scope.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAG1D;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,EAAE,IAU9B,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,IA4BrC,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,IAgCnC,CAAC;AAEF,eAAO,MAAM,0BAA0B,EAAE,IA8BxC,CAAC;AAEF,wBAAsB,kBAAkB,CAAC,IAAI,EAAE,EAAE,GAAG,OAAO,CAAC;IAAE,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CAAE,CAAC,CAsC9G;AAED,wBAAsB,yBAAyB,CAAC,IAAI,EAAE;IACpD,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAChB,GAAG,OAAO,CAAC;IAAE,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CAAE,CAAC,CA2C9D;AAED,wBAAsB,uBAAuB,CAAC,IAAI,EAAE;IAClD,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,GAAG,OAAO,CAAC;IAAE,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CAAE,CAAC,CA2C9D;AAED,wBAAsB,4BAA4B,CAAC,IAAI,EAAE;IACvD,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,GAAG,OAAO,CAAC;IAAE,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CAAE,CAAC,CA2C9D"}
@@ -0,0 +1,263 @@
1
+ import { ConfigManager } from "../config.js";
2
+ /**
3
+ * Scope Tools
4
+ *
5
+ * Manage organisational scopes (groups, departments, locations).
6
+ * Scopes are hierarchical containers for organising content and permissions.
7
+ */
8
+ export const getScopeTreeTool = {
9
+ name: "get_scope_tree",
10
+ description: `Get the full hierarchical tree of scopes the user can access.
11
+
12
+ Returns nested structure showing the organisation's scope hierarchy.
13
+ Useful for understanding the organisation structure.`,
14
+ inputSchema: {
15
+ type: "object",
16
+ properties: {}
17
+ },
18
+ };
19
+ export const getActionableScopesTool = {
20
+ name: "get_actionable_scopes",
21
+ description: `Get scopes where the user can perform a specific action on a content type.
22
+
23
+ Useful for determining where content can be created, edited, or deleted.
24
+
25
+ **Example:**
26
+ \`\`\`json
27
+ {
28
+ "type": "profile",
29
+ "action": "create"
30
+ }
31
+ \`\`\``,
32
+ inputSchema: {
33
+ type: "object",
34
+ properties: {
35
+ type: {
36
+ type: "string",
37
+ description: "Content type key (e.g., 'profile', 'article')"
38
+ },
39
+ action: {
40
+ type: "string",
41
+ enum: ["create", "edit", "delete", "view"],
42
+ description: "The action to check permissions for"
43
+ }
44
+ },
45
+ required: ["type", "action"]
46
+ },
47
+ };
48
+ export const addProfileToScopeTool = {
49
+ name: "add_profile_to_scope",
50
+ description: `Add a profile to a position within a scope.
51
+
52
+ Positions are roles like "Member", "Leader", "Volunteer", etc.
53
+
54
+ **Example:**
55
+ \`\`\`json
56
+ {
57
+ "scopeId": "scopeId123",
58
+ "profileId": "profileId456",
59
+ "positionTitle": "Member"
60
+ }
61
+ \`\`\``,
62
+ inputSchema: {
63
+ type: "object",
64
+ properties: {
65
+ scopeId: {
66
+ type: "string",
67
+ description: "The scope ID"
68
+ },
69
+ profileId: {
70
+ type: "string",
71
+ description: "The profile ID to add"
72
+ },
73
+ positionTitle: {
74
+ type: "string",
75
+ description: "Position title (default: 'Member')"
76
+ }
77
+ },
78
+ required: ["scopeId", "profileId"]
79
+ },
80
+ };
81
+ export const removeProfileFromScopeTool = {
82
+ name: "remove_profile_from_scope",
83
+ description: `Remove a profile from a position within a scope.
84
+
85
+ **Example:**
86
+ \`\`\`json
87
+ {
88
+ "scopeId": "scopeId123",
89
+ "profileId": "profileId456",
90
+ "positionKey": "member"
91
+ }
92
+ \`\`\``,
93
+ inputSchema: {
94
+ type: "object",
95
+ properties: {
96
+ scopeId: {
97
+ type: "string",
98
+ description: "The scope ID"
99
+ },
100
+ profileId: {
101
+ type: "string",
102
+ description: "The profile ID to remove"
103
+ },
104
+ positionKey: {
105
+ type: "string",
106
+ description: "Position key (optional, removes from all if not specified)"
107
+ }
108
+ },
109
+ required: ["scopeId", "profileId"]
110
+ },
111
+ };
112
+ export async function handleGetScopeTree(args) {
113
+ try {
114
+ const configManager = new ConfigManager();
115
+ const config = await configManager.loadConfig();
116
+ if (!config) {
117
+ throw new Error('Qik MCP server not configured. Run setup first.');
118
+ }
119
+ const response = await fetch(`${config.apiUrl || 'https://api.qik.dev'}/scope/tree`, {
120
+ headers: {
121
+ 'Authorization': `Bearer ${config.accessToken}`,
122
+ 'Content-Type': 'application/json',
123
+ },
124
+ });
125
+ if (!response.ok) {
126
+ const errorText = await response.text();
127
+ throw new Error(`HTTP ${response.status}: ${errorText}`);
128
+ }
129
+ const data = await response.json();
130
+ return {
131
+ content: [{
132
+ type: "text",
133
+ text: JSON.stringify(data, null, 2)
134
+ }]
135
+ };
136
+ }
137
+ catch (error) {
138
+ return {
139
+ content: [{
140
+ type: "text",
141
+ text: JSON.stringify({ error: error.message }, null, 2)
142
+ }]
143
+ };
144
+ }
145
+ }
146
+ export async function handleGetActionableScopes(args) {
147
+ try {
148
+ const configManager = new ConfigManager();
149
+ const config = await configManager.loadConfig();
150
+ if (!config) {
151
+ throw new Error('Qik MCP server not configured. Run setup first.');
152
+ }
153
+ const response = await fetch(`${config.apiUrl || 'https://api.qik.dev'}/scope/actionable`, {
154
+ method: 'POST',
155
+ headers: {
156
+ 'Authorization': `Bearer ${config.accessToken}`,
157
+ 'Content-Type': 'application/json',
158
+ },
159
+ body: JSON.stringify({
160
+ type: args.type,
161
+ action: args.action
162
+ })
163
+ });
164
+ if (!response.ok) {
165
+ const errorText = await response.text();
166
+ throw new Error(`HTTP ${response.status}: ${errorText}`);
167
+ }
168
+ const data = await response.json();
169
+ return {
170
+ content: [{
171
+ type: "text",
172
+ text: JSON.stringify(data, null, 2)
173
+ }]
174
+ };
175
+ }
176
+ catch (error) {
177
+ return {
178
+ content: [{
179
+ type: "text",
180
+ text: JSON.stringify({ error: error.message }, null, 2)
181
+ }]
182
+ };
183
+ }
184
+ }
185
+ export async function handleAddProfileToScope(args) {
186
+ try {
187
+ const configManager = new ConfigManager();
188
+ const config = await configManager.loadConfig();
189
+ if (!config) {
190
+ throw new Error('Qik MCP server not configured. Run setup first.');
191
+ }
192
+ const response = await fetch(`${config.apiUrl || 'https://api.qik.dev'}/scope/${args.scopeId}/profile/add`, {
193
+ method: 'POST',
194
+ headers: {
195
+ 'Authorization': `Bearer ${config.accessToken}`,
196
+ 'Content-Type': 'application/json',
197
+ },
198
+ body: JSON.stringify({
199
+ profile: args.profileId,
200
+ title: args.positionTitle || 'Member'
201
+ })
202
+ });
203
+ if (!response.ok) {
204
+ const errorText = await response.text();
205
+ throw new Error(`HTTP ${response.status}: ${errorText}`);
206
+ }
207
+ const data = await response.json();
208
+ return {
209
+ content: [{
210
+ type: "text",
211
+ text: JSON.stringify(data, null, 2)
212
+ }]
213
+ };
214
+ }
215
+ catch (error) {
216
+ return {
217
+ content: [{
218
+ type: "text",
219
+ text: JSON.stringify({ error: error.message }, null, 2)
220
+ }]
221
+ };
222
+ }
223
+ }
224
+ export async function handleRemoveProfileFromScope(args) {
225
+ try {
226
+ const configManager = new ConfigManager();
227
+ const config = await configManager.loadConfig();
228
+ if (!config) {
229
+ throw new Error('Qik MCP server not configured. Run setup first.');
230
+ }
231
+ const response = await fetch(`${config.apiUrl || 'https://api.qik.dev'}/scope/${args.scopeId}/profile/remove`, {
232
+ method: 'PUT',
233
+ headers: {
234
+ 'Authorization': `Bearer ${config.accessToken}`,
235
+ 'Content-Type': 'application/json',
236
+ },
237
+ body: JSON.stringify({
238
+ profile: args.profileId,
239
+ key: args.positionKey
240
+ })
241
+ });
242
+ if (!response.ok) {
243
+ const errorText = await response.text();
244
+ throw new Error(`HTTP ${response.status}: ${errorText}`);
245
+ }
246
+ const data = await response.json();
247
+ return {
248
+ content: [{
249
+ type: "text",
250
+ text: JSON.stringify(data, null, 2)
251
+ }]
252
+ };
253
+ }
254
+ catch (error) {
255
+ return {
256
+ content: [{
257
+ type: "text",
258
+ text: JSON.stringify({ error: error.message }, null, 2)
259
+ }]
260
+ };
261
+ }
262
+ }
263
+ //# sourceMappingURL=scope.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scope.js","sourceRoot":"","sources":["../../../src/tools/scope.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C;;;;;GAKG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAS;IACpC,IAAI,EAAE,gBAAgB;IACtB,WAAW,EAAE;;;qDAGsC;IACnD,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE,EAAE;KACf;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,uBAAuB,GAAS;IAC3C,IAAI,EAAE,uBAAuB;IAC7B,WAAW,EAAE;;;;;;;;;;OAUR;IACL,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAA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,IAAI,EAAE,CAAC,CAAC;iBACpC,CAAC;SACH,CAAC;IAEJ,CAAC;IAAC,OAAO,KAAU,EAAE,CAAC;QACpB,OAAO;YACL,OAAO,EAAE,CAAC;oBACR,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,OAAO,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC;iBACxD,CAAC;SACH,CAAC;IACJ,CAAC;AACH,CAAC"}
@@ -0,0 +1,19 @@
1
+ import { Tool } from "@modelcontextprotocol/sdk/types.js";
2
+ /**
3
+ * Global Search Tool
4
+ *
5
+ * Search across multiple content types simultaneously.
6
+ * Returns results grouped by content type.
7
+ */
8
+ export declare const globalSearchTool: Tool;
9
+ export declare function handleGlobalSearch(args: {
10
+ keywords: string;
11
+ types?: string[];
12
+ limit?: number;
13
+ }): Promise<{
14
+ content: Array<{
15
+ type: string;
16
+ text: string;
17
+ }>;
18
+ }>;
19
+ //# sourceMappingURL=search.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../../src/tools/search.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAG1D;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,EAAE,IAmC9B,CAAC;AAEF,wBAAsB,kBAAkB,CAAC,IAAI,EAAE;IAC7C,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,GAAG,OAAO,CAAC;IAAE,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CAAE,CAAC,CA4C9D"}