@sargonpiraev/hh-mcp-server 1.13.0 → 1.15.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 +280 -33
- package/build/main.d.ts +7 -0
- package/build/main.js +295 -0
- package/build/server.d.ts +27 -0
- package/build/server.js +3062 -0
- package/package.json +28 -19
- package/build/index.d.ts +0 -2
- package/build/index.js +0 -499
package/build/server.js
ADDED
|
@@ -0,0 +1,3062 @@
|
|
|
1
|
+
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import axios from 'axios';
|
|
4
|
+
import dotenv from 'dotenv';
|
|
5
|
+
dotenv.config();
|
|
6
|
+
export const envSchema = z.object({
|
|
7
|
+
HH_CLIENT_ID: z.string(),
|
|
8
|
+
HH_CLIENT_SECRET: z.string(),
|
|
9
|
+
HH_USER_AGENT: z.string(),
|
|
10
|
+
HH_REDIRECT_URI: z.string(),
|
|
11
|
+
});
|
|
12
|
+
export const mcpServer = new McpServer({
|
|
13
|
+
name: '@sargonpiraev/hh-mcp-server',
|
|
14
|
+
version: '1.0.0',
|
|
15
|
+
}, {
|
|
16
|
+
instructions: ``,
|
|
17
|
+
capabilities: {
|
|
18
|
+
tools: {},
|
|
19
|
+
logging: {},
|
|
20
|
+
},
|
|
21
|
+
});
|
|
22
|
+
export const env = envSchema.parse(process.env);
|
|
23
|
+
export const apiClient = axios.create({
|
|
24
|
+
baseURL: '',
|
|
25
|
+
headers: {
|
|
26
|
+
Accept: 'application/json',
|
|
27
|
+
},
|
|
28
|
+
timeout: 30000,
|
|
29
|
+
});
|
|
30
|
+
apiClient.interceptors.request.use((config) => {
|
|
31
|
+
if (env.HH_USER_AGENT) {
|
|
32
|
+
config.headers['HH-User-Agent'] = env.HH_USER_AGENT;
|
|
33
|
+
}
|
|
34
|
+
return config;
|
|
35
|
+
}, (error) => {
|
|
36
|
+
return Promise.reject(error);
|
|
37
|
+
});
|
|
38
|
+
function handleResult(data) {
|
|
39
|
+
return {
|
|
40
|
+
content: [
|
|
41
|
+
{
|
|
42
|
+
type: 'text',
|
|
43
|
+
text: JSON.stringify(data, null, 2),
|
|
44
|
+
},
|
|
45
|
+
],
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
function handleError(error) {
|
|
49
|
+
console.error(error);
|
|
50
|
+
if (axios.isAxiosError(error)) {
|
|
51
|
+
const message = error.response?.data?.message || error.message;
|
|
52
|
+
return {
|
|
53
|
+
isError: true,
|
|
54
|
+
content: [{ type: 'text', text: `API Error: ${message}` }],
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
return {
|
|
58
|
+
isError: true,
|
|
59
|
+
content: [{ type: 'text', text: `Error: ${error}` }],
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
// Register tools
|
|
63
|
+
mcpServer.tool('confirm-phone-in-resume', `Verify phone with a code`, {}, async (args) => {
|
|
64
|
+
try {
|
|
65
|
+
const response = await apiClient.request({
|
|
66
|
+
method: 'POST',
|
|
67
|
+
url: '/resume_phone_confirm',
|
|
68
|
+
data: args,
|
|
69
|
+
});
|
|
70
|
+
return handleResult(response.data);
|
|
71
|
+
}
|
|
72
|
+
catch (error) {
|
|
73
|
+
return handleError(error);
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
mcpServer.tool('get-manager-settings', `Manager preferences`, {
|
|
77
|
+
employer_id: z.string(),
|
|
78
|
+
manager_id: z.string(),
|
|
79
|
+
}, async (args) => {
|
|
80
|
+
try {
|
|
81
|
+
const { employer_id, manager_id, ...queryParams } = args;
|
|
82
|
+
const url = `/employers/${employer_id}/managers/${manager_id}/settings`;
|
|
83
|
+
const response = await apiClient.request({
|
|
84
|
+
method: 'GET',
|
|
85
|
+
url: url,
|
|
86
|
+
params: queryParams,
|
|
87
|
+
});
|
|
88
|
+
return handleResult(response.data);
|
|
89
|
+
}
|
|
90
|
+
catch (error) {
|
|
91
|
+
return handleError(error);
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
mcpServer.tool('get-employer-manager-limits', `Daily limit of resume views for current manager`, {
|
|
95
|
+
employer_id: z.string(),
|
|
96
|
+
manager_id: z.string(),
|
|
97
|
+
}, async (args) => {
|
|
98
|
+
try {
|
|
99
|
+
const { employer_id, manager_id, ...queryParams } = args;
|
|
100
|
+
const url = `/employers/${employer_id}/managers/${manager_id}/limits/resume`;
|
|
101
|
+
const response = await apiClient.request({
|
|
102
|
+
method: 'GET',
|
|
103
|
+
url: url,
|
|
104
|
+
params: queryParams,
|
|
105
|
+
});
|
|
106
|
+
return handleResult(response.data);
|
|
107
|
+
}
|
|
108
|
+
catch (error) {
|
|
109
|
+
return handleError(error);
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
mcpServer.tool('get-employer-addresses', `Directory of employer's addresses`, {
|
|
113
|
+
employer_id: z.string(),
|
|
114
|
+
changed_after: z.string().optional(),
|
|
115
|
+
manager_id: z.string().optional(),
|
|
116
|
+
with_manager: z.string().optional(),
|
|
117
|
+
per_page: z.string().optional(),
|
|
118
|
+
page: z.string().optional(),
|
|
119
|
+
}, async (args) => {
|
|
120
|
+
try {
|
|
121
|
+
const { employer_id, ...queryParams } = args;
|
|
122
|
+
const url = `/employers/${employer_id}/addresses`;
|
|
123
|
+
const response = await apiClient.request({
|
|
124
|
+
method: 'GET',
|
|
125
|
+
url: url,
|
|
126
|
+
params: queryParams,
|
|
127
|
+
});
|
|
128
|
+
return handleResult(response.data);
|
|
129
|
+
}
|
|
130
|
+
catch (error) {
|
|
131
|
+
return handleError(error);
|
|
132
|
+
}
|
|
133
|
+
});
|
|
134
|
+
mcpServer.tool('get-employer-managers', `Directory of employer's managers`, {
|
|
135
|
+
employer_id: z.string(),
|
|
136
|
+
page: z.string().optional(),
|
|
137
|
+
per_page: z.string().optional(),
|
|
138
|
+
search_text: z.string().optional(),
|
|
139
|
+
}, async (args) => {
|
|
140
|
+
try {
|
|
141
|
+
const { employer_id, ...queryParams } = args;
|
|
142
|
+
const url = `/employers/${employer_id}/managers`;
|
|
143
|
+
const response = await apiClient.request({
|
|
144
|
+
method: 'GET',
|
|
145
|
+
url: url,
|
|
146
|
+
params: queryParams,
|
|
147
|
+
});
|
|
148
|
+
return handleResult(response.data);
|
|
149
|
+
}
|
|
150
|
+
catch (error) {
|
|
151
|
+
return handleError(error);
|
|
152
|
+
}
|
|
153
|
+
});
|
|
154
|
+
mcpServer.tool('add-employer-manager', `Adding a manager`, {
|
|
155
|
+
employer_id: z.string(),
|
|
156
|
+
}, async (args) => {
|
|
157
|
+
try {
|
|
158
|
+
const { employer_id, ...requestData } = args;
|
|
159
|
+
const url = `/employers/${employer_id}/managers`;
|
|
160
|
+
const response = await apiClient.request({
|
|
161
|
+
method: 'POST',
|
|
162
|
+
url: url,
|
|
163
|
+
data: requestData,
|
|
164
|
+
});
|
|
165
|
+
return handleResult(response.data);
|
|
166
|
+
}
|
|
167
|
+
catch (error) {
|
|
168
|
+
return handleError(error);
|
|
169
|
+
}
|
|
170
|
+
});
|
|
171
|
+
mcpServer.tool('get-employer-manager-types', `Directory of manager types and privileges`, {
|
|
172
|
+
employer_id: z.string(),
|
|
173
|
+
}, async (args) => {
|
|
174
|
+
try {
|
|
175
|
+
const { employer_id, ...queryParams } = args;
|
|
176
|
+
const url = `/employers/${employer_id}/manager_types`;
|
|
177
|
+
const response = await apiClient.request({
|
|
178
|
+
method: 'GET',
|
|
179
|
+
url: url,
|
|
180
|
+
params: queryParams,
|
|
181
|
+
});
|
|
182
|
+
return handleResult(response.data);
|
|
183
|
+
}
|
|
184
|
+
catch (error) {
|
|
185
|
+
return handleError(error);
|
|
186
|
+
}
|
|
187
|
+
});
|
|
188
|
+
mcpServer.tool('get-manager-accounts', `Manager's work accounts`, {}, async (args) => {
|
|
189
|
+
try {
|
|
190
|
+
const response = await apiClient.request({
|
|
191
|
+
method: 'GET',
|
|
192
|
+
url: '/manager_accounts/mine',
|
|
193
|
+
params: args,
|
|
194
|
+
});
|
|
195
|
+
return handleResult(response.data);
|
|
196
|
+
}
|
|
197
|
+
catch (error) {
|
|
198
|
+
return handleError(error);
|
|
199
|
+
}
|
|
200
|
+
});
|
|
201
|
+
mcpServer.tool('get-applicant-phone-info', `Get information about the applicant's phone number`, {
|
|
202
|
+
phone: z.string(),
|
|
203
|
+
}, async (args) => {
|
|
204
|
+
try {
|
|
205
|
+
const response = await apiClient.request({
|
|
206
|
+
method: 'GET',
|
|
207
|
+
url: '/resume_should_send_sms',
|
|
208
|
+
params: args,
|
|
209
|
+
});
|
|
210
|
+
return handleResult(response.data);
|
|
211
|
+
}
|
|
212
|
+
catch (error) {
|
|
213
|
+
return handleError(error);
|
|
214
|
+
}
|
|
215
|
+
});
|
|
216
|
+
mcpServer.tool('get-address', `Get address by ID`, {
|
|
217
|
+
employer_id: z.string(),
|
|
218
|
+
address_id: z.string(),
|
|
219
|
+
with_manager: z.string().optional(),
|
|
220
|
+
}, async (args) => {
|
|
221
|
+
try {
|
|
222
|
+
const { employer_id, address_id, ...queryParams } = args;
|
|
223
|
+
const url = `/employers/${employer_id}/addresses/${address_id}`;
|
|
224
|
+
const response = await apiClient.request({
|
|
225
|
+
method: 'GET',
|
|
226
|
+
url: url,
|
|
227
|
+
params: queryParams,
|
|
228
|
+
});
|
|
229
|
+
return handleResult(response.data);
|
|
230
|
+
}
|
|
231
|
+
catch (error) {
|
|
232
|
+
return handleError(error);
|
|
233
|
+
}
|
|
234
|
+
});
|
|
235
|
+
mcpServer.tool('edit-employer-manager', `Editing a manager`, {
|
|
236
|
+
employer_id: z.string(),
|
|
237
|
+
manager_id: z.string(),
|
|
238
|
+
}, async (args) => {
|
|
239
|
+
try {
|
|
240
|
+
const { employer_id, manager_id, ...requestData } = args;
|
|
241
|
+
const url = `/employers/${employer_id}/managers/${manager_id}`;
|
|
242
|
+
const response = await apiClient.request({
|
|
243
|
+
method: 'PUT',
|
|
244
|
+
url: url,
|
|
245
|
+
data: requestData,
|
|
246
|
+
});
|
|
247
|
+
return handleResult(response.data);
|
|
248
|
+
}
|
|
249
|
+
catch (error) {
|
|
250
|
+
return handleError(error);
|
|
251
|
+
}
|
|
252
|
+
});
|
|
253
|
+
mcpServer.tool('get-employer-manager', `Getting information about a manager`, {
|
|
254
|
+
employer_id: z.string(),
|
|
255
|
+
manager_id: z.string(),
|
|
256
|
+
}, async (args) => {
|
|
257
|
+
try {
|
|
258
|
+
const { employer_id, manager_id, ...queryParams } = args;
|
|
259
|
+
const url = `/employers/${employer_id}/managers/${manager_id}`;
|
|
260
|
+
const response = await apiClient.request({
|
|
261
|
+
method: 'GET',
|
|
262
|
+
url: url,
|
|
263
|
+
params: queryParams,
|
|
264
|
+
});
|
|
265
|
+
return handleResult(response.data);
|
|
266
|
+
}
|
|
267
|
+
catch (error) {
|
|
268
|
+
return handleError(error);
|
|
269
|
+
}
|
|
270
|
+
});
|
|
271
|
+
mcpServer.tool('delete-employer-manager', `Deleting a manager`, {
|
|
272
|
+
employer_id: z.string(),
|
|
273
|
+
manager_id: z.string(),
|
|
274
|
+
successor_id: z.string(),
|
|
275
|
+
}, async (args) => {
|
|
276
|
+
try {
|
|
277
|
+
const { employer_id, manager_id, ...queryParams } = args;
|
|
278
|
+
const url = `/employers/${employer_id}/managers/${manager_id}`;
|
|
279
|
+
const response = await apiClient.request({
|
|
280
|
+
method: 'DELETE',
|
|
281
|
+
url: url,
|
|
282
|
+
params: queryParams,
|
|
283
|
+
});
|
|
284
|
+
return handleResult(response.data);
|
|
285
|
+
}
|
|
286
|
+
catch (error) {
|
|
287
|
+
return handleError(error);
|
|
288
|
+
}
|
|
289
|
+
});
|
|
290
|
+
mcpServer.tool('send-code-for-verify-phone-in-resume', `Send verification code to the phone number on CV`, {}, async (args) => {
|
|
291
|
+
try {
|
|
292
|
+
const response = await apiClient.request({
|
|
293
|
+
method: 'POST',
|
|
294
|
+
url: '/resume_phone_generate_code',
|
|
295
|
+
data: args,
|
|
296
|
+
});
|
|
297
|
+
return handleResult(response.data);
|
|
298
|
+
}
|
|
299
|
+
catch (error) {
|
|
300
|
+
return handleError(error);
|
|
301
|
+
}
|
|
302
|
+
});
|
|
303
|
+
mcpServer.tool('authorize', `Getting an access-token`, {}, async (args) => {
|
|
304
|
+
try {
|
|
305
|
+
const response = await apiClient.request({
|
|
306
|
+
method: 'POST',
|
|
307
|
+
url: '/oauth/token',
|
|
308
|
+
data: args,
|
|
309
|
+
});
|
|
310
|
+
return handleResult(response.data);
|
|
311
|
+
}
|
|
312
|
+
catch (error) {
|
|
313
|
+
return handleError(error);
|
|
314
|
+
}
|
|
315
|
+
});
|
|
316
|
+
mcpServer.tool('invalidate-token', `Access token invalidation`, {}, async (args) => {
|
|
317
|
+
try {
|
|
318
|
+
const response = await apiClient.request({
|
|
319
|
+
method: 'DELETE',
|
|
320
|
+
url: '/oauth/token',
|
|
321
|
+
params: args,
|
|
322
|
+
});
|
|
323
|
+
return handleResult(response.data);
|
|
324
|
+
}
|
|
325
|
+
catch (error) {
|
|
326
|
+
return handleError(error);
|
|
327
|
+
}
|
|
328
|
+
});
|
|
329
|
+
mcpServer.tool('get-current-user-info', `Info on current authorized user`, {}, async (args) => {
|
|
330
|
+
try {
|
|
331
|
+
const response = await apiClient.request({
|
|
332
|
+
method: 'GET',
|
|
333
|
+
url: '/me',
|
|
334
|
+
params: args,
|
|
335
|
+
});
|
|
336
|
+
return handleResult(response.data);
|
|
337
|
+
}
|
|
338
|
+
catch (error) {
|
|
339
|
+
return handleError(error);
|
|
340
|
+
}
|
|
341
|
+
});
|
|
342
|
+
mcpServer.tool('edit-current-user-info', `Editing information on the authorized user`, {}, async (args) => {
|
|
343
|
+
try {
|
|
344
|
+
const response = await apiClient.request({
|
|
345
|
+
method: 'POST',
|
|
346
|
+
url: '/me',
|
|
347
|
+
data: args,
|
|
348
|
+
});
|
|
349
|
+
return handleResult(response.data);
|
|
350
|
+
}
|
|
351
|
+
catch (error) {
|
|
352
|
+
return handleError(error);
|
|
353
|
+
}
|
|
354
|
+
});
|
|
355
|
+
mcpServer.tool('get-locales-for-resume', `The list of available resume locales`, {}, async (args) => {
|
|
356
|
+
try {
|
|
357
|
+
const response = await apiClient.request({
|
|
358
|
+
method: 'GET',
|
|
359
|
+
url: '/locales/resume',
|
|
360
|
+
params: args,
|
|
361
|
+
});
|
|
362
|
+
return handleResult(response.data);
|
|
363
|
+
}
|
|
364
|
+
catch (error) {
|
|
365
|
+
return handleError(error);
|
|
366
|
+
}
|
|
367
|
+
});
|
|
368
|
+
mcpServer.tool('get-locales', `The list of available locales`, {}, async (args) => {
|
|
369
|
+
try {
|
|
370
|
+
const response = await apiClient.request({
|
|
371
|
+
method: 'GET',
|
|
372
|
+
url: '/locales',
|
|
373
|
+
params: args,
|
|
374
|
+
});
|
|
375
|
+
return handleResult(response.data);
|
|
376
|
+
}
|
|
377
|
+
catch (error) {
|
|
378
|
+
return handleError(error);
|
|
379
|
+
}
|
|
380
|
+
});
|
|
381
|
+
mcpServer.tool('get-positions-suggestions', `Resume position suggestions`, {
|
|
382
|
+
text: z.string(),
|
|
383
|
+
}, async (args) => {
|
|
384
|
+
try {
|
|
385
|
+
const response = await apiClient.request({
|
|
386
|
+
method: 'GET',
|
|
387
|
+
url: '/suggests/positions',
|
|
388
|
+
params: args,
|
|
389
|
+
});
|
|
390
|
+
return handleResult(response.data);
|
|
391
|
+
}
|
|
392
|
+
catch (error) {
|
|
393
|
+
return handleError(error);
|
|
394
|
+
}
|
|
395
|
+
});
|
|
396
|
+
mcpServer.tool('get-educational-institutions-suggests', `Educational institution name suggestions`, {
|
|
397
|
+
text: z.string(),
|
|
398
|
+
}, async (args) => {
|
|
399
|
+
try {
|
|
400
|
+
const response = await apiClient.request({
|
|
401
|
+
method: 'GET',
|
|
402
|
+
url: '/suggests/educational_institutions',
|
|
403
|
+
params: args,
|
|
404
|
+
});
|
|
405
|
+
return handleResult(response.data);
|
|
406
|
+
}
|
|
407
|
+
catch (error) {
|
|
408
|
+
return handleError(error);
|
|
409
|
+
}
|
|
410
|
+
});
|
|
411
|
+
mcpServer.tool('get-area-leaves-suggests', `Suggestions for all regions that are leaves in the region tree`, {
|
|
412
|
+
text: z.string(),
|
|
413
|
+
area_id: z.string().optional(),
|
|
414
|
+
}, async (args) => {
|
|
415
|
+
try {
|
|
416
|
+
const response = await apiClient.request({
|
|
417
|
+
method: 'GET',
|
|
418
|
+
url: '/suggests/area_leaves',
|
|
419
|
+
params: args,
|
|
420
|
+
});
|
|
421
|
+
return handleResult(response.data);
|
|
422
|
+
}
|
|
423
|
+
catch (error) {
|
|
424
|
+
return handleError(error);
|
|
425
|
+
}
|
|
426
|
+
});
|
|
427
|
+
mcpServer.tool('get-skill-set-suggests', `Key skills suggestions`, {
|
|
428
|
+
text: z.string(),
|
|
429
|
+
}, async (args) => {
|
|
430
|
+
try {
|
|
431
|
+
const response = await apiClient.request({
|
|
432
|
+
method: 'GET',
|
|
433
|
+
url: '/suggests/skill_set',
|
|
434
|
+
params: args,
|
|
435
|
+
});
|
|
436
|
+
return handleResult(response.data);
|
|
437
|
+
}
|
|
438
|
+
catch (error) {
|
|
439
|
+
return handleError(error);
|
|
440
|
+
}
|
|
441
|
+
});
|
|
442
|
+
mcpServer.tool('get-vacancy-positions-suggests', `Vacancy position suggestions`, {
|
|
443
|
+
text: z.string(),
|
|
444
|
+
}, async (args) => {
|
|
445
|
+
try {
|
|
446
|
+
const response = await apiClient.request({
|
|
447
|
+
method: 'GET',
|
|
448
|
+
url: '/suggests/vacancy_positions',
|
|
449
|
+
params: args,
|
|
450
|
+
});
|
|
451
|
+
return handleResult(response.data);
|
|
452
|
+
}
|
|
453
|
+
catch (error) {
|
|
454
|
+
return handleError(error);
|
|
455
|
+
}
|
|
456
|
+
});
|
|
457
|
+
mcpServer.tool('get-professional-roles-suggests', `Professional role suggestions`, {
|
|
458
|
+
text: z.string(),
|
|
459
|
+
}, async (args) => {
|
|
460
|
+
try {
|
|
461
|
+
const response = await apiClient.request({
|
|
462
|
+
method: 'GET',
|
|
463
|
+
url: '/suggests/professional_roles',
|
|
464
|
+
params: args,
|
|
465
|
+
});
|
|
466
|
+
return handleResult(response.data);
|
|
467
|
+
}
|
|
468
|
+
catch (error) {
|
|
469
|
+
return handleError(error);
|
|
470
|
+
}
|
|
471
|
+
});
|
|
472
|
+
mcpServer.tool('get-resume-search-keywords-suggests', `Suggestions for resume search key words`, {
|
|
473
|
+
text: z.string(),
|
|
474
|
+
}, async (args) => {
|
|
475
|
+
try {
|
|
476
|
+
const response = await apiClient.request({
|
|
477
|
+
method: 'GET',
|
|
478
|
+
url: '/suggests/resume_search_keyword',
|
|
479
|
+
params: args,
|
|
480
|
+
});
|
|
481
|
+
return handleResult(response.data);
|
|
482
|
+
}
|
|
483
|
+
catch (error) {
|
|
484
|
+
return handleError(error);
|
|
485
|
+
}
|
|
486
|
+
});
|
|
487
|
+
mcpServer.tool('get-areas-suggests', `Suggestions for all regions`, {
|
|
488
|
+
text: z.string(),
|
|
489
|
+
area_id: z.string().optional(),
|
|
490
|
+
include_parent: z.string().optional(),
|
|
491
|
+
}, async (args) => {
|
|
492
|
+
try {
|
|
493
|
+
const response = await apiClient.request({
|
|
494
|
+
method: 'GET',
|
|
495
|
+
url: '/suggests/areas',
|
|
496
|
+
params: args,
|
|
497
|
+
});
|
|
498
|
+
return handleResult(response.data);
|
|
499
|
+
}
|
|
500
|
+
catch (error) {
|
|
501
|
+
return handleError(error);
|
|
502
|
+
}
|
|
503
|
+
});
|
|
504
|
+
mcpServer.tool('get-vacancy-search-keywords', `Suggestions for vacancy search key words`, {
|
|
505
|
+
text: z.string(),
|
|
506
|
+
}, async (args) => {
|
|
507
|
+
try {
|
|
508
|
+
const response = await apiClient.request({
|
|
509
|
+
method: 'GET',
|
|
510
|
+
url: '/suggests/vacancy_search_keyword',
|
|
511
|
+
params: args,
|
|
512
|
+
});
|
|
513
|
+
return handleResult(response.data);
|
|
514
|
+
}
|
|
515
|
+
catch (error) {
|
|
516
|
+
return handleError(error);
|
|
517
|
+
}
|
|
518
|
+
});
|
|
519
|
+
mcpServer.tool('get-fields-of-study-suggestions', `Specialization suggestions`, {
|
|
520
|
+
text: z.string(),
|
|
521
|
+
}, async (args) => {
|
|
522
|
+
try {
|
|
523
|
+
const response = await apiClient.request({
|
|
524
|
+
method: 'GET',
|
|
525
|
+
url: '/suggests/fields_of_study',
|
|
526
|
+
params: args,
|
|
527
|
+
});
|
|
528
|
+
return handleResult(response.data);
|
|
529
|
+
}
|
|
530
|
+
catch (error) {
|
|
531
|
+
return handleError(error);
|
|
532
|
+
}
|
|
533
|
+
});
|
|
534
|
+
mcpServer.tool('get-registered-companies-suggests', `Organization suggestions`, {
|
|
535
|
+
text: z.string(),
|
|
536
|
+
}, async (args) => {
|
|
537
|
+
try {
|
|
538
|
+
const response = await apiClient.request({
|
|
539
|
+
method: 'GET',
|
|
540
|
+
url: '/suggests/companies',
|
|
541
|
+
params: args,
|
|
542
|
+
});
|
|
543
|
+
return handleResult(response.data);
|
|
544
|
+
}
|
|
545
|
+
catch (error) {
|
|
546
|
+
return handleError(error);
|
|
547
|
+
}
|
|
548
|
+
});
|
|
549
|
+
mcpServer.tool('read-resume-profile', `Получение схемы резюме-профиля соискателя для резюме`, {
|
|
550
|
+
resume_id: z.string(),
|
|
551
|
+
}, async (args) => {
|
|
552
|
+
try {
|
|
553
|
+
const { resume_id, ...queryParams } = args;
|
|
554
|
+
const url = `/resume_profile/${resume_id}`;
|
|
555
|
+
const response = await apiClient.request({
|
|
556
|
+
method: 'GET',
|
|
557
|
+
url: url,
|
|
558
|
+
params: queryParams,
|
|
559
|
+
});
|
|
560
|
+
return handleResult(response.data);
|
|
561
|
+
}
|
|
562
|
+
catch (error) {
|
|
563
|
+
return handleError(error);
|
|
564
|
+
}
|
|
565
|
+
});
|
|
566
|
+
mcpServer.tool('update-resume-profile', `Обновление резюме-профиля соискателя`, {
|
|
567
|
+
resume_id: z.string(),
|
|
568
|
+
}, async (args) => {
|
|
569
|
+
try {
|
|
570
|
+
const { resume_id, ...requestData } = args;
|
|
571
|
+
const url = `/resume_profile/${resume_id}`;
|
|
572
|
+
const response = await apiClient.request({
|
|
573
|
+
method: 'PUT',
|
|
574
|
+
url: url,
|
|
575
|
+
data: requestData,
|
|
576
|
+
});
|
|
577
|
+
return handleResult(response.data);
|
|
578
|
+
}
|
|
579
|
+
catch (error) {
|
|
580
|
+
return handleError(error);
|
|
581
|
+
}
|
|
582
|
+
});
|
|
583
|
+
mcpServer.tool('create-resume-profile', `Создание резюме-профиля соискателя`, {}, async (args) => {
|
|
584
|
+
try {
|
|
585
|
+
const response = await apiClient.request({
|
|
586
|
+
method: 'POST',
|
|
587
|
+
url: '/resume_profile',
|
|
588
|
+
data: args,
|
|
589
|
+
});
|
|
590
|
+
return handleResult(response.data);
|
|
591
|
+
}
|
|
592
|
+
catch (error) {
|
|
593
|
+
return handleError(error);
|
|
594
|
+
}
|
|
595
|
+
});
|
|
596
|
+
mcpServer.tool('get-resume-profile-dictionaries', `Получение cловарей резюме-профиля`, {}, async (args) => {
|
|
597
|
+
try {
|
|
598
|
+
const response = await apiClient.request({
|
|
599
|
+
method: 'GET',
|
|
600
|
+
url: '/resume_profile/dictionaries',
|
|
601
|
+
params: args,
|
|
602
|
+
});
|
|
603
|
+
return handleResult(response.data);
|
|
604
|
+
}
|
|
605
|
+
catch (error) {
|
|
606
|
+
return handleError(error);
|
|
607
|
+
}
|
|
608
|
+
});
|
|
609
|
+
mcpServer.tool('get-payable-api-actions', `Information about active API services for payable methods`, {
|
|
610
|
+
employer_id: z.string(),
|
|
611
|
+
}, async (args) => {
|
|
612
|
+
try {
|
|
613
|
+
const { employer_id, ...queryParams } = args;
|
|
614
|
+
const url = `/employers/${employer_id}/services/payable_api_actions/active`;
|
|
615
|
+
const response = await apiClient.request({
|
|
616
|
+
method: 'GET',
|
|
617
|
+
url: url,
|
|
618
|
+
params: queryParams,
|
|
619
|
+
});
|
|
620
|
+
return handleResult(response.data);
|
|
621
|
+
}
|
|
622
|
+
catch (error) {
|
|
623
|
+
return handleError(error);
|
|
624
|
+
}
|
|
625
|
+
});
|
|
626
|
+
mcpServer.tool('get-payable-api-method-access', `Checking access to the paid methods`, {
|
|
627
|
+
employer_id: z.string(),
|
|
628
|
+
manager_id: z.string(),
|
|
629
|
+
}, async (args) => {
|
|
630
|
+
try {
|
|
631
|
+
const { employer_id, manager_id, ...queryParams } = args;
|
|
632
|
+
const url = `/employers/${employer_id}/managers/${manager_id}/method_access`;
|
|
633
|
+
const response = await apiClient.request({
|
|
634
|
+
method: 'GET',
|
|
635
|
+
url: url,
|
|
636
|
+
params: queryParams,
|
|
637
|
+
});
|
|
638
|
+
return handleResult(response.data);
|
|
639
|
+
}
|
|
640
|
+
catch (error) {
|
|
641
|
+
return handleError(error);
|
|
642
|
+
}
|
|
643
|
+
});
|
|
644
|
+
mcpServer.tool('get-saved-vacancy-searches', `List of saved vacancy searches`, {
|
|
645
|
+
page: z.string().optional(),
|
|
646
|
+
per_page: z.string().optional(),
|
|
647
|
+
}, async (args) => {
|
|
648
|
+
try {
|
|
649
|
+
const response = await apiClient.request({
|
|
650
|
+
method: 'GET',
|
|
651
|
+
url: '/saved_searches/vacancies',
|
|
652
|
+
params: args,
|
|
653
|
+
});
|
|
654
|
+
return handleResult(response.data);
|
|
655
|
+
}
|
|
656
|
+
catch (error) {
|
|
657
|
+
return handleError(error);
|
|
658
|
+
}
|
|
659
|
+
});
|
|
660
|
+
mcpServer.tool('create-saved-vacancy-search', `Creating new saved vacancy search`, {
|
|
661
|
+
page: z.string().optional(),
|
|
662
|
+
per_page: z.string().optional(),
|
|
663
|
+
text: z.string().optional(),
|
|
664
|
+
name: z.string().optional(),
|
|
665
|
+
search_field: z.string().optional(),
|
|
666
|
+
experience: z.string().optional(),
|
|
667
|
+
employment: z.string().optional(),
|
|
668
|
+
schedule: z.string().optional(),
|
|
669
|
+
area: z.string().optional(),
|
|
670
|
+
metro: z.string().optional(),
|
|
671
|
+
professional_role: z.string().optional(),
|
|
672
|
+
industry: z.string().optional(),
|
|
673
|
+
employer_id: z.string().optional(),
|
|
674
|
+
currency: z.string().optional(),
|
|
675
|
+
salary: z.string().optional(),
|
|
676
|
+
label: z.string().optional(),
|
|
677
|
+
only_with_salary: z.string().optional(),
|
|
678
|
+
period: z.string().optional(),
|
|
679
|
+
date_from: z.string().optional(),
|
|
680
|
+
date_to: z.string().optional(),
|
|
681
|
+
top_lat: z.string().optional(),
|
|
682
|
+
bottom_lat: z.string().optional(),
|
|
683
|
+
left_lng: z.string().optional(),
|
|
684
|
+
right_lng: z.string().optional(),
|
|
685
|
+
order_by: z.string().optional(),
|
|
686
|
+
sort_point_lat: z.string().optional(),
|
|
687
|
+
sort_point_lng: z.string().optional(),
|
|
688
|
+
clusters: z.string().optional(),
|
|
689
|
+
describe_arguments: z.string().optional(),
|
|
690
|
+
no_magic: z.string().optional(),
|
|
691
|
+
premium: z.string().optional(),
|
|
692
|
+
responses_count_enabled: z.string().optional(),
|
|
693
|
+
part_time: z.string().optional(),
|
|
694
|
+
}, async (args) => {
|
|
695
|
+
try {
|
|
696
|
+
const response = await apiClient.request({
|
|
697
|
+
method: 'POST',
|
|
698
|
+
url: '/saved_searches/vacancies',
|
|
699
|
+
data: args,
|
|
700
|
+
});
|
|
701
|
+
return handleResult(response.data);
|
|
702
|
+
}
|
|
703
|
+
catch (error) {
|
|
704
|
+
return handleError(error);
|
|
705
|
+
}
|
|
706
|
+
});
|
|
707
|
+
mcpServer.tool('get-vacancy-visitors', `Vacancy visitors`, {
|
|
708
|
+
vacancy_id: z.string(),
|
|
709
|
+
page: z.string().optional(),
|
|
710
|
+
per_page: z.string().optional(),
|
|
711
|
+
}, async (args) => {
|
|
712
|
+
try {
|
|
713
|
+
const { vacancy_id, ...queryParams } = args;
|
|
714
|
+
const url = `/vacancies/${vacancy_id}/visitors`;
|
|
715
|
+
const response = await apiClient.request({
|
|
716
|
+
method: 'GET',
|
|
717
|
+
url: url,
|
|
718
|
+
params: queryParams,
|
|
719
|
+
});
|
|
720
|
+
return handleResult(response.data);
|
|
721
|
+
}
|
|
722
|
+
catch (error) {
|
|
723
|
+
return handleError(error);
|
|
724
|
+
}
|
|
725
|
+
});
|
|
726
|
+
mcpServer.tool('get-vacancy', `View a vacancy`, {
|
|
727
|
+
vacancy_id: z.string(),
|
|
728
|
+
}, async (args) => {
|
|
729
|
+
try {
|
|
730
|
+
const { vacancy_id, ...queryParams } = args;
|
|
731
|
+
const url = `/vacancies/${vacancy_id}`;
|
|
732
|
+
const response = await apiClient.request({
|
|
733
|
+
method: 'GET',
|
|
734
|
+
url: url,
|
|
735
|
+
params: queryParams,
|
|
736
|
+
});
|
|
737
|
+
return handleResult(response.data);
|
|
738
|
+
}
|
|
739
|
+
catch (error) {
|
|
740
|
+
return handleError(error);
|
|
741
|
+
}
|
|
742
|
+
});
|
|
743
|
+
mcpServer.tool('edit-vacancy', `Editing vacancies`, {
|
|
744
|
+
vacancy_id: z.string(),
|
|
745
|
+
ignore_duplicates: z.string().optional(),
|
|
746
|
+
ignore_replacement_warning: z.string().optional(),
|
|
747
|
+
}, async (args) => {
|
|
748
|
+
try {
|
|
749
|
+
const { vacancy_id, ...requestData } = args;
|
|
750
|
+
const url = `/vacancies/${vacancy_id}`;
|
|
751
|
+
const response = await apiClient.request({
|
|
752
|
+
method: 'PUT',
|
|
753
|
+
url: url,
|
|
754
|
+
data: requestData,
|
|
755
|
+
});
|
|
756
|
+
return handleResult(response.data);
|
|
757
|
+
}
|
|
758
|
+
catch (error) {
|
|
759
|
+
return handleError(error);
|
|
760
|
+
}
|
|
761
|
+
});
|
|
762
|
+
mcpServer.tool('get-blacklisted-vacancies', `List of hidden vacancies`, {}, async (args) => {
|
|
763
|
+
try {
|
|
764
|
+
const response = await apiClient.request({
|
|
765
|
+
method: 'GET',
|
|
766
|
+
url: '/vacancies/blacklisted',
|
|
767
|
+
params: args,
|
|
768
|
+
});
|
|
769
|
+
return handleResult(response.data);
|
|
770
|
+
}
|
|
771
|
+
catch (error) {
|
|
772
|
+
return handleError(error);
|
|
773
|
+
}
|
|
774
|
+
});
|
|
775
|
+
mcpServer.tool('publish-vacancy', `Publishing job vacancies`, {
|
|
776
|
+
ignore_duplicates: z.string().optional(),
|
|
777
|
+
}, async (args) => {
|
|
778
|
+
try {
|
|
779
|
+
const response = await apiClient.request({
|
|
780
|
+
method: 'POST',
|
|
781
|
+
url: '/vacancies',
|
|
782
|
+
data: args,
|
|
783
|
+
});
|
|
784
|
+
return handleResult(response.data);
|
|
785
|
+
}
|
|
786
|
+
catch (error) {
|
|
787
|
+
return handleError(error);
|
|
788
|
+
}
|
|
789
|
+
});
|
|
790
|
+
mcpServer.tool('get-vacancies', `Search for vacancies`, {
|
|
791
|
+
page: z.string().optional(),
|
|
792
|
+
per_page: z.string().optional(),
|
|
793
|
+
text: z.string().optional(),
|
|
794
|
+
search_field: z.string().optional(),
|
|
795
|
+
experience: z.string().optional(),
|
|
796
|
+
employment: z.string().optional(),
|
|
797
|
+
schedule: z.string().optional(),
|
|
798
|
+
area: z.string().optional(),
|
|
799
|
+
metro: z.string().optional(),
|
|
800
|
+
professional_role: z.string().optional(),
|
|
801
|
+
industry: z.string().optional(),
|
|
802
|
+
employer_id: z.string().optional(),
|
|
803
|
+
currency: z.string().optional(),
|
|
804
|
+
salary: z.string().optional(),
|
|
805
|
+
label: z.string().optional(),
|
|
806
|
+
only_with_salary: z.string().optional(),
|
|
807
|
+
period: z.string().optional(),
|
|
808
|
+
date_from: z.string().optional(),
|
|
809
|
+
date_to: z.string().optional(),
|
|
810
|
+
top_lat: z.string().optional(),
|
|
811
|
+
bottom_lat: z.string().optional(),
|
|
812
|
+
left_lng: z.string().optional(),
|
|
813
|
+
right_lng: z.string().optional(),
|
|
814
|
+
order_by: z.string().optional(),
|
|
815
|
+
sort_point_lat: z.string().optional(),
|
|
816
|
+
sort_point_lng: z.string().optional(),
|
|
817
|
+
clusters: z.string().optional(),
|
|
818
|
+
describe_arguments: z.string().optional(),
|
|
819
|
+
no_magic: z.string().optional(),
|
|
820
|
+
premium: z.string().optional(),
|
|
821
|
+
responses_count_enabled: z.string().optional(),
|
|
822
|
+
part_time: z.string().optional(),
|
|
823
|
+
accept_temporary: z.string().optional(),
|
|
824
|
+
employment_form: z.string().optional(),
|
|
825
|
+
work_schedule_by_days: z.string().optional(),
|
|
826
|
+
working_hours: z.string().optional(),
|
|
827
|
+
work_format: z.string().optional(),
|
|
828
|
+
excluded_text: z.string().optional(),
|
|
829
|
+
education: z.string().optional(),
|
|
830
|
+
}, async (args) => {
|
|
831
|
+
try {
|
|
832
|
+
const response = await apiClient.request({
|
|
833
|
+
method: 'GET',
|
|
834
|
+
url: '/vacancies',
|
|
835
|
+
params: args,
|
|
836
|
+
});
|
|
837
|
+
return handleResult(response.data);
|
|
838
|
+
}
|
|
839
|
+
catch (error) {
|
|
840
|
+
return handleError(error);
|
|
841
|
+
}
|
|
842
|
+
});
|
|
843
|
+
mcpServer.tool('get-vacancies-related-to-vacancy', `Search for vacancies related to a vacancy`, {
|
|
844
|
+
vacancy_id: z.string(),
|
|
845
|
+
page: z.string().optional(),
|
|
846
|
+
per_page: z.string().optional(),
|
|
847
|
+
text: z.string().optional(),
|
|
848
|
+
search_field: z.string().optional(),
|
|
849
|
+
experience: z.string().optional(),
|
|
850
|
+
employment: z.string().optional(),
|
|
851
|
+
schedule: z.string().optional(),
|
|
852
|
+
area: z.string().optional(),
|
|
853
|
+
metro: z.string().optional(),
|
|
854
|
+
professional_role: z.string().optional(),
|
|
855
|
+
industry: z.string().optional(),
|
|
856
|
+
employer_id: z.string().optional(),
|
|
857
|
+
excluded_employer_id: z.string().optional(),
|
|
858
|
+
currency: z.string().optional(),
|
|
859
|
+
salary: z.string().optional(),
|
|
860
|
+
label: z.string().optional(),
|
|
861
|
+
only_with_salary: z.string().optional(),
|
|
862
|
+
period: z.string().optional(),
|
|
863
|
+
date_from: z.string().optional(),
|
|
864
|
+
date_to: z.string().optional(),
|
|
865
|
+
top_lat: z.string().optional(),
|
|
866
|
+
bottom_lat: z.string().optional(),
|
|
867
|
+
left_lng: z.string().optional(),
|
|
868
|
+
right_lng: z.string().optional(),
|
|
869
|
+
order_by: z.string().optional(),
|
|
870
|
+
sort_point_lat: z.string().optional(),
|
|
871
|
+
sort_point_lng: z.string().optional(),
|
|
872
|
+
clusters: z.string().optional(),
|
|
873
|
+
describe_arguments: z.string().optional(),
|
|
874
|
+
no_magic: z.string().optional(),
|
|
875
|
+
premium: z.string().optional(),
|
|
876
|
+
responses_count_enabled: z.string().optional(),
|
|
877
|
+
part_time: z.string().optional(),
|
|
878
|
+
}, async (args) => {
|
|
879
|
+
try {
|
|
880
|
+
const { vacancy_id, ...queryParams } = args;
|
|
881
|
+
const url = `/vacancies/${vacancy_id}/related_vacancies`;
|
|
882
|
+
const response = await apiClient.request({
|
|
883
|
+
method: 'GET',
|
|
884
|
+
url: url,
|
|
885
|
+
params: queryParams,
|
|
886
|
+
});
|
|
887
|
+
return handleResult(response.data);
|
|
888
|
+
}
|
|
889
|
+
catch (error) {
|
|
890
|
+
return handleError(error);
|
|
891
|
+
}
|
|
892
|
+
});
|
|
893
|
+
mcpServer.tool('get-saved-vacancy-search', `Obtaining single saved vacancy search`, {
|
|
894
|
+
id: z.string(),
|
|
895
|
+
}, async (args) => {
|
|
896
|
+
try {
|
|
897
|
+
const { id, ...queryParams } = args;
|
|
898
|
+
const url = `/saved_searches/vacancies/${id}`;
|
|
899
|
+
const response = await apiClient.request({
|
|
900
|
+
method: 'GET',
|
|
901
|
+
url: url,
|
|
902
|
+
params: queryParams,
|
|
903
|
+
});
|
|
904
|
+
return handleResult(response.data);
|
|
905
|
+
}
|
|
906
|
+
catch (error) {
|
|
907
|
+
return handleError(error);
|
|
908
|
+
}
|
|
909
|
+
});
|
|
910
|
+
mcpServer.tool('update-saved-vacancy-search', `Updating saved vacancy search`, {
|
|
911
|
+
id: z.string(),
|
|
912
|
+
name: z.string().optional(),
|
|
913
|
+
subscription: z.string().optional(),
|
|
914
|
+
}, async (args) => {
|
|
915
|
+
try {
|
|
916
|
+
const { id, ...requestData } = args;
|
|
917
|
+
const url = `/saved_searches/vacancies/${id}`;
|
|
918
|
+
const response = await apiClient.request({
|
|
919
|
+
method: 'PUT',
|
|
920
|
+
url: url,
|
|
921
|
+
data: requestData,
|
|
922
|
+
});
|
|
923
|
+
return handleResult(response.data);
|
|
924
|
+
}
|
|
925
|
+
catch (error) {
|
|
926
|
+
return handleError(error);
|
|
927
|
+
}
|
|
928
|
+
});
|
|
929
|
+
mcpServer.tool('delete-saved-vacancy-search', `Deleting saved vacancy search`, {
|
|
930
|
+
id: z.string(),
|
|
931
|
+
}, async (args) => {
|
|
932
|
+
try {
|
|
933
|
+
const { id, ...queryParams } = args;
|
|
934
|
+
const url = `/saved_searches/vacancies/${id}`;
|
|
935
|
+
const response = await apiClient.request({
|
|
936
|
+
method: 'DELETE',
|
|
937
|
+
url: url,
|
|
938
|
+
params: queryParams,
|
|
939
|
+
});
|
|
940
|
+
return handleResult(response.data);
|
|
941
|
+
}
|
|
942
|
+
catch (error) {
|
|
943
|
+
return handleError(error);
|
|
944
|
+
}
|
|
945
|
+
});
|
|
946
|
+
mcpServer.tool('get-vacancies-similar-to-vacancy', `Search for vacancies similar to a vacancy`, {
|
|
947
|
+
vacancy_id: z.string(),
|
|
948
|
+
page: z.string().optional(),
|
|
949
|
+
per_page: z.string().optional(),
|
|
950
|
+
text: z.string().optional(),
|
|
951
|
+
search_field: z.string().optional(),
|
|
952
|
+
experience: z.string().optional(),
|
|
953
|
+
employment: z.string().optional(),
|
|
954
|
+
schedule: z.string().optional(),
|
|
955
|
+
area: z.string().optional(),
|
|
956
|
+
metro: z.string().optional(),
|
|
957
|
+
professional_role: z.string().optional(),
|
|
958
|
+
industry: z.string().optional(),
|
|
959
|
+
employer_id: z.string().optional(),
|
|
960
|
+
excluded_employer_id: z.string().optional(),
|
|
961
|
+
currency: z.string().optional(),
|
|
962
|
+
salary: z.string().optional(),
|
|
963
|
+
label: z.string().optional(),
|
|
964
|
+
only_with_salary: z.string().optional(),
|
|
965
|
+
period: z.string().optional(),
|
|
966
|
+
date_from: z.string().optional(),
|
|
967
|
+
date_to: z.string().optional(),
|
|
968
|
+
top_lat: z.string().optional(),
|
|
969
|
+
bottom_lat: z.string().optional(),
|
|
970
|
+
left_lng: z.string().optional(),
|
|
971
|
+
right_lng: z.string().optional(),
|
|
972
|
+
order_by: z.string().optional(),
|
|
973
|
+
sort_point_lat: z.string().optional(),
|
|
974
|
+
sort_point_lng: z.string().optional(),
|
|
975
|
+
clusters: z.string().optional(),
|
|
976
|
+
describe_arguments: z.string().optional(),
|
|
977
|
+
no_magic: z.string().optional(),
|
|
978
|
+
premium: z.string().optional(),
|
|
979
|
+
responses_count_enabled: z.string().optional(),
|
|
980
|
+
part_time: z.string().optional(),
|
|
981
|
+
}, async (args) => {
|
|
982
|
+
try {
|
|
983
|
+
const { vacancy_id, ...queryParams } = args;
|
|
984
|
+
const url = `/vacancies/${vacancy_id}/similar_vacancies`;
|
|
985
|
+
const response = await apiClient.request({
|
|
986
|
+
method: 'GET',
|
|
987
|
+
url: url,
|
|
988
|
+
params: queryParams,
|
|
989
|
+
});
|
|
990
|
+
return handleResult(response.data);
|
|
991
|
+
}
|
|
992
|
+
catch (error) {
|
|
993
|
+
return handleError(error);
|
|
994
|
+
}
|
|
995
|
+
});
|
|
996
|
+
mcpServer.tool('get-vacancy-upgrade-list', `List of vacancy upgrades`, {
|
|
997
|
+
vacancy_id: z.string(),
|
|
998
|
+
}, async (args) => {
|
|
999
|
+
try {
|
|
1000
|
+
const { vacancy_id, ...queryParams } = args;
|
|
1001
|
+
const url = `/vacancies/${vacancy_id}/upgrades`;
|
|
1002
|
+
const response = await apiClient.request({
|
|
1003
|
+
method: 'GET',
|
|
1004
|
+
url: url,
|
|
1005
|
+
params: queryParams,
|
|
1006
|
+
});
|
|
1007
|
+
return handleResult(response.data);
|
|
1008
|
+
}
|
|
1009
|
+
catch (error) {
|
|
1010
|
+
return handleError(error);
|
|
1011
|
+
}
|
|
1012
|
+
});
|
|
1013
|
+
mcpServer.tool('get-vacancies-similar-to-resume', `Search for vacancies similar to a resume`, {
|
|
1014
|
+
resume_id: z.string(),
|
|
1015
|
+
page: z.string().optional(),
|
|
1016
|
+
per_page: z.string().optional(),
|
|
1017
|
+
text: z.string().optional(),
|
|
1018
|
+
search_field: z.string().optional(),
|
|
1019
|
+
experience: z.string().optional(),
|
|
1020
|
+
employment: z.string().optional(),
|
|
1021
|
+
schedule: z.string().optional(),
|
|
1022
|
+
area: z.string().optional(),
|
|
1023
|
+
metro: z.string().optional(),
|
|
1024
|
+
professional_role: z.string().optional(),
|
|
1025
|
+
industry: z.string().optional(),
|
|
1026
|
+
employer_id: z.string().optional(),
|
|
1027
|
+
excluded_employer_id: z.string().optional(),
|
|
1028
|
+
currency: z.string().optional(),
|
|
1029
|
+
salary: z.string().optional(),
|
|
1030
|
+
label: z.string().optional(),
|
|
1031
|
+
only_with_salary: z.string().optional(),
|
|
1032
|
+
period: z.string().optional(),
|
|
1033
|
+
date_from: z.string().optional(),
|
|
1034
|
+
date_to: z.string().optional(),
|
|
1035
|
+
top_lat: z.string().optional(),
|
|
1036
|
+
bottom_lat: z.string().optional(),
|
|
1037
|
+
left_lng: z.string().optional(),
|
|
1038
|
+
right_lng: z.string().optional(),
|
|
1039
|
+
order_by: z.string().optional(),
|
|
1040
|
+
sort_point_lat: z.string().optional(),
|
|
1041
|
+
sort_point_lng: z.string().optional(),
|
|
1042
|
+
clusters: z.string().optional(),
|
|
1043
|
+
describe_arguments: z.string().optional(),
|
|
1044
|
+
no_magic: z.string().optional(),
|
|
1045
|
+
premium: z.string().optional(),
|
|
1046
|
+
responses_count_enabled: z.string().optional(),
|
|
1047
|
+
part_time: z.string().optional(),
|
|
1048
|
+
}, async (args) => {
|
|
1049
|
+
try {
|
|
1050
|
+
const { resume_id, ...queryParams } = args;
|
|
1051
|
+
const url = `/resumes/${resume_id}/similar_vacancies`;
|
|
1052
|
+
const response = await apiClient.request({
|
|
1053
|
+
method: 'GET',
|
|
1054
|
+
url: url,
|
|
1055
|
+
params: queryParams,
|
|
1056
|
+
});
|
|
1057
|
+
return handleResult(response.data);
|
|
1058
|
+
}
|
|
1059
|
+
catch (error) {
|
|
1060
|
+
return handleError(error);
|
|
1061
|
+
}
|
|
1062
|
+
});
|
|
1063
|
+
mcpServer.tool('get-favorite-vacancies', `List of favorited vacancies`, {
|
|
1064
|
+
page: z.string().optional(),
|
|
1065
|
+
per_page: z.string().optional(),
|
|
1066
|
+
}, async (args) => {
|
|
1067
|
+
try {
|
|
1068
|
+
const response = await apiClient.request({
|
|
1069
|
+
method: 'GET',
|
|
1070
|
+
url: '/vacancies/favorited',
|
|
1071
|
+
params: args,
|
|
1072
|
+
});
|
|
1073
|
+
return handleResult(response.data);
|
|
1074
|
+
}
|
|
1075
|
+
catch (error) {
|
|
1076
|
+
return handleError(error);
|
|
1077
|
+
}
|
|
1078
|
+
});
|
|
1079
|
+
mcpServer.tool('add-vacancy-to-blacklisted', `Adding a vacancy in the blacklist`, {
|
|
1080
|
+
vacancy_id: z.string(),
|
|
1081
|
+
}, async (args) => {
|
|
1082
|
+
try {
|
|
1083
|
+
const { vacancy_id, ...requestData } = args;
|
|
1084
|
+
const url = `/vacancies/blacklisted/${vacancy_id}`;
|
|
1085
|
+
const response = await apiClient.request({
|
|
1086
|
+
method: 'PUT',
|
|
1087
|
+
url: url,
|
|
1088
|
+
data: requestData,
|
|
1089
|
+
});
|
|
1090
|
+
return handleResult(response.data);
|
|
1091
|
+
}
|
|
1092
|
+
catch (error) {
|
|
1093
|
+
return handleError(error);
|
|
1094
|
+
}
|
|
1095
|
+
});
|
|
1096
|
+
mcpServer.tool('delete-vacancy-from-blacklisted', `Deleting a vacancy from the blacklist`, {
|
|
1097
|
+
vacancy_id: z.string(),
|
|
1098
|
+
}, async (args) => {
|
|
1099
|
+
try {
|
|
1100
|
+
const { vacancy_id, ...queryParams } = args;
|
|
1101
|
+
const url = `/vacancies/blacklisted/${vacancy_id}`;
|
|
1102
|
+
const response = await apiClient.request({
|
|
1103
|
+
method: 'DELETE',
|
|
1104
|
+
url: url,
|
|
1105
|
+
params: queryParams,
|
|
1106
|
+
});
|
|
1107
|
+
return handleResult(response.data);
|
|
1108
|
+
}
|
|
1109
|
+
catch (error) {
|
|
1110
|
+
return handleError(error);
|
|
1111
|
+
}
|
|
1112
|
+
});
|
|
1113
|
+
mcpServer.tool('get-active-vacancy-list', `View a published vacancy list`, {
|
|
1114
|
+
employer_id: z.string(),
|
|
1115
|
+
page: z.string().optional(),
|
|
1116
|
+
per_page: z.string().optional(),
|
|
1117
|
+
manager_id: z.string().optional(),
|
|
1118
|
+
text: z.string().optional(),
|
|
1119
|
+
area: z.string().optional(),
|
|
1120
|
+
resume_id: z.string().optional(),
|
|
1121
|
+
order_by: z.string().optional(),
|
|
1122
|
+
}, async (args) => {
|
|
1123
|
+
try {
|
|
1124
|
+
const { employer_id, ...queryParams } = args;
|
|
1125
|
+
const url = `/employers/${employer_id}/vacancies/active`;
|
|
1126
|
+
const response = await apiClient.request({
|
|
1127
|
+
method: 'GET',
|
|
1128
|
+
url: url,
|
|
1129
|
+
params: queryParams,
|
|
1130
|
+
});
|
|
1131
|
+
return handleResult(response.data);
|
|
1132
|
+
}
|
|
1133
|
+
catch (error) {
|
|
1134
|
+
return handleError(error);
|
|
1135
|
+
}
|
|
1136
|
+
});
|
|
1137
|
+
mcpServer.tool('get-hidden-vacancies', `Deleted vacancy list`, {
|
|
1138
|
+
employer_id: z.string(),
|
|
1139
|
+
manager_id: z.string().optional(),
|
|
1140
|
+
order_by: z.string().optional(),
|
|
1141
|
+
per_page: z.string().optional(),
|
|
1142
|
+
page: z.string().optional(),
|
|
1143
|
+
}, async (args) => {
|
|
1144
|
+
try {
|
|
1145
|
+
const { employer_id, ...queryParams } = args;
|
|
1146
|
+
const url = `/employers/${employer_id}/vacancies/hidden`;
|
|
1147
|
+
const response = await apiClient.request({
|
|
1148
|
+
method: 'GET',
|
|
1149
|
+
url: url,
|
|
1150
|
+
params: queryParams,
|
|
1151
|
+
});
|
|
1152
|
+
return handleResult(response.data);
|
|
1153
|
+
}
|
|
1154
|
+
catch (error) {
|
|
1155
|
+
return handleError(error);
|
|
1156
|
+
}
|
|
1157
|
+
});
|
|
1158
|
+
mcpServer.tool('add-vacancy-to-hidden', `Deleting vacancies`, {
|
|
1159
|
+
employer_id: z.string(),
|
|
1160
|
+
vacancy_id: z.string(),
|
|
1161
|
+
}, async (args) => {
|
|
1162
|
+
try {
|
|
1163
|
+
const { employer_id, vacancy_id, ...requestData } = args;
|
|
1164
|
+
const url = `/employers/${employer_id}/vacancies/hidden/${vacancy_id}`;
|
|
1165
|
+
const response = await apiClient.request({
|
|
1166
|
+
method: 'PUT',
|
|
1167
|
+
url: url,
|
|
1168
|
+
data: requestData,
|
|
1169
|
+
});
|
|
1170
|
+
return handleResult(response.data);
|
|
1171
|
+
}
|
|
1172
|
+
catch (error) {
|
|
1173
|
+
return handleError(error);
|
|
1174
|
+
}
|
|
1175
|
+
});
|
|
1176
|
+
mcpServer.tool('restore-vacancy-from-hidden', `Restoring deleted vacancies`, {
|
|
1177
|
+
employer_id: z.string(),
|
|
1178
|
+
vacancy_id: z.string(),
|
|
1179
|
+
}, async (args) => {
|
|
1180
|
+
try {
|
|
1181
|
+
const { employer_id, vacancy_id, ...queryParams } = args;
|
|
1182
|
+
const url = `/employers/${employer_id}/vacancies/hidden/${vacancy_id}`;
|
|
1183
|
+
const response = await apiClient.request({
|
|
1184
|
+
method: 'DELETE',
|
|
1185
|
+
url: url,
|
|
1186
|
+
params: queryParams,
|
|
1187
|
+
});
|
|
1188
|
+
return handleResult(response.data);
|
|
1189
|
+
}
|
|
1190
|
+
catch (error) {
|
|
1191
|
+
return handleError(error);
|
|
1192
|
+
}
|
|
1193
|
+
});
|
|
1194
|
+
mcpServer.tool('get-vacancy-conditions', `Conditions for filling out fields when publishing and editing vacancies`, {}, async (args) => {
|
|
1195
|
+
try {
|
|
1196
|
+
const response = await apiClient.request({
|
|
1197
|
+
method: 'GET',
|
|
1198
|
+
url: '/vacancy_conditions',
|
|
1199
|
+
params: args,
|
|
1200
|
+
});
|
|
1201
|
+
return handleResult(response.data);
|
|
1202
|
+
}
|
|
1203
|
+
catch (error) {
|
|
1204
|
+
return handleError(error);
|
|
1205
|
+
}
|
|
1206
|
+
});
|
|
1207
|
+
mcpServer.tool('get-prolongation-vacancy-info', `Information about vacancy prolongation possibility`, {
|
|
1208
|
+
vacancy_id: z.string(),
|
|
1209
|
+
}, async (args) => {
|
|
1210
|
+
try {
|
|
1211
|
+
const { vacancy_id, ...queryParams } = args;
|
|
1212
|
+
const url = `/vacancies/${vacancy_id}/prolongate`;
|
|
1213
|
+
const response = await apiClient.request({
|
|
1214
|
+
method: 'GET',
|
|
1215
|
+
url: url,
|
|
1216
|
+
params: queryParams,
|
|
1217
|
+
});
|
|
1218
|
+
return handleResult(response.data);
|
|
1219
|
+
}
|
|
1220
|
+
catch (error) {
|
|
1221
|
+
return handleError(error);
|
|
1222
|
+
}
|
|
1223
|
+
});
|
|
1224
|
+
mcpServer.tool('vacancy-prolongation', `Vacancy prolongation`, {
|
|
1225
|
+
vacancy_id: z.string(),
|
|
1226
|
+
}, async (args) => {
|
|
1227
|
+
try {
|
|
1228
|
+
const { vacancy_id, ...requestData } = args;
|
|
1229
|
+
const url = `/vacancies/${vacancy_id}/prolongate`;
|
|
1230
|
+
const response = await apiClient.request({
|
|
1231
|
+
method: 'POST',
|
|
1232
|
+
url: url,
|
|
1233
|
+
data: requestData,
|
|
1234
|
+
});
|
|
1235
|
+
return handleResult(response.data);
|
|
1236
|
+
}
|
|
1237
|
+
catch (error) {
|
|
1238
|
+
return handleError(error);
|
|
1239
|
+
}
|
|
1240
|
+
});
|
|
1241
|
+
mcpServer.tool('add-vacancy-to-archive', `Archiving vacancies`, {
|
|
1242
|
+
employer_id: z.string(),
|
|
1243
|
+
vacancy_id: z.string(),
|
|
1244
|
+
}, async (args) => {
|
|
1245
|
+
try {
|
|
1246
|
+
const { employer_id, vacancy_id, ...requestData } = args;
|
|
1247
|
+
const url = `/employers/${employer_id}/vacancies/archived/${vacancy_id}`;
|
|
1248
|
+
const response = await apiClient.request({
|
|
1249
|
+
method: 'PUT',
|
|
1250
|
+
url: url,
|
|
1251
|
+
data: requestData,
|
|
1252
|
+
});
|
|
1253
|
+
return handleResult(response.data);
|
|
1254
|
+
}
|
|
1255
|
+
catch (error) {
|
|
1256
|
+
return handleError(error);
|
|
1257
|
+
}
|
|
1258
|
+
});
|
|
1259
|
+
mcpServer.tool('get-pref-negotiations-order', `Viewing preferred options for sorting responses`, {
|
|
1260
|
+
id: z.string(),
|
|
1261
|
+
}, async (args) => {
|
|
1262
|
+
try {
|
|
1263
|
+
const { id, ...queryParams } = args;
|
|
1264
|
+
const url = `/vacancies/${id}/preferred_negotiations_order`;
|
|
1265
|
+
const response = await apiClient.request({
|
|
1266
|
+
method: 'GET',
|
|
1267
|
+
url: url,
|
|
1268
|
+
params: queryParams,
|
|
1269
|
+
});
|
|
1270
|
+
return handleResult(response.data);
|
|
1271
|
+
}
|
|
1272
|
+
catch (error) {
|
|
1273
|
+
return handleError(error);
|
|
1274
|
+
}
|
|
1275
|
+
});
|
|
1276
|
+
mcpServer.tool('put-pref-negotiations-order', `Changing preferred options for sorting responses`, {
|
|
1277
|
+
id: z.string(),
|
|
1278
|
+
}, async (args) => {
|
|
1279
|
+
try {
|
|
1280
|
+
const { id, ...requestData } = args;
|
|
1281
|
+
const url = `/vacancies/${id}/preferred_negotiations_order`;
|
|
1282
|
+
const response = await apiClient.request({
|
|
1283
|
+
method: 'PUT',
|
|
1284
|
+
url: url,
|
|
1285
|
+
data: requestData,
|
|
1286
|
+
});
|
|
1287
|
+
return handleResult(response.data);
|
|
1288
|
+
}
|
|
1289
|
+
catch (error) {
|
|
1290
|
+
return handleError(error);
|
|
1291
|
+
}
|
|
1292
|
+
});
|
|
1293
|
+
mcpServer.tool('add-vacancy-to-favorite', `Add a vacancy in favorited`, {
|
|
1294
|
+
vacancy_id: z.string(),
|
|
1295
|
+
}, async (args) => {
|
|
1296
|
+
try {
|
|
1297
|
+
const { vacancy_id, ...requestData } = args;
|
|
1298
|
+
const url = `/vacancies/favorited/${vacancy_id}`;
|
|
1299
|
+
const response = await apiClient.request({
|
|
1300
|
+
method: 'PUT',
|
|
1301
|
+
url: url,
|
|
1302
|
+
data: requestData,
|
|
1303
|
+
});
|
|
1304
|
+
return handleResult(response.data);
|
|
1305
|
+
}
|
|
1306
|
+
catch (error) {
|
|
1307
|
+
return handleError(error);
|
|
1308
|
+
}
|
|
1309
|
+
});
|
|
1310
|
+
mcpServer.tool('delete-vacancy-from-favorite', `Delete a vacancy from favorited`, {
|
|
1311
|
+
vacancy_id: z.string(),
|
|
1312
|
+
}, async (args) => {
|
|
1313
|
+
try {
|
|
1314
|
+
const { vacancy_id, ...queryParams } = args;
|
|
1315
|
+
const url = `/vacancies/favorited/${vacancy_id}`;
|
|
1316
|
+
const response = await apiClient.request({
|
|
1317
|
+
method: 'DELETE',
|
|
1318
|
+
url: url,
|
|
1319
|
+
params: queryParams,
|
|
1320
|
+
});
|
|
1321
|
+
return handleResult(response.data);
|
|
1322
|
+
}
|
|
1323
|
+
catch (error) {
|
|
1324
|
+
return handleError(error);
|
|
1325
|
+
}
|
|
1326
|
+
});
|
|
1327
|
+
mcpServer.tool('get-available-vacancy-types', `Possible options available to current manager for publishing of vacancies`, {
|
|
1328
|
+
employer_id: z.string(),
|
|
1329
|
+
manager_id: z.string(),
|
|
1330
|
+
}, async (args) => {
|
|
1331
|
+
try {
|
|
1332
|
+
const { employer_id, manager_id, ...queryParams } = args;
|
|
1333
|
+
const url = `/employers/${employer_id}/managers/${manager_id}/vacancies/available_types`;
|
|
1334
|
+
const response = await apiClient.request({
|
|
1335
|
+
method: 'GET',
|
|
1336
|
+
url: url,
|
|
1337
|
+
params: queryParams,
|
|
1338
|
+
});
|
|
1339
|
+
return handleResult(response.data);
|
|
1340
|
+
}
|
|
1341
|
+
catch (error) {
|
|
1342
|
+
return handleError(error);
|
|
1343
|
+
}
|
|
1344
|
+
});
|
|
1345
|
+
mcpServer.tool('get-vacancy-stats', `Vacancy statistics`, {
|
|
1346
|
+
vacancy_id: z.string(),
|
|
1347
|
+
}, async (args) => {
|
|
1348
|
+
try {
|
|
1349
|
+
const { vacancy_id, ...queryParams } = args;
|
|
1350
|
+
const url = `/vacancies/${vacancy_id}/stats`;
|
|
1351
|
+
const response = await apiClient.request({
|
|
1352
|
+
method: 'GET',
|
|
1353
|
+
url: url,
|
|
1354
|
+
params: queryParams,
|
|
1355
|
+
});
|
|
1356
|
+
return handleResult(response.data);
|
|
1357
|
+
}
|
|
1358
|
+
catch (error) {
|
|
1359
|
+
return handleError(error);
|
|
1360
|
+
}
|
|
1361
|
+
});
|
|
1362
|
+
mcpServer.tool('get-archived-vacancies', `Archived vacancy list`, {
|
|
1363
|
+
employer_id: z.string(),
|
|
1364
|
+
manager_id: z.string().optional(),
|
|
1365
|
+
order_by: z.string().optional(),
|
|
1366
|
+
per_page: z.string().optional(),
|
|
1367
|
+
page: z.string().optional(),
|
|
1368
|
+
}, async (args) => {
|
|
1369
|
+
try {
|
|
1370
|
+
const { employer_id, ...queryParams } = args;
|
|
1371
|
+
const url = `/employers/${employer_id}/vacancies/archived`;
|
|
1372
|
+
const response = await apiClient.request({
|
|
1373
|
+
method: 'GET',
|
|
1374
|
+
url: url,
|
|
1375
|
+
params: queryParams,
|
|
1376
|
+
});
|
|
1377
|
+
return handleResult(response.data);
|
|
1378
|
+
}
|
|
1379
|
+
catch (error) {
|
|
1380
|
+
return handleError(error);
|
|
1381
|
+
}
|
|
1382
|
+
});
|
|
1383
|
+
mcpServer.tool('get-artifacts-portfolio-conditions', `Conditions for uploading portfolio`, {}, async (args) => {
|
|
1384
|
+
try {
|
|
1385
|
+
const response = await apiClient.request({
|
|
1386
|
+
method: 'GET',
|
|
1387
|
+
url: '/artifacts/portfolio/conditions',
|
|
1388
|
+
params: args,
|
|
1389
|
+
});
|
|
1390
|
+
return handleResult(response.data);
|
|
1391
|
+
}
|
|
1392
|
+
catch (error) {
|
|
1393
|
+
return handleError(error);
|
|
1394
|
+
}
|
|
1395
|
+
});
|
|
1396
|
+
mcpServer.tool('edit-artifact', `Editing an artifact`, {
|
|
1397
|
+
id: z.string(),
|
|
1398
|
+
}, async (args) => {
|
|
1399
|
+
try {
|
|
1400
|
+
const { id, ...requestData } = args;
|
|
1401
|
+
const url = `/artifacts/${id}`;
|
|
1402
|
+
const response = await apiClient.request({
|
|
1403
|
+
method: 'PUT',
|
|
1404
|
+
url: url,
|
|
1405
|
+
data: requestData,
|
|
1406
|
+
});
|
|
1407
|
+
return handleResult(response.data);
|
|
1408
|
+
}
|
|
1409
|
+
catch (error) {
|
|
1410
|
+
return handleError(error);
|
|
1411
|
+
}
|
|
1412
|
+
});
|
|
1413
|
+
mcpServer.tool('delete-artifact', `Deleting an artifact`, {
|
|
1414
|
+
id: z.string(),
|
|
1415
|
+
}, async (args) => {
|
|
1416
|
+
try {
|
|
1417
|
+
const { id, ...queryParams } = args;
|
|
1418
|
+
const url = `/artifacts/${id}`;
|
|
1419
|
+
const response = await apiClient.request({
|
|
1420
|
+
method: 'DELETE',
|
|
1421
|
+
url: url,
|
|
1422
|
+
params: queryParams,
|
|
1423
|
+
});
|
|
1424
|
+
return handleResult(response.data);
|
|
1425
|
+
}
|
|
1426
|
+
catch (error) {
|
|
1427
|
+
return handleError(error);
|
|
1428
|
+
}
|
|
1429
|
+
});
|
|
1430
|
+
mcpServer.tool('load-artifact', `Uploading an artifact`, {}, async (args) => {
|
|
1431
|
+
try {
|
|
1432
|
+
const response = await apiClient.request({
|
|
1433
|
+
method: 'POST',
|
|
1434
|
+
url: '/artifacts',
|
|
1435
|
+
data: args,
|
|
1436
|
+
});
|
|
1437
|
+
return handleResult(response.data);
|
|
1438
|
+
}
|
|
1439
|
+
catch (error) {
|
|
1440
|
+
return handleError(error);
|
|
1441
|
+
}
|
|
1442
|
+
});
|
|
1443
|
+
mcpServer.tool('get-artifacts-portfolio', `Getting portfolios`, {}, async (args) => {
|
|
1444
|
+
try {
|
|
1445
|
+
const response = await apiClient.request({
|
|
1446
|
+
method: 'GET',
|
|
1447
|
+
url: '/artifacts/portfolio',
|
|
1448
|
+
params: args,
|
|
1449
|
+
});
|
|
1450
|
+
return handleResult(response.data);
|
|
1451
|
+
}
|
|
1452
|
+
catch (error) {
|
|
1453
|
+
return handleError(error);
|
|
1454
|
+
}
|
|
1455
|
+
});
|
|
1456
|
+
mcpServer.tool('get-artifact-photos-conditions', `Conditions for uploading photos`, {}, async (args) => {
|
|
1457
|
+
try {
|
|
1458
|
+
const response = await apiClient.request({
|
|
1459
|
+
method: 'GET',
|
|
1460
|
+
url: '/artifacts/photo/conditions',
|
|
1461
|
+
params: args,
|
|
1462
|
+
});
|
|
1463
|
+
return handleResult(response.data);
|
|
1464
|
+
}
|
|
1465
|
+
catch (error) {
|
|
1466
|
+
return handleError(error);
|
|
1467
|
+
}
|
|
1468
|
+
});
|
|
1469
|
+
mcpServer.tool('get-artifact-photos', `Getting photos`, {}, async (args) => {
|
|
1470
|
+
try {
|
|
1471
|
+
const response = await apiClient.request({
|
|
1472
|
+
method: 'GET',
|
|
1473
|
+
url: '/artifacts/photo',
|
|
1474
|
+
params: args,
|
|
1475
|
+
});
|
|
1476
|
+
return handleResult(response.data);
|
|
1477
|
+
}
|
|
1478
|
+
catch (error) {
|
|
1479
|
+
return handleError(error);
|
|
1480
|
+
}
|
|
1481
|
+
});
|
|
1482
|
+
mcpServer.tool('get-dictionaries', `Directories of fields`, {}, async (args) => {
|
|
1483
|
+
try {
|
|
1484
|
+
const response = await apiClient.request({
|
|
1485
|
+
method: 'GET',
|
|
1486
|
+
url: '/dictionaries',
|
|
1487
|
+
params: args,
|
|
1488
|
+
});
|
|
1489
|
+
return handleResult(response.data);
|
|
1490
|
+
}
|
|
1491
|
+
catch (error) {
|
|
1492
|
+
return handleError(error);
|
|
1493
|
+
}
|
|
1494
|
+
});
|
|
1495
|
+
mcpServer.tool('get-languages', `The list of all languages`, {}, async (args) => {
|
|
1496
|
+
try {
|
|
1497
|
+
const response = await apiClient.request({
|
|
1498
|
+
method: 'GET',
|
|
1499
|
+
url: '/languages',
|
|
1500
|
+
params: args,
|
|
1501
|
+
});
|
|
1502
|
+
return handleResult(response.data);
|
|
1503
|
+
}
|
|
1504
|
+
catch (error) {
|
|
1505
|
+
return handleError(error);
|
|
1506
|
+
}
|
|
1507
|
+
});
|
|
1508
|
+
mcpServer.tool('get-educational-institutions-dictionary', `Basic information about educational institutions`, {
|
|
1509
|
+
id: z.string(),
|
|
1510
|
+
}, async (args) => {
|
|
1511
|
+
try {
|
|
1512
|
+
const response = await apiClient.request({
|
|
1513
|
+
method: 'GET',
|
|
1514
|
+
url: '/educational_institutions',
|
|
1515
|
+
params: args,
|
|
1516
|
+
});
|
|
1517
|
+
return handleResult(response.data);
|
|
1518
|
+
}
|
|
1519
|
+
catch (error) {
|
|
1520
|
+
return handleError(error);
|
|
1521
|
+
}
|
|
1522
|
+
});
|
|
1523
|
+
mcpServer.tool('get-skills', `The list of key skills`, {
|
|
1524
|
+
id: z.string(),
|
|
1525
|
+
}, async (args) => {
|
|
1526
|
+
try {
|
|
1527
|
+
const response = await apiClient.request({
|
|
1528
|
+
method: 'GET',
|
|
1529
|
+
url: '/skills',
|
|
1530
|
+
params: args,
|
|
1531
|
+
});
|
|
1532
|
+
return handleResult(response.data);
|
|
1533
|
+
}
|
|
1534
|
+
catch (error) {
|
|
1535
|
+
return handleError(error);
|
|
1536
|
+
}
|
|
1537
|
+
});
|
|
1538
|
+
mcpServer.tool('get-professional-roles-dictionary', `Professional role directory`, {}, async (args) => {
|
|
1539
|
+
try {
|
|
1540
|
+
const response = await apiClient.request({
|
|
1541
|
+
method: 'GET',
|
|
1542
|
+
url: '/professional_roles',
|
|
1543
|
+
params: args,
|
|
1544
|
+
});
|
|
1545
|
+
return handleResult(response.data);
|
|
1546
|
+
}
|
|
1547
|
+
catch (error) {
|
|
1548
|
+
return handleError(error);
|
|
1549
|
+
}
|
|
1550
|
+
});
|
|
1551
|
+
mcpServer.tool('get-faculties', `List of educational institution faculties`, {
|
|
1552
|
+
id: z.string(),
|
|
1553
|
+
}, async (args) => {
|
|
1554
|
+
try {
|
|
1555
|
+
const { id, ...queryParams } = args;
|
|
1556
|
+
const url = `/educational_institutions/${id}/faculties`;
|
|
1557
|
+
const response = await apiClient.request({
|
|
1558
|
+
method: 'GET',
|
|
1559
|
+
url: url,
|
|
1560
|
+
params: queryParams,
|
|
1561
|
+
});
|
|
1562
|
+
return handleResult(response.data);
|
|
1563
|
+
}
|
|
1564
|
+
catch (error) {
|
|
1565
|
+
return handleError(error);
|
|
1566
|
+
}
|
|
1567
|
+
});
|
|
1568
|
+
mcpServer.tool('get-industries', `Industries`, {}, async (args) => {
|
|
1569
|
+
try {
|
|
1570
|
+
const response = await apiClient.request({
|
|
1571
|
+
method: 'GET',
|
|
1572
|
+
url: '/industries',
|
|
1573
|
+
params: args,
|
|
1574
|
+
});
|
|
1575
|
+
return handleResult(response.data);
|
|
1576
|
+
}
|
|
1577
|
+
catch (error) {
|
|
1578
|
+
return handleError(error);
|
|
1579
|
+
}
|
|
1580
|
+
});
|
|
1581
|
+
mcpServer.tool('change-negotiation-action', `Actions with collection response/invitation`, {
|
|
1582
|
+
collection_name: z.string(),
|
|
1583
|
+
nid: z.string(),
|
|
1584
|
+
}, async (args) => {
|
|
1585
|
+
try {
|
|
1586
|
+
const { collection_name, nid, ...requestData } = args;
|
|
1587
|
+
const url = `/negotiations/${collection_name}/${nid}`;
|
|
1588
|
+
const response = await apiClient.request({
|
|
1589
|
+
method: 'PUT',
|
|
1590
|
+
url: url,
|
|
1591
|
+
data: requestData,
|
|
1592
|
+
});
|
|
1593
|
+
return handleResult(response.data);
|
|
1594
|
+
}
|
|
1595
|
+
catch (error) {
|
|
1596
|
+
return handleError(error);
|
|
1597
|
+
}
|
|
1598
|
+
});
|
|
1599
|
+
mcpServer.tool('apply-to-vacancy', `Apply for a vacancy`, {}, async (args) => {
|
|
1600
|
+
try {
|
|
1601
|
+
const response = await apiClient.request({
|
|
1602
|
+
method: 'POST',
|
|
1603
|
+
url: '/negotiations',
|
|
1604
|
+
data: args,
|
|
1605
|
+
});
|
|
1606
|
+
return handleResult(response.data);
|
|
1607
|
+
}
|
|
1608
|
+
catch (error) {
|
|
1609
|
+
return handleError(error);
|
|
1610
|
+
}
|
|
1611
|
+
});
|
|
1612
|
+
mcpServer.tool('get-negotiations', `Negotiation list`, {
|
|
1613
|
+
page: z.string().optional(),
|
|
1614
|
+
per_page: z.string().optional(),
|
|
1615
|
+
order_by: z.string().optional(),
|
|
1616
|
+
order: z.string().optional(),
|
|
1617
|
+
vacancy_id: z.string().optional(),
|
|
1618
|
+
status: z.string().optional(),
|
|
1619
|
+
has_updates: z.string().optional(),
|
|
1620
|
+
with_job_search_status: z.string().optional(),
|
|
1621
|
+
with_generated_collections: z.string().optional(),
|
|
1622
|
+
}, async (args) => {
|
|
1623
|
+
try {
|
|
1624
|
+
const response = await apiClient.request({
|
|
1625
|
+
method: 'GET',
|
|
1626
|
+
url: '/negotiations',
|
|
1627
|
+
params: args,
|
|
1628
|
+
});
|
|
1629
|
+
return handleResult(response.data);
|
|
1630
|
+
}
|
|
1631
|
+
catch (error) {
|
|
1632
|
+
return handleError(error);
|
|
1633
|
+
}
|
|
1634
|
+
});
|
|
1635
|
+
mcpServer.tool('get-negotiations-statistics-manager', `Negotiation statistics for the manager`, {
|
|
1636
|
+
employer_id: z.string(),
|
|
1637
|
+
manager_id: z.string(),
|
|
1638
|
+
}, async (args) => {
|
|
1639
|
+
try {
|
|
1640
|
+
const { employer_id, manager_id, ...queryParams } = args;
|
|
1641
|
+
const url = `/employers/${employer_id}/managers/${manager_id}/negotiations_statistics`;
|
|
1642
|
+
const response = await apiClient.request({
|
|
1643
|
+
method: 'GET',
|
|
1644
|
+
url: url,
|
|
1645
|
+
params: queryParams,
|
|
1646
|
+
});
|
|
1647
|
+
return handleResult(response.data);
|
|
1648
|
+
}
|
|
1649
|
+
catch (error) {
|
|
1650
|
+
return handleError(error);
|
|
1651
|
+
}
|
|
1652
|
+
});
|
|
1653
|
+
mcpServer.tool('get-active-negotiations', `Active negotiation list`, {
|
|
1654
|
+
page: z.string().optional(),
|
|
1655
|
+
per_page: z.string().optional(),
|
|
1656
|
+
order_by: z.string().optional(),
|
|
1657
|
+
order: z.string().optional(),
|
|
1658
|
+
vacancy_id: z.string().optional(),
|
|
1659
|
+
has_updates: z.string().optional(),
|
|
1660
|
+
with_job_search_status: z.string().optional(),
|
|
1661
|
+
}, async (args) => {
|
|
1662
|
+
try {
|
|
1663
|
+
const response = await apiClient.request({
|
|
1664
|
+
method: 'GET',
|
|
1665
|
+
url: '/negotiations/active',
|
|
1666
|
+
params: args,
|
|
1667
|
+
});
|
|
1668
|
+
return handleResult(response.data);
|
|
1669
|
+
}
|
|
1670
|
+
catch (error) {
|
|
1671
|
+
return handleError(error);
|
|
1672
|
+
}
|
|
1673
|
+
});
|
|
1674
|
+
mcpServer.tool('get-negotiation-message-templates', `Template list for the negotiation`, {
|
|
1675
|
+
template: z.string(),
|
|
1676
|
+
topic_id: z.string().optional(),
|
|
1677
|
+
vacancy_id: z.string().optional(),
|
|
1678
|
+
resume_id: z.string().optional(),
|
|
1679
|
+
}, async (args) => {
|
|
1680
|
+
try {
|
|
1681
|
+
const { template, ...queryParams } = args;
|
|
1682
|
+
const url = `/message_templates/${template}`;
|
|
1683
|
+
const response = await apiClient.request({
|
|
1684
|
+
method: 'GET',
|
|
1685
|
+
url: url,
|
|
1686
|
+
params: queryParams,
|
|
1687
|
+
});
|
|
1688
|
+
return handleResult(response.data);
|
|
1689
|
+
}
|
|
1690
|
+
catch (error) {
|
|
1691
|
+
return handleError(error);
|
|
1692
|
+
}
|
|
1693
|
+
});
|
|
1694
|
+
mcpServer.tool('get-collection-negotiations-list', `Negotiation list of the collection`, {
|
|
1695
|
+
vacancy_id: z.string(),
|
|
1696
|
+
order_by: z.string().optional(),
|
|
1697
|
+
page: z.string().optional(),
|
|
1698
|
+
per_page: z.string().optional(),
|
|
1699
|
+
age_from: z.string().optional(),
|
|
1700
|
+
age_to: z.string().optional(),
|
|
1701
|
+
area: z.string().optional(),
|
|
1702
|
+
citizenship: z.string().optional(),
|
|
1703
|
+
currency: z.string().optional(),
|
|
1704
|
+
driver_license_types: z.string().optional(),
|
|
1705
|
+
educational_institution: z.string().optional(),
|
|
1706
|
+
education_level: z.string().optional(),
|
|
1707
|
+
experience: z.string().optional(),
|
|
1708
|
+
gender: z.string().optional(),
|
|
1709
|
+
language: z.string().optional(),
|
|
1710
|
+
relocation: z.string().optional(),
|
|
1711
|
+
salary_from: z.string().optional(),
|
|
1712
|
+
salary_to: z.string().optional(),
|
|
1713
|
+
search_radius_meters: z.string().optional(),
|
|
1714
|
+
search_text: z.string().optional(),
|
|
1715
|
+
show_only_new_responses: z.string().optional(),
|
|
1716
|
+
show_only_with_vehicle: z.string().optional(),
|
|
1717
|
+
show_only_new: z.string().optional(),
|
|
1718
|
+
}, async (args) => {
|
|
1719
|
+
try {
|
|
1720
|
+
const response = await apiClient.request({
|
|
1721
|
+
method: 'GET',
|
|
1722
|
+
url: '/negotiations/response',
|
|
1723
|
+
params: args,
|
|
1724
|
+
});
|
|
1725
|
+
return handleResult(response.data);
|
|
1726
|
+
}
|
|
1727
|
+
catch (error) {
|
|
1728
|
+
return handleError(error);
|
|
1729
|
+
}
|
|
1730
|
+
});
|
|
1731
|
+
mcpServer.tool('invite-applicant-to-vacancy', `Invite applicant for a vacancy`, {}, async (args) => {
|
|
1732
|
+
try {
|
|
1733
|
+
const response = await apiClient.request({
|
|
1734
|
+
method: 'POST',
|
|
1735
|
+
url: '/negotiations/phone_interview',
|
|
1736
|
+
data: args,
|
|
1737
|
+
});
|
|
1738
|
+
return handleResult(response.data);
|
|
1739
|
+
}
|
|
1740
|
+
catch (error) {
|
|
1741
|
+
return handleError(error);
|
|
1742
|
+
}
|
|
1743
|
+
});
|
|
1744
|
+
mcpServer.tool('get-negotiation-test-results', `Get test results attached to the vacancy`, {
|
|
1745
|
+
nid: z.string(),
|
|
1746
|
+
}, async (args) => {
|
|
1747
|
+
try {
|
|
1748
|
+
const { nid, ...queryParams } = args;
|
|
1749
|
+
const url = `/negotiations/${nid}/test/solution`;
|
|
1750
|
+
const response = await apiClient.request({
|
|
1751
|
+
method: 'GET',
|
|
1752
|
+
url: url,
|
|
1753
|
+
params: queryParams,
|
|
1754
|
+
});
|
|
1755
|
+
return handleResult(response.data);
|
|
1756
|
+
}
|
|
1757
|
+
catch (error) {
|
|
1758
|
+
return handleError(error);
|
|
1759
|
+
}
|
|
1760
|
+
});
|
|
1761
|
+
mcpServer.tool('edit-negotiation-message', `Edit messages in the response`, {
|
|
1762
|
+
nid: z.string(),
|
|
1763
|
+
mid: z.string(),
|
|
1764
|
+
}, async (args) => {
|
|
1765
|
+
try {
|
|
1766
|
+
const { nid, mid, ...requestData } = args;
|
|
1767
|
+
const url = `/negotiations/${nid}/messages/${mid}`;
|
|
1768
|
+
const response = await apiClient.request({
|
|
1769
|
+
method: 'PUT',
|
|
1770
|
+
url: url,
|
|
1771
|
+
data: requestData,
|
|
1772
|
+
});
|
|
1773
|
+
return handleResult(response.data);
|
|
1774
|
+
}
|
|
1775
|
+
catch (error) {
|
|
1776
|
+
return handleError(error);
|
|
1777
|
+
}
|
|
1778
|
+
});
|
|
1779
|
+
mcpServer.tool('post-negotiations-topics-read', `Mark responses as read`, {}, async (args) => {
|
|
1780
|
+
try {
|
|
1781
|
+
const response = await apiClient.request({
|
|
1782
|
+
method: 'POST',
|
|
1783
|
+
url: '/negotiations/read',
|
|
1784
|
+
data: args,
|
|
1785
|
+
});
|
|
1786
|
+
return handleResult(response.data);
|
|
1787
|
+
}
|
|
1788
|
+
catch (error) {
|
|
1789
|
+
return handleError(error);
|
|
1790
|
+
}
|
|
1791
|
+
});
|
|
1792
|
+
mcpServer.tool('hide-active-response', `Hide response`, {
|
|
1793
|
+
nid: z.string(),
|
|
1794
|
+
with_decline_message: z.string().optional(),
|
|
1795
|
+
}, async (args) => {
|
|
1796
|
+
try {
|
|
1797
|
+
const { nid, ...queryParams } = args;
|
|
1798
|
+
const url = `/negotiations/active/${nid}`;
|
|
1799
|
+
const response = await apiClient.request({
|
|
1800
|
+
method: 'DELETE',
|
|
1801
|
+
url: url,
|
|
1802
|
+
params: queryParams,
|
|
1803
|
+
});
|
|
1804
|
+
return handleResult(response.data);
|
|
1805
|
+
}
|
|
1806
|
+
catch (error) {
|
|
1807
|
+
return handleError(error);
|
|
1808
|
+
}
|
|
1809
|
+
});
|
|
1810
|
+
mcpServer.tool('get-negotiation-item', `Viewing the response/invitation`, {
|
|
1811
|
+
id: z.string(),
|
|
1812
|
+
}, async (args) => {
|
|
1813
|
+
try {
|
|
1814
|
+
const { id, ...queryParams } = args;
|
|
1815
|
+
const url = `/negotiations/${id}`;
|
|
1816
|
+
const response = await apiClient.request({
|
|
1817
|
+
method: 'GET',
|
|
1818
|
+
url: url,
|
|
1819
|
+
params: queryParams,
|
|
1820
|
+
});
|
|
1821
|
+
return handleResult(response.data);
|
|
1822
|
+
}
|
|
1823
|
+
catch (error) {
|
|
1824
|
+
return handleError(error);
|
|
1825
|
+
}
|
|
1826
|
+
});
|
|
1827
|
+
mcpServer.tool('put-negotiations-collection-to-next-state', `Actions with responses/invitations`, {
|
|
1828
|
+
id: z.string(),
|
|
1829
|
+
}, async (args) => {
|
|
1830
|
+
try {
|
|
1831
|
+
const { id, ...requestData } = args;
|
|
1832
|
+
const url = `/negotiations/${id}`;
|
|
1833
|
+
const response = await apiClient.request({
|
|
1834
|
+
method: 'PUT',
|
|
1835
|
+
url: url,
|
|
1836
|
+
data: requestData,
|
|
1837
|
+
});
|
|
1838
|
+
return handleResult(response.data);
|
|
1839
|
+
}
|
|
1840
|
+
catch (error) {
|
|
1841
|
+
return handleError(error);
|
|
1842
|
+
}
|
|
1843
|
+
});
|
|
1844
|
+
mcpServer.tool('get-negotiations-statistics-employer', `Negotiation statistics for the company`, {
|
|
1845
|
+
employer_id: z.string(),
|
|
1846
|
+
}, async (args) => {
|
|
1847
|
+
try {
|
|
1848
|
+
const { employer_id, ...queryParams } = args;
|
|
1849
|
+
const url = `/employers/${employer_id}/negotiations_statistics`;
|
|
1850
|
+
const response = await apiClient.request({
|
|
1851
|
+
method: 'GET',
|
|
1852
|
+
url: url,
|
|
1853
|
+
params: queryParams,
|
|
1854
|
+
});
|
|
1855
|
+
return handleResult(response.data);
|
|
1856
|
+
}
|
|
1857
|
+
catch (error) {
|
|
1858
|
+
return handleError(error);
|
|
1859
|
+
}
|
|
1860
|
+
});
|
|
1861
|
+
mcpServer.tool('send-negotiation-message', `Sending new message`, {
|
|
1862
|
+
nid: z.string(),
|
|
1863
|
+
}, async (args) => {
|
|
1864
|
+
try {
|
|
1865
|
+
const { nid, ...requestData } = args;
|
|
1866
|
+
const url = `/negotiations/${nid}/messages`;
|
|
1867
|
+
const response = await apiClient.request({
|
|
1868
|
+
method: 'POST',
|
|
1869
|
+
url: url,
|
|
1870
|
+
data: requestData,
|
|
1871
|
+
});
|
|
1872
|
+
return handleResult(response.data);
|
|
1873
|
+
}
|
|
1874
|
+
catch (error) {
|
|
1875
|
+
return handleError(error);
|
|
1876
|
+
}
|
|
1877
|
+
});
|
|
1878
|
+
mcpServer.tool('get-negotiation-messages', `View the list of messages in the negotiation`, {
|
|
1879
|
+
nid: z.string(),
|
|
1880
|
+
with_text_only: z.string().optional(),
|
|
1881
|
+
}, async (args) => {
|
|
1882
|
+
try {
|
|
1883
|
+
const { nid, ...queryParams } = args;
|
|
1884
|
+
const url = `/negotiations/${nid}/messages`;
|
|
1885
|
+
const response = await apiClient.request({
|
|
1886
|
+
method: 'GET',
|
|
1887
|
+
url: url,
|
|
1888
|
+
params: queryParams,
|
|
1889
|
+
});
|
|
1890
|
+
return handleResult(response.data);
|
|
1891
|
+
}
|
|
1892
|
+
catch (error) {
|
|
1893
|
+
return handleError(error);
|
|
1894
|
+
}
|
|
1895
|
+
});
|
|
1896
|
+
mcpServer.tool('get-vacancy-draft', `Obtaining a vacancy draft`, {
|
|
1897
|
+
draft_id: z.string(),
|
|
1898
|
+
}, async (args) => {
|
|
1899
|
+
try {
|
|
1900
|
+
const { draft_id, ...queryParams } = args;
|
|
1901
|
+
const url = `/vacancies/drafts/${draft_id}`;
|
|
1902
|
+
const response = await apiClient.request({
|
|
1903
|
+
method: 'GET',
|
|
1904
|
+
url: url,
|
|
1905
|
+
params: queryParams,
|
|
1906
|
+
});
|
|
1907
|
+
return handleResult(response.data);
|
|
1908
|
+
}
|
|
1909
|
+
catch (error) {
|
|
1910
|
+
return handleError(error);
|
|
1911
|
+
}
|
|
1912
|
+
});
|
|
1913
|
+
mcpServer.tool('change-vacancy-draft', `Editing a vacancy draft`, {
|
|
1914
|
+
draft_id: z.string(),
|
|
1915
|
+
}, async (args) => {
|
|
1916
|
+
try {
|
|
1917
|
+
const { draft_id, ...requestData } = args;
|
|
1918
|
+
const url = `/vacancies/drafts/${draft_id}`;
|
|
1919
|
+
const response = await apiClient.request({
|
|
1920
|
+
method: 'PUT',
|
|
1921
|
+
url: url,
|
|
1922
|
+
data: requestData,
|
|
1923
|
+
});
|
|
1924
|
+
return handleResult(response.data);
|
|
1925
|
+
}
|
|
1926
|
+
catch (error) {
|
|
1927
|
+
return handleError(error);
|
|
1928
|
+
}
|
|
1929
|
+
});
|
|
1930
|
+
mcpServer.tool('delete-vacancy-draft', `Deleting a vacancy draft`, {
|
|
1931
|
+
draft_id: z.string(),
|
|
1932
|
+
}, async (args) => {
|
|
1933
|
+
try {
|
|
1934
|
+
const { draft_id, ...queryParams } = args;
|
|
1935
|
+
const url = `/vacancies/drafts/${draft_id}`;
|
|
1936
|
+
const response = await apiClient.request({
|
|
1937
|
+
method: 'DELETE',
|
|
1938
|
+
url: url,
|
|
1939
|
+
params: queryParams,
|
|
1940
|
+
});
|
|
1941
|
+
return handleResult(response.data);
|
|
1942
|
+
}
|
|
1943
|
+
catch (error) {
|
|
1944
|
+
return handleError(error);
|
|
1945
|
+
}
|
|
1946
|
+
});
|
|
1947
|
+
mcpServer.tool('publish-vacancy-from-draft', `Publishing a vacancy from draft`, {
|
|
1948
|
+
draft_id: z.string(),
|
|
1949
|
+
}, async (args) => {
|
|
1950
|
+
try {
|
|
1951
|
+
const { draft_id, ...requestData } = args;
|
|
1952
|
+
const url = `/vacancies/drafts/${draft_id}/publish`;
|
|
1953
|
+
const response = await apiClient.request({
|
|
1954
|
+
method: 'POST',
|
|
1955
|
+
url: url,
|
|
1956
|
+
data: requestData,
|
|
1957
|
+
});
|
|
1958
|
+
return handleResult(response.data);
|
|
1959
|
+
}
|
|
1960
|
+
catch (error) {
|
|
1961
|
+
return handleError(error);
|
|
1962
|
+
}
|
|
1963
|
+
});
|
|
1964
|
+
mcpServer.tool('search-for-vacancy-draft-duplicates', `Checking for duplicates of a vacancy draft`, {
|
|
1965
|
+
draft_id: z.string(),
|
|
1966
|
+
}, async (args) => {
|
|
1967
|
+
try {
|
|
1968
|
+
const { draft_id, ...queryParams } = args;
|
|
1969
|
+
const url = `/vacancies/drafts/${draft_id}/duplicates`;
|
|
1970
|
+
const response = await apiClient.request({
|
|
1971
|
+
method: 'GET',
|
|
1972
|
+
url: url,
|
|
1973
|
+
params: queryParams,
|
|
1974
|
+
});
|
|
1975
|
+
return handleResult(response.data);
|
|
1976
|
+
}
|
|
1977
|
+
catch (error) {
|
|
1978
|
+
return handleError(error);
|
|
1979
|
+
}
|
|
1980
|
+
});
|
|
1981
|
+
mcpServer.tool('create-vacancy-draft', `Creating vacancy draft`, {}, async (args) => {
|
|
1982
|
+
try {
|
|
1983
|
+
const response = await apiClient.request({
|
|
1984
|
+
method: 'POST',
|
|
1985
|
+
url: '/vacancies/drafts',
|
|
1986
|
+
data: args,
|
|
1987
|
+
});
|
|
1988
|
+
return handleResult(response.data);
|
|
1989
|
+
}
|
|
1990
|
+
catch (error) {
|
|
1991
|
+
return handleError(error);
|
|
1992
|
+
}
|
|
1993
|
+
});
|
|
1994
|
+
mcpServer.tool('get-vacancy-draft-list', `Getting a list of vacancy drafts`, {
|
|
1995
|
+
page: z.string().optional(),
|
|
1996
|
+
per_page: z.string().optional(),
|
|
1997
|
+
}, async (args) => {
|
|
1998
|
+
try {
|
|
1999
|
+
const response = await apiClient.request({
|
|
2000
|
+
method: 'GET',
|
|
2001
|
+
url: '/vacancies/drafts',
|
|
2002
|
+
params: args,
|
|
2003
|
+
});
|
|
2004
|
+
return handleResult(response.data);
|
|
2005
|
+
}
|
|
2006
|
+
catch (error) {
|
|
2007
|
+
return handleError(error);
|
|
2008
|
+
}
|
|
2009
|
+
});
|
|
2010
|
+
mcpServer.tool('disable-automatic-vacancy-publication', `Canceling vacancy auto publication`, {
|
|
2011
|
+
draft_id: z.string(),
|
|
2012
|
+
}, async (args) => {
|
|
2013
|
+
try {
|
|
2014
|
+
const response = await apiClient.request({
|
|
2015
|
+
method: 'DELETE',
|
|
2016
|
+
url: '/vacancies/auto_publication',
|
|
2017
|
+
params: args,
|
|
2018
|
+
});
|
|
2019
|
+
return handleResult(response.data);
|
|
2020
|
+
}
|
|
2021
|
+
catch (error) {
|
|
2022
|
+
return handleError(error);
|
|
2023
|
+
}
|
|
2024
|
+
});
|
|
2025
|
+
mcpServer.tool('change-webhook-subscription', `Change a subscription on notifications`, {
|
|
2026
|
+
subscription_id: z.string(),
|
|
2027
|
+
}, async (args) => {
|
|
2028
|
+
try {
|
|
2029
|
+
const { subscription_id, ...requestData } = args;
|
|
2030
|
+
const url = `/webhook/subscriptions/${subscription_id}`;
|
|
2031
|
+
const response = await apiClient.request({
|
|
2032
|
+
method: 'PUT',
|
|
2033
|
+
url: url,
|
|
2034
|
+
data: requestData,
|
|
2035
|
+
});
|
|
2036
|
+
return handleResult(response.data);
|
|
2037
|
+
}
|
|
2038
|
+
catch (error) {
|
|
2039
|
+
return handleError(error);
|
|
2040
|
+
}
|
|
2041
|
+
});
|
|
2042
|
+
mcpServer.tool('cancel-webhook-subscription', `Delete a subscription on notifications`, {
|
|
2043
|
+
subscription_id: z.string(),
|
|
2044
|
+
}, async (args) => {
|
|
2045
|
+
try {
|
|
2046
|
+
const { subscription_id, ...queryParams } = args;
|
|
2047
|
+
const url = `/webhook/subscriptions/${subscription_id}`;
|
|
2048
|
+
const response = await apiClient.request({
|
|
2049
|
+
method: 'DELETE',
|
|
2050
|
+
url: url,
|
|
2051
|
+
params: queryParams,
|
|
2052
|
+
});
|
|
2053
|
+
return handleResult(response.data);
|
|
2054
|
+
}
|
|
2055
|
+
catch (error) {
|
|
2056
|
+
return handleError(error);
|
|
2057
|
+
}
|
|
2058
|
+
});
|
|
2059
|
+
mcpServer.tool('post-webhook-subscription', `Subscription to notifications`, {}, async (args) => {
|
|
2060
|
+
try {
|
|
2061
|
+
const response = await apiClient.request({
|
|
2062
|
+
method: 'POST',
|
|
2063
|
+
url: '/webhook/subscriptions',
|
|
2064
|
+
data: args,
|
|
2065
|
+
});
|
|
2066
|
+
return handleResult(response.data);
|
|
2067
|
+
}
|
|
2068
|
+
catch (error) {
|
|
2069
|
+
return handleError(error);
|
|
2070
|
+
}
|
|
2071
|
+
});
|
|
2072
|
+
mcpServer.tool('get-webhook-subscriptions', `Obtain the list of notifications that the user is subscripted`, {}, async (args) => {
|
|
2073
|
+
try {
|
|
2074
|
+
const response = await apiClient.request({
|
|
2075
|
+
method: 'GET',
|
|
2076
|
+
url: '/webhook/subscriptions',
|
|
2077
|
+
params: args,
|
|
2078
|
+
});
|
|
2079
|
+
return handleResult(response.data);
|
|
2080
|
+
}
|
|
2081
|
+
catch (error) {
|
|
2082
|
+
return handleError(error);
|
|
2083
|
+
}
|
|
2084
|
+
});
|
|
2085
|
+
mcpServer.tool('get-tests-dictionary', `Employer's test directory`, {
|
|
2086
|
+
employer_id: z.string(),
|
|
2087
|
+
}, async (args) => {
|
|
2088
|
+
try {
|
|
2089
|
+
const { employer_id, ...queryParams } = args;
|
|
2090
|
+
const url = `/employers/${employer_id}/tests`;
|
|
2091
|
+
const response = await apiClient.request({
|
|
2092
|
+
method: 'GET',
|
|
2093
|
+
url: url,
|
|
2094
|
+
params: queryParams,
|
|
2095
|
+
});
|
|
2096
|
+
return handleResult(response.data);
|
|
2097
|
+
}
|
|
2098
|
+
catch (error) {
|
|
2099
|
+
return handleError(error);
|
|
2100
|
+
}
|
|
2101
|
+
});
|
|
2102
|
+
mcpServer.tool('get-employer-vacancy-areas', `List of regions with active vacancies`, {
|
|
2103
|
+
employer_id: z.string(),
|
|
2104
|
+
}, async (args) => {
|
|
2105
|
+
try {
|
|
2106
|
+
const { employer_id, ...queryParams } = args;
|
|
2107
|
+
const url = `/employers/${employer_id}/vacancy_areas/active`;
|
|
2108
|
+
const response = await apiClient.request({
|
|
2109
|
+
method: 'GET',
|
|
2110
|
+
url: url,
|
|
2111
|
+
params: queryParams,
|
|
2112
|
+
});
|
|
2113
|
+
return handleResult(response.data);
|
|
2114
|
+
}
|
|
2115
|
+
catch (error) {
|
|
2116
|
+
return handleError(error);
|
|
2117
|
+
}
|
|
2118
|
+
});
|
|
2119
|
+
mcpServer.tool('get-employer-info', `Employer info`, {
|
|
2120
|
+
employer_id: z.string(),
|
|
2121
|
+
}, async (args) => {
|
|
2122
|
+
try {
|
|
2123
|
+
const { employer_id, ...queryParams } = args;
|
|
2124
|
+
const url = `/employers/${employer_id}`;
|
|
2125
|
+
const response = await apiClient.request({
|
|
2126
|
+
method: 'GET',
|
|
2127
|
+
url: url,
|
|
2128
|
+
params: queryParams,
|
|
2129
|
+
});
|
|
2130
|
+
return handleResult(response.data);
|
|
2131
|
+
}
|
|
2132
|
+
catch (error) {
|
|
2133
|
+
return handleError(error);
|
|
2134
|
+
}
|
|
2135
|
+
});
|
|
2136
|
+
mcpServer.tool('add-employer-to-blacklisted', `Adding an employer to the blacklist`, {
|
|
2137
|
+
employer_id: z.string(),
|
|
2138
|
+
}, async (args) => {
|
|
2139
|
+
try {
|
|
2140
|
+
const { employer_id, ...requestData } = args;
|
|
2141
|
+
const url = `/employers/blacklisted/${employer_id}`;
|
|
2142
|
+
const response = await apiClient.request({
|
|
2143
|
+
method: 'PUT',
|
|
2144
|
+
url: url,
|
|
2145
|
+
data: requestData,
|
|
2146
|
+
});
|
|
2147
|
+
return handleResult(response.data);
|
|
2148
|
+
}
|
|
2149
|
+
catch (error) {
|
|
2150
|
+
return handleError(error);
|
|
2151
|
+
}
|
|
2152
|
+
});
|
|
2153
|
+
mcpServer.tool('delete-employer-from-blacklisted', `Deleting an employer from the blacklist`, {
|
|
2154
|
+
employer_id: z.string(),
|
|
2155
|
+
}, async (args) => {
|
|
2156
|
+
try {
|
|
2157
|
+
const { employer_id, ...queryParams } = args;
|
|
2158
|
+
const url = `/employers/blacklisted/${employer_id}`;
|
|
2159
|
+
const response = await apiClient.request({
|
|
2160
|
+
method: 'DELETE',
|
|
2161
|
+
url: url,
|
|
2162
|
+
params: queryParams,
|
|
2163
|
+
});
|
|
2164
|
+
return handleResult(response.data);
|
|
2165
|
+
}
|
|
2166
|
+
catch (error) {
|
|
2167
|
+
return handleError(error);
|
|
2168
|
+
}
|
|
2169
|
+
});
|
|
2170
|
+
mcpServer.tool('search-employer', `Employer search`, {
|
|
2171
|
+
text: z.string().optional(),
|
|
2172
|
+
area: z.string().optional(),
|
|
2173
|
+
type: z.string().optional(),
|
|
2174
|
+
only_with_vacancies: z.string().optional(),
|
|
2175
|
+
sort_by: z.string().optional(),
|
|
2176
|
+
page: z.string().optional(),
|
|
2177
|
+
per_page: z.string().optional(),
|
|
2178
|
+
}, async (args) => {
|
|
2179
|
+
try {
|
|
2180
|
+
const response = await apiClient.request({
|
|
2181
|
+
method: 'GET',
|
|
2182
|
+
url: '/employers',
|
|
2183
|
+
params: args,
|
|
2184
|
+
});
|
|
2185
|
+
return handleResult(response.data);
|
|
2186
|
+
}
|
|
2187
|
+
catch (error) {
|
|
2188
|
+
return handleError(error);
|
|
2189
|
+
}
|
|
2190
|
+
});
|
|
2191
|
+
mcpServer.tool('get-employer-departments', `Employer's department directory`, {
|
|
2192
|
+
employer_id: z.string(),
|
|
2193
|
+
}, async (args) => {
|
|
2194
|
+
try {
|
|
2195
|
+
const { employer_id, ...queryParams } = args;
|
|
2196
|
+
const url = `/employers/${employer_id}/departments`;
|
|
2197
|
+
const response = await apiClient.request({
|
|
2198
|
+
method: 'GET',
|
|
2199
|
+
url: url,
|
|
2200
|
+
params: queryParams,
|
|
2201
|
+
});
|
|
2202
|
+
return handleResult(response.data);
|
|
2203
|
+
}
|
|
2204
|
+
catch (error) {
|
|
2205
|
+
return handleError(error);
|
|
2206
|
+
}
|
|
2207
|
+
});
|
|
2208
|
+
mcpServer.tool('get-vacancy-branded-templates-list', `Employer's branded vacancy templates`, {
|
|
2209
|
+
employer_id: z.string(),
|
|
2210
|
+
}, async (args) => {
|
|
2211
|
+
try {
|
|
2212
|
+
const { employer_id, ...queryParams } = args;
|
|
2213
|
+
const url = `/employers/${employer_id}/vacancy_branded_templates`;
|
|
2214
|
+
const response = await apiClient.request({
|
|
2215
|
+
method: 'GET',
|
|
2216
|
+
url: url,
|
|
2217
|
+
params: queryParams,
|
|
2218
|
+
});
|
|
2219
|
+
return handleResult(response.data);
|
|
2220
|
+
}
|
|
2221
|
+
catch (error) {
|
|
2222
|
+
return handleError(error);
|
|
2223
|
+
}
|
|
2224
|
+
});
|
|
2225
|
+
mcpServer.tool('get-blacklisted-employers', `List of hidden employers`, {}, async (args) => {
|
|
2226
|
+
try {
|
|
2227
|
+
const response = await apiClient.request({
|
|
2228
|
+
method: 'GET',
|
|
2229
|
+
url: '/employers/blacklisted',
|
|
2230
|
+
params: args,
|
|
2231
|
+
});
|
|
2232
|
+
return handleResult(response.data);
|
|
2233
|
+
}
|
|
2234
|
+
catch (error) {
|
|
2235
|
+
return handleError(error);
|
|
2236
|
+
}
|
|
2237
|
+
});
|
|
2238
|
+
mcpServer.tool('get-all-districts', `List of available city districts`, {}, async (args) => {
|
|
2239
|
+
try {
|
|
2240
|
+
const response = await apiClient.request({
|
|
2241
|
+
method: 'GET',
|
|
2242
|
+
url: '/districts',
|
|
2243
|
+
params: args,
|
|
2244
|
+
});
|
|
2245
|
+
return handleResult(response.data);
|
|
2246
|
+
}
|
|
2247
|
+
catch (error) {
|
|
2248
|
+
return handleError(error);
|
|
2249
|
+
}
|
|
2250
|
+
});
|
|
2251
|
+
mcpServer.tool('get-salary-evaluation', `Salary assessment without forecasts`, {
|
|
2252
|
+
area_id: z.string(),
|
|
2253
|
+
exclude_area: z.string().optional(),
|
|
2254
|
+
employee_level: z.string().optional(),
|
|
2255
|
+
industry: z.string().optional(),
|
|
2256
|
+
speciality: z.string().optional(),
|
|
2257
|
+
extend_sources: z.string().optional(),
|
|
2258
|
+
position_name: z.string().optional(),
|
|
2259
|
+
}, async (args) => {
|
|
2260
|
+
try {
|
|
2261
|
+
const { area_id, ...queryParams } = args;
|
|
2262
|
+
const url = `/salary_statistics/paid/salary_evaluation/${area_id}`;
|
|
2263
|
+
const response = await apiClient.request({
|
|
2264
|
+
method: 'GET',
|
|
2265
|
+
url: url,
|
|
2266
|
+
params: queryParams,
|
|
2267
|
+
});
|
|
2268
|
+
return handleResult(response.data);
|
|
2269
|
+
}
|
|
2270
|
+
catch (error) {
|
|
2271
|
+
return handleError(error);
|
|
2272
|
+
}
|
|
2273
|
+
});
|
|
2274
|
+
mcpServer.tool('get-metro-stations', `The list of metro stations in all cities`, {}, async (args) => {
|
|
2275
|
+
try {
|
|
2276
|
+
const response = await apiClient.request({
|
|
2277
|
+
method: 'GET',
|
|
2278
|
+
url: '/metro',
|
|
2279
|
+
params: args,
|
|
2280
|
+
});
|
|
2281
|
+
return handleResult(response.data);
|
|
2282
|
+
}
|
|
2283
|
+
catch (error) {
|
|
2284
|
+
return handleError(error);
|
|
2285
|
+
}
|
|
2286
|
+
});
|
|
2287
|
+
mcpServer.tool('get-metro-stations-in-city', `The list of metro stations in the specified city`, {
|
|
2288
|
+
city_id: z.string(),
|
|
2289
|
+
}, async (args) => {
|
|
2290
|
+
try {
|
|
2291
|
+
const { city_id, ...queryParams } = args;
|
|
2292
|
+
const url = `/metro/${city_id}`;
|
|
2293
|
+
const response = await apiClient.request({
|
|
2294
|
+
method: 'GET',
|
|
2295
|
+
url: url,
|
|
2296
|
+
params: queryParams,
|
|
2297
|
+
});
|
|
2298
|
+
return handleResult(response.data);
|
|
2299
|
+
}
|
|
2300
|
+
catch (error) {
|
|
2301
|
+
return handleError(error);
|
|
2302
|
+
}
|
|
2303
|
+
});
|
|
2304
|
+
mcpServer.tool('move-saved-resume-search', `Moving saved resumes search to other manager`, {
|
|
2305
|
+
saved_search_id: z.string(),
|
|
2306
|
+
manager_id: z.string(),
|
|
2307
|
+
}, async (args) => {
|
|
2308
|
+
try {
|
|
2309
|
+
const { saved_search_id, manager_id, ...requestData } = args;
|
|
2310
|
+
const url = `/saved_searches/resumes/${saved_search_id}/managers/${manager_id}`;
|
|
2311
|
+
const response = await apiClient.request({
|
|
2312
|
+
method: 'PUT',
|
|
2313
|
+
url: url,
|
|
2314
|
+
data: requestData,
|
|
2315
|
+
});
|
|
2316
|
+
return handleResult(response.data);
|
|
2317
|
+
}
|
|
2318
|
+
catch (error) {
|
|
2319
|
+
return handleError(error);
|
|
2320
|
+
}
|
|
2321
|
+
});
|
|
2322
|
+
mcpServer.tool('get-resumes-by-status', `Resumes grouped by the possibility of application for a given job`, {
|
|
2323
|
+
vacancy_id: z.string(),
|
|
2324
|
+
}, async (args) => {
|
|
2325
|
+
try {
|
|
2326
|
+
const { vacancy_id, ...queryParams } = args;
|
|
2327
|
+
const url = `/vacancies/${vacancy_id}/resumes_by_status`;
|
|
2328
|
+
const response = await apiClient.request({
|
|
2329
|
+
method: 'GET',
|
|
2330
|
+
url: url,
|
|
2331
|
+
params: queryParams,
|
|
2332
|
+
});
|
|
2333
|
+
return handleResult(response.data);
|
|
2334
|
+
}
|
|
2335
|
+
catch (error) {
|
|
2336
|
+
return handleError(error);
|
|
2337
|
+
}
|
|
2338
|
+
});
|
|
2339
|
+
mcpServer.tool('get-resume-status', `Resume status and readiness for publication`, {
|
|
2340
|
+
resume_id: z.string(),
|
|
2341
|
+
}, async (args) => {
|
|
2342
|
+
try {
|
|
2343
|
+
const { resume_id, ...queryParams } = args;
|
|
2344
|
+
const url = `/resumes/${resume_id}/status`;
|
|
2345
|
+
const response = await apiClient.request({
|
|
2346
|
+
method: 'GET',
|
|
2347
|
+
url: url,
|
|
2348
|
+
params: queryParams,
|
|
2349
|
+
});
|
|
2350
|
+
return handleResult(response.data);
|
|
2351
|
+
}
|
|
2352
|
+
catch (error) {
|
|
2353
|
+
return handleError(error);
|
|
2354
|
+
}
|
|
2355
|
+
});
|
|
2356
|
+
mcpServer.tool('get-resume-negotiations-history', `History of responses/invitations for a resume`, {
|
|
2357
|
+
resume_id: z.string(),
|
|
2358
|
+
}, async (args) => {
|
|
2359
|
+
try {
|
|
2360
|
+
const { resume_id, ...queryParams } = args;
|
|
2361
|
+
const url = `/resumes/${resume_id}/negotiations_history`;
|
|
2362
|
+
const response = await apiClient.request({
|
|
2363
|
+
method: 'GET',
|
|
2364
|
+
url: url,
|
|
2365
|
+
params: queryParams,
|
|
2366
|
+
});
|
|
2367
|
+
return handleResult(response.data);
|
|
2368
|
+
}
|
|
2369
|
+
catch (error) {
|
|
2370
|
+
return handleError(error);
|
|
2371
|
+
}
|
|
2372
|
+
});
|
|
2373
|
+
mcpServer.tool('get-saved-resume-search', `Getting single saved resume search`, {
|
|
2374
|
+
id: z.string(),
|
|
2375
|
+
}, async (args) => {
|
|
2376
|
+
try {
|
|
2377
|
+
const { id, ...queryParams } = args;
|
|
2378
|
+
const url = `/saved_searches/resumes/${id}`;
|
|
2379
|
+
const response = await apiClient.request({
|
|
2380
|
+
method: 'GET',
|
|
2381
|
+
url: url,
|
|
2382
|
+
params: queryParams,
|
|
2383
|
+
});
|
|
2384
|
+
return handleResult(response.data);
|
|
2385
|
+
}
|
|
2386
|
+
catch (error) {
|
|
2387
|
+
return handleError(error);
|
|
2388
|
+
}
|
|
2389
|
+
});
|
|
2390
|
+
mcpServer.tool('update-saved-resume-search', `Updating saved resume search`, {
|
|
2391
|
+
id: z.string(),
|
|
2392
|
+
name: z.string().optional(),
|
|
2393
|
+
subscription: z.string().optional(),
|
|
2394
|
+
}, async (args) => {
|
|
2395
|
+
try {
|
|
2396
|
+
const { id, ...requestData } = args;
|
|
2397
|
+
const url = `/saved_searches/resumes/${id}`;
|
|
2398
|
+
const response = await apiClient.request({
|
|
2399
|
+
method: 'PUT',
|
|
2400
|
+
url: url,
|
|
2401
|
+
data: requestData,
|
|
2402
|
+
});
|
|
2403
|
+
return handleResult(response.data);
|
|
2404
|
+
}
|
|
2405
|
+
catch (error) {
|
|
2406
|
+
return handleError(error);
|
|
2407
|
+
}
|
|
2408
|
+
});
|
|
2409
|
+
mcpServer.tool('delete-saved-resume-search', `Deleting saved resume search`, {
|
|
2410
|
+
id: z.string(),
|
|
2411
|
+
}, async (args) => {
|
|
2412
|
+
try {
|
|
2413
|
+
const { id, ...queryParams } = args;
|
|
2414
|
+
const url = `/saved_searches/resumes/${id}`;
|
|
2415
|
+
const response = await apiClient.request({
|
|
2416
|
+
method: 'DELETE',
|
|
2417
|
+
url: url,
|
|
2418
|
+
params: queryParams,
|
|
2419
|
+
});
|
|
2420
|
+
return handleResult(response.data);
|
|
2421
|
+
}
|
|
2422
|
+
catch (error) {
|
|
2423
|
+
return handleError(error);
|
|
2424
|
+
}
|
|
2425
|
+
});
|
|
2426
|
+
mcpServer.tool('create-resume', `Resume creating`, {
|
|
2427
|
+
source_resume_id: z.string().optional(),
|
|
2428
|
+
}, async (args) => {
|
|
2429
|
+
try {
|
|
2430
|
+
const response = await apiClient.request({
|
|
2431
|
+
method: 'POST',
|
|
2432
|
+
url: '/resumes',
|
|
2433
|
+
data: args,
|
|
2434
|
+
});
|
|
2435
|
+
return handleResult(response.data);
|
|
2436
|
+
}
|
|
2437
|
+
catch (error) {
|
|
2438
|
+
return handleError(error);
|
|
2439
|
+
}
|
|
2440
|
+
});
|
|
2441
|
+
mcpServer.tool('search-for-resumes', `Resume search`, {
|
|
2442
|
+
text: z.string().optional(),
|
|
2443
|
+
text_logic: z.string().optional(),
|
|
2444
|
+
text_field: z.string().optional(),
|
|
2445
|
+
text_period: z.string().optional(),
|
|
2446
|
+
text_company_size: z.string().optional(),
|
|
2447
|
+
text_industry: z.string().optional(),
|
|
2448
|
+
age_from: z.string().optional(),
|
|
2449
|
+
age_to: z.string().optional(),
|
|
2450
|
+
area: z.string().optional(),
|
|
2451
|
+
relocation: z.string().optional(),
|
|
2452
|
+
period: z.string().optional(),
|
|
2453
|
+
date_from: z.string().optional(),
|
|
2454
|
+
date_to: z.string().optional(),
|
|
2455
|
+
education_level: z.string().optional(),
|
|
2456
|
+
employment: z.string().optional(),
|
|
2457
|
+
experience: z.string().optional(),
|
|
2458
|
+
skill: z.string().optional(),
|
|
2459
|
+
gender: z.string().optional(),
|
|
2460
|
+
label: z.string().optional(),
|
|
2461
|
+
language: z.string().optional(),
|
|
2462
|
+
metro: z.string().optional(),
|
|
2463
|
+
currency: z.string().optional(),
|
|
2464
|
+
salary_from: z.string().optional(),
|
|
2465
|
+
salary_to: z.string().optional(),
|
|
2466
|
+
schedule: z.string().optional(),
|
|
2467
|
+
order_by: z.string().optional(),
|
|
2468
|
+
citizenship: z.string().optional(),
|
|
2469
|
+
work_ticket: z.string().optional(),
|
|
2470
|
+
educational_institution: z.string().optional(),
|
|
2471
|
+
search_in_responses: z.string().optional(),
|
|
2472
|
+
by_text_prefix: z.string().optional(),
|
|
2473
|
+
driver_license_types: z.string().optional(),
|
|
2474
|
+
vacancy_id: z.string().optional(),
|
|
2475
|
+
page: z.string().optional(),
|
|
2476
|
+
per_page: z.string().optional(),
|
|
2477
|
+
professional_role: z.string().optional(),
|
|
2478
|
+
folder: z.string().optional(),
|
|
2479
|
+
include_all_folders: z.string().optional(),
|
|
2480
|
+
job_search_status: z.string().optional(),
|
|
2481
|
+
resume: z.string().optional(),
|
|
2482
|
+
filter_exp_industry: z.string().optional(),
|
|
2483
|
+
filter_exp_period: z.string().optional(),
|
|
2484
|
+
with_job_search_status: z.string().optional(),
|
|
2485
|
+
education_levels: z.string().optional(),
|
|
2486
|
+
district: z.string().optional(),
|
|
2487
|
+
saved_search_id: z.string().optional(),
|
|
2488
|
+
search_by_vacancy_id: z.string().optional(),
|
|
2489
|
+
last_used_timestamp: z.string().optional(),
|
|
2490
|
+
last_used: z.string().optional(),
|
|
2491
|
+
}, async (args) => {
|
|
2492
|
+
try {
|
|
2493
|
+
const response = await apiClient.request({
|
|
2494
|
+
method: 'GET',
|
|
2495
|
+
url: '/resumes',
|
|
2496
|
+
params: args,
|
|
2497
|
+
});
|
|
2498
|
+
return handleResult(response.data);
|
|
2499
|
+
}
|
|
2500
|
+
catch (error) {
|
|
2501
|
+
return handleError(error);
|
|
2502
|
+
}
|
|
2503
|
+
});
|
|
2504
|
+
mcpServer.tool('get-mine-resumes', `List of resumes for current user`, {}, async (args) => {
|
|
2505
|
+
try {
|
|
2506
|
+
const response = await apiClient.request({
|
|
2507
|
+
method: 'GET',
|
|
2508
|
+
url: '/resumes/mine',
|
|
2509
|
+
params: args,
|
|
2510
|
+
});
|
|
2511
|
+
return handleResult(response.data);
|
|
2512
|
+
}
|
|
2513
|
+
catch (error) {
|
|
2514
|
+
return handleError(error);
|
|
2515
|
+
}
|
|
2516
|
+
});
|
|
2517
|
+
mcpServer.tool('publish-resume', `Resume publication`, {
|
|
2518
|
+
resume_id: z.string(),
|
|
2519
|
+
}, async (args) => {
|
|
2520
|
+
try {
|
|
2521
|
+
const { resume_id, ...requestData } = args;
|
|
2522
|
+
const url = `/resumes/${resume_id}/publish`;
|
|
2523
|
+
const response = await apiClient.request({
|
|
2524
|
+
method: 'POST',
|
|
2525
|
+
url: url,
|
|
2526
|
+
data: requestData,
|
|
2527
|
+
});
|
|
2528
|
+
return handleResult(response.data);
|
|
2529
|
+
}
|
|
2530
|
+
catch (error) {
|
|
2531
|
+
return handleError(error);
|
|
2532
|
+
}
|
|
2533
|
+
});
|
|
2534
|
+
mcpServer.tool('get-new-resume-conditions', `Conditions to fill in the fields of a new resume`, {}, async (args) => {
|
|
2535
|
+
try {
|
|
2536
|
+
const response = await apiClient.request({
|
|
2537
|
+
method: 'GET',
|
|
2538
|
+
url: '/resume_conditions',
|
|
2539
|
+
params: args,
|
|
2540
|
+
});
|
|
2541
|
+
return handleResult(response.data);
|
|
2542
|
+
}
|
|
2543
|
+
catch (error) {
|
|
2544
|
+
return handleError(error);
|
|
2545
|
+
}
|
|
2546
|
+
});
|
|
2547
|
+
mcpServer.tool('get-suitable-resumes', `List of resumes suitable for job application`, {
|
|
2548
|
+
vacancy_id: z.string(),
|
|
2549
|
+
}, async (args) => {
|
|
2550
|
+
try {
|
|
2551
|
+
const { vacancy_id, ...queryParams } = args;
|
|
2552
|
+
const url = `/vacancies/${vacancy_id}/suitable_resumes`;
|
|
2553
|
+
const response = await apiClient.request({
|
|
2554
|
+
method: 'GET',
|
|
2555
|
+
url: url,
|
|
2556
|
+
params: queryParams,
|
|
2557
|
+
});
|
|
2558
|
+
return handleResult(response.data);
|
|
2559
|
+
}
|
|
2560
|
+
catch (error) {
|
|
2561
|
+
return handleError(error);
|
|
2562
|
+
}
|
|
2563
|
+
});
|
|
2564
|
+
mcpServer.tool('get-resume-conditions', `Conditions to fill in the fields of an existent resume`, {
|
|
2565
|
+
resume_id: z.string(),
|
|
2566
|
+
}, async (args) => {
|
|
2567
|
+
try {
|
|
2568
|
+
const { resume_id, ...queryParams } = args;
|
|
2569
|
+
const url = `/resumes/${resume_id}/conditions`;
|
|
2570
|
+
const response = await apiClient.request({
|
|
2571
|
+
method: 'GET',
|
|
2572
|
+
url: url,
|
|
2573
|
+
params: queryParams,
|
|
2574
|
+
});
|
|
2575
|
+
return handleResult(response.data);
|
|
2576
|
+
}
|
|
2577
|
+
catch (error) {
|
|
2578
|
+
return handleError(error);
|
|
2579
|
+
}
|
|
2580
|
+
});
|
|
2581
|
+
mcpServer.tool('get-resume-view-history', `History of resume views`, {
|
|
2582
|
+
resume_id: z.string(),
|
|
2583
|
+
with_employer_logo: z.string().optional(),
|
|
2584
|
+
}, async (args) => {
|
|
2585
|
+
try {
|
|
2586
|
+
const { resume_id, ...queryParams } = args;
|
|
2587
|
+
const url = `/resumes/${resume_id}/views`;
|
|
2588
|
+
const response = await apiClient.request({
|
|
2589
|
+
method: 'GET',
|
|
2590
|
+
url: url,
|
|
2591
|
+
params: queryParams,
|
|
2592
|
+
});
|
|
2593
|
+
return handleResult(response.data);
|
|
2594
|
+
}
|
|
2595
|
+
catch (error) {
|
|
2596
|
+
return handleError(error);
|
|
2597
|
+
}
|
|
2598
|
+
});
|
|
2599
|
+
mcpServer.tool('get-resume', `View a resume`, {
|
|
2600
|
+
resume_id: z.string(),
|
|
2601
|
+
with_negotiations_history: z.string().optional(),
|
|
2602
|
+
with_creds: z.string().optional(),
|
|
2603
|
+
with_job_search_status: z.string().optional(),
|
|
2604
|
+
}, async (args) => {
|
|
2605
|
+
try {
|
|
2606
|
+
const { resume_id, ...queryParams } = args;
|
|
2607
|
+
const url = `/resumes/${resume_id}`;
|
|
2608
|
+
const response = await apiClient.request({
|
|
2609
|
+
method: 'GET',
|
|
2610
|
+
url: url,
|
|
2611
|
+
params: queryParams,
|
|
2612
|
+
});
|
|
2613
|
+
return handleResult(response.data);
|
|
2614
|
+
}
|
|
2615
|
+
catch (error) {
|
|
2616
|
+
return handleError(error);
|
|
2617
|
+
}
|
|
2618
|
+
});
|
|
2619
|
+
mcpServer.tool('delete-resume', `Deleting a resume`, {
|
|
2620
|
+
resume_id: z.string(),
|
|
2621
|
+
}, async (args) => {
|
|
2622
|
+
try {
|
|
2623
|
+
const { resume_id, ...queryParams } = args;
|
|
2624
|
+
const url = `/resumes/${resume_id}`;
|
|
2625
|
+
const response = await apiClient.request({
|
|
2626
|
+
method: 'DELETE',
|
|
2627
|
+
url: url,
|
|
2628
|
+
params: queryParams,
|
|
2629
|
+
});
|
|
2630
|
+
return handleResult(response.data);
|
|
2631
|
+
}
|
|
2632
|
+
catch (error) {
|
|
2633
|
+
return handleError(error);
|
|
2634
|
+
}
|
|
2635
|
+
});
|
|
2636
|
+
mcpServer.tool('edit-resume', `Resume updating`, {
|
|
2637
|
+
resume_id: z.string(),
|
|
2638
|
+
}, async (args) => {
|
|
2639
|
+
try {
|
|
2640
|
+
const { resume_id, ...requestData } = args;
|
|
2641
|
+
const url = `/resumes/${resume_id}`;
|
|
2642
|
+
const response = await apiClient.request({
|
|
2643
|
+
method: 'PUT',
|
|
2644
|
+
url: url,
|
|
2645
|
+
data: requestData,
|
|
2646
|
+
});
|
|
2647
|
+
return handleResult(response.data);
|
|
2648
|
+
}
|
|
2649
|
+
catch (error) {
|
|
2650
|
+
return handleError(error);
|
|
2651
|
+
}
|
|
2652
|
+
});
|
|
2653
|
+
mcpServer.tool('get-resume-creation-availability', `Availability of resume creation`, {}, async (args) => {
|
|
2654
|
+
try {
|
|
2655
|
+
const response = await apiClient.request({
|
|
2656
|
+
method: 'GET',
|
|
2657
|
+
url: '/resumes/creation_availability',
|
|
2658
|
+
params: args,
|
|
2659
|
+
});
|
|
2660
|
+
return handleResult(response.data);
|
|
2661
|
+
}
|
|
2662
|
+
catch (error) {
|
|
2663
|
+
return handleError(error);
|
|
2664
|
+
}
|
|
2665
|
+
});
|
|
2666
|
+
mcpServer.tool('get-saved-resume-searches', `List of Saved resume searches`, {
|
|
2667
|
+
page: z.string().optional(),
|
|
2668
|
+
per_page: z.string().optional(),
|
|
2669
|
+
}, async (args) => {
|
|
2670
|
+
try {
|
|
2671
|
+
const response = await apiClient.request({
|
|
2672
|
+
method: 'GET',
|
|
2673
|
+
url: '/saved_searches/resumes',
|
|
2674
|
+
params: args,
|
|
2675
|
+
});
|
|
2676
|
+
return handleResult(response.data);
|
|
2677
|
+
}
|
|
2678
|
+
catch (error) {
|
|
2679
|
+
return handleError(error);
|
|
2680
|
+
}
|
|
2681
|
+
});
|
|
2682
|
+
mcpServer.tool('create-saved-resume-search', `Creating new saved resumes search`, {
|
|
2683
|
+
text: z.string().optional(),
|
|
2684
|
+
text_logic: z.string().optional(),
|
|
2685
|
+
text_field: z.string().optional(),
|
|
2686
|
+
text_period: z.string().optional(),
|
|
2687
|
+
age_from: z.string().optional(),
|
|
2688
|
+
age_to: z.string().optional(),
|
|
2689
|
+
area: z.string().optional(),
|
|
2690
|
+
relocation: z.string().optional(),
|
|
2691
|
+
period: z.string().optional(),
|
|
2692
|
+
date_from: z.string().optional(),
|
|
2693
|
+
date_to: z.string().optional(),
|
|
2694
|
+
education_level: z.string().optional(),
|
|
2695
|
+
employment: z.string().optional(),
|
|
2696
|
+
experience: z.string().optional(),
|
|
2697
|
+
skill: z.string().optional(),
|
|
2698
|
+
gender: z.string().optional(),
|
|
2699
|
+
label: z.string().optional(),
|
|
2700
|
+
language: z.string().optional(),
|
|
2701
|
+
metro: z.string().optional(),
|
|
2702
|
+
currency: z.string().optional(),
|
|
2703
|
+
salary_from: z.string().optional(),
|
|
2704
|
+
salary_to: z.string().optional(),
|
|
2705
|
+
schedule: z.string().optional(),
|
|
2706
|
+
order_by: z.string().optional(),
|
|
2707
|
+
citizenship: z.string().optional(),
|
|
2708
|
+
work_ticket: z.string().optional(),
|
|
2709
|
+
educational_institution: z.string().optional(),
|
|
2710
|
+
search_in_responses: z.string().optional(),
|
|
2711
|
+
by_text_prefix: z.string().optional(),
|
|
2712
|
+
driver_license_types: z.string().optional(),
|
|
2713
|
+
vacancy_id: z.string().optional(),
|
|
2714
|
+
page: z.string().optional(),
|
|
2715
|
+
per_page: z.string().optional(),
|
|
2716
|
+
professional_role: z.string().optional(),
|
|
2717
|
+
}, async (args) => {
|
|
2718
|
+
try {
|
|
2719
|
+
const response = await apiClient.request({
|
|
2720
|
+
method: 'POST',
|
|
2721
|
+
url: '/saved_searches/resumes',
|
|
2722
|
+
data: args,
|
|
2723
|
+
});
|
|
2724
|
+
return handleResult(response.data);
|
|
2725
|
+
}
|
|
2726
|
+
catch (error) {
|
|
2727
|
+
return handleError(error);
|
|
2728
|
+
}
|
|
2729
|
+
});
|
|
2730
|
+
mcpServer.tool('get-resume-access-types', `Retrieving a list of resume visibility types`, {
|
|
2731
|
+
resume_id: z.string(),
|
|
2732
|
+
}, async (args) => {
|
|
2733
|
+
try {
|
|
2734
|
+
const { resume_id, ...queryParams } = args;
|
|
2735
|
+
const url = `/resumes/${resume_id}/access_types`;
|
|
2736
|
+
const response = await apiClient.request({
|
|
2737
|
+
method: 'GET',
|
|
2738
|
+
url: url,
|
|
2739
|
+
params: queryParams,
|
|
2740
|
+
});
|
|
2741
|
+
return handleResult(response.data);
|
|
2742
|
+
}
|
|
2743
|
+
catch (error) {
|
|
2744
|
+
return handleError(error);
|
|
2745
|
+
}
|
|
2746
|
+
});
|
|
2747
|
+
mcpServer.tool('update-applicant-comment', `Update a comment`, {
|
|
2748
|
+
applicant_id: z.string(),
|
|
2749
|
+
comment_id: z.string(),
|
|
2750
|
+
}, async (args) => {
|
|
2751
|
+
try {
|
|
2752
|
+
const { applicant_id, comment_id, ...requestData } = args;
|
|
2753
|
+
const url = `/applicant_comments/${applicant_id}/${comment_id}`;
|
|
2754
|
+
const response = await apiClient.request({
|
|
2755
|
+
method: 'PUT',
|
|
2756
|
+
url: url,
|
|
2757
|
+
data: requestData,
|
|
2758
|
+
});
|
|
2759
|
+
return handleResult(response.data);
|
|
2760
|
+
}
|
|
2761
|
+
catch (error) {
|
|
2762
|
+
return handleError(error);
|
|
2763
|
+
}
|
|
2764
|
+
});
|
|
2765
|
+
mcpServer.tool('delete-applicant-comment', `Delete a comment`, {
|
|
2766
|
+
applicant_id: z.string(),
|
|
2767
|
+
comment_id: z.string(),
|
|
2768
|
+
}, async (args) => {
|
|
2769
|
+
try {
|
|
2770
|
+
const { applicant_id, comment_id, ...queryParams } = args;
|
|
2771
|
+
const url = `/applicant_comments/${applicant_id}/${comment_id}`;
|
|
2772
|
+
const response = await apiClient.request({
|
|
2773
|
+
method: 'DELETE',
|
|
2774
|
+
url: url,
|
|
2775
|
+
params: queryParams,
|
|
2776
|
+
});
|
|
2777
|
+
return handleResult(response.data);
|
|
2778
|
+
}
|
|
2779
|
+
catch (error) {
|
|
2780
|
+
return handleError(error);
|
|
2781
|
+
}
|
|
2782
|
+
});
|
|
2783
|
+
mcpServer.tool('get-applicant-comments-list', `List of comments`, {
|
|
2784
|
+
applicant_id: z.string(),
|
|
2785
|
+
page: z.string().optional(),
|
|
2786
|
+
per_page: z.string().optional(),
|
|
2787
|
+
order_by: z.string().optional(),
|
|
2788
|
+
}, async (args) => {
|
|
2789
|
+
try {
|
|
2790
|
+
const { applicant_id, ...queryParams } = args;
|
|
2791
|
+
const url = `/applicant_comments/${applicant_id}`;
|
|
2792
|
+
const response = await apiClient.request({
|
|
2793
|
+
method: 'GET',
|
|
2794
|
+
url: url,
|
|
2795
|
+
params: queryParams,
|
|
2796
|
+
});
|
|
2797
|
+
return handleResult(response.data);
|
|
2798
|
+
}
|
|
2799
|
+
catch (error) {
|
|
2800
|
+
return handleError(error);
|
|
2801
|
+
}
|
|
2802
|
+
});
|
|
2803
|
+
mcpServer.tool('add-applicant-comment', `Add a comment`, {
|
|
2804
|
+
applicant_id: z.string(),
|
|
2805
|
+
}, async (args) => {
|
|
2806
|
+
try {
|
|
2807
|
+
const { applicant_id, ...requestData } = args;
|
|
2808
|
+
const url = `/applicant_comments/${applicant_id}`;
|
|
2809
|
+
const response = await apiClient.request({
|
|
2810
|
+
method: 'POST',
|
|
2811
|
+
url: url,
|
|
2812
|
+
data: requestData,
|
|
2813
|
+
});
|
|
2814
|
+
return handleResult(response.data);
|
|
2815
|
+
}
|
|
2816
|
+
catch (error) {
|
|
2817
|
+
return handleError(error);
|
|
2818
|
+
}
|
|
2819
|
+
});
|
|
2820
|
+
mcpServer.tool('put-mail-templates-item', `Edit a template for response to an applicant`, {
|
|
2821
|
+
employer_id: z.string(),
|
|
2822
|
+
template_id: z.string(),
|
|
2823
|
+
}, async (args) => {
|
|
2824
|
+
try {
|
|
2825
|
+
const { employer_id, template_id, ...requestData } = args;
|
|
2826
|
+
const url = `/employers/${employer_id}/mail_templates/${template_id}`;
|
|
2827
|
+
const response = await apiClient.request({
|
|
2828
|
+
method: 'PUT',
|
|
2829
|
+
url: url,
|
|
2830
|
+
data: requestData,
|
|
2831
|
+
});
|
|
2832
|
+
return handleResult(response.data);
|
|
2833
|
+
}
|
|
2834
|
+
catch (error) {
|
|
2835
|
+
return handleError(error);
|
|
2836
|
+
}
|
|
2837
|
+
});
|
|
2838
|
+
mcpServer.tool('get-mail-templates', `List of available templates for response to an applicant`, {
|
|
2839
|
+
employer_id: z.string(),
|
|
2840
|
+
}, async (args) => {
|
|
2841
|
+
try {
|
|
2842
|
+
const { employer_id, ...queryParams } = args;
|
|
2843
|
+
const url = `/employers/${employer_id}/mail_templates`;
|
|
2844
|
+
const response = await apiClient.request({
|
|
2845
|
+
method: 'GET',
|
|
2846
|
+
url: url,
|
|
2847
|
+
params: queryParams,
|
|
2848
|
+
});
|
|
2849
|
+
return handleResult(response.data);
|
|
2850
|
+
}
|
|
2851
|
+
catch (error) {
|
|
2852
|
+
return handleError(error);
|
|
2853
|
+
}
|
|
2854
|
+
});
|
|
2855
|
+
mcpServer.tool('get-clickme-statistics', `Getting info about Clickme ad campaign statistics`, {
|
|
2856
|
+
date_from: z.string(),
|
|
2857
|
+
date_to: z.string(),
|
|
2858
|
+
}, async (args) => {
|
|
2859
|
+
try {
|
|
2860
|
+
const response = await apiClient.request({
|
|
2861
|
+
method: 'GET',
|
|
2862
|
+
url: '/clickme/statistics',
|
|
2863
|
+
params: args,
|
|
2864
|
+
});
|
|
2865
|
+
return handleResult(response.data);
|
|
2866
|
+
}
|
|
2867
|
+
catch (error) {
|
|
2868
|
+
return handleError(error);
|
|
2869
|
+
}
|
|
2870
|
+
});
|
|
2871
|
+
mcpServer.tool('get-countries', `Countries`, {}, async (args) => {
|
|
2872
|
+
try {
|
|
2873
|
+
const response = await apiClient.request({
|
|
2874
|
+
method: 'GET',
|
|
2875
|
+
url: '/areas/countries',
|
|
2876
|
+
params: args,
|
|
2877
|
+
});
|
|
2878
|
+
return handleResult(response.data);
|
|
2879
|
+
}
|
|
2880
|
+
catch (error) {
|
|
2881
|
+
return handleError(error);
|
|
2882
|
+
}
|
|
2883
|
+
});
|
|
2884
|
+
mcpServer.tool('get-areas', `Tree view of all regions`, {
|
|
2885
|
+
additional_case: z.string().optional(),
|
|
2886
|
+
}, async (args) => {
|
|
2887
|
+
try {
|
|
2888
|
+
const response = await apiClient.request({
|
|
2889
|
+
method: 'GET',
|
|
2890
|
+
url: '/areas',
|
|
2891
|
+
params: args,
|
|
2892
|
+
});
|
|
2893
|
+
return handleResult(response.data);
|
|
2894
|
+
}
|
|
2895
|
+
catch (error) {
|
|
2896
|
+
return handleError(error);
|
|
2897
|
+
}
|
|
2898
|
+
});
|
|
2899
|
+
mcpServer.tool('get-areas-from-specified', `Region directory, starting from the specified region`, {
|
|
2900
|
+
area_id: z.string(),
|
|
2901
|
+
additional_case: z.string().optional(),
|
|
2902
|
+
}, async (args) => {
|
|
2903
|
+
try {
|
|
2904
|
+
const { area_id, ...queryParams } = args;
|
|
2905
|
+
const url = `/areas/${area_id}`;
|
|
2906
|
+
const response = await apiClient.request({
|
|
2907
|
+
method: 'GET',
|
|
2908
|
+
url: url,
|
|
2909
|
+
params: queryParams,
|
|
2910
|
+
});
|
|
2911
|
+
return handleResult(response.data);
|
|
2912
|
+
}
|
|
2913
|
+
catch (error) {
|
|
2914
|
+
return handleError(error);
|
|
2915
|
+
}
|
|
2916
|
+
});
|
|
2917
|
+
mcpServer.tool('get-salary-employee-levels', `Competency levels`, {}, async (args) => {
|
|
2918
|
+
try {
|
|
2919
|
+
const response = await apiClient.request({
|
|
2920
|
+
method: 'GET',
|
|
2921
|
+
url: '/salary_statistics/dictionaries/employee_levels',
|
|
2922
|
+
params: args,
|
|
2923
|
+
});
|
|
2924
|
+
return handleResult(response.data);
|
|
2925
|
+
}
|
|
2926
|
+
catch (error) {
|
|
2927
|
+
return handleError(error);
|
|
2928
|
+
}
|
|
2929
|
+
});
|
|
2930
|
+
mcpServer.tool('get-salary-salary-areas', `Regions and cities`, {}, async (args) => {
|
|
2931
|
+
try {
|
|
2932
|
+
const response = await apiClient.request({
|
|
2933
|
+
method: 'GET',
|
|
2934
|
+
url: '/salary_statistics/dictionaries/salary_areas',
|
|
2935
|
+
params: args,
|
|
2936
|
+
});
|
|
2937
|
+
return handleResult(response.data);
|
|
2938
|
+
}
|
|
2939
|
+
catch (error) {
|
|
2940
|
+
return handleError(error);
|
|
2941
|
+
}
|
|
2942
|
+
});
|
|
2943
|
+
mcpServer.tool('get-salary-professional-areas', `Professions and specializations`, {}, async (args) => {
|
|
2944
|
+
try {
|
|
2945
|
+
const response = await apiClient.request({
|
|
2946
|
+
method: 'GET',
|
|
2947
|
+
url: '/salary_statistics/dictionaries/professional_areas',
|
|
2948
|
+
params: args,
|
|
2949
|
+
});
|
|
2950
|
+
return handleResult(response.data);
|
|
2951
|
+
}
|
|
2952
|
+
catch (error) {
|
|
2953
|
+
return handleError(error);
|
|
2954
|
+
}
|
|
2955
|
+
});
|
|
2956
|
+
mcpServer.tool('get-salary-industries', `Industries and fields of expertise`, {}, async (args) => {
|
|
2957
|
+
try {
|
|
2958
|
+
const response = await apiClient.request({
|
|
2959
|
+
method: 'GET',
|
|
2960
|
+
url: '/salary_statistics/dictionaries/salary_industries',
|
|
2961
|
+
params: args,
|
|
2962
|
+
});
|
|
2963
|
+
return handleResult(response.data);
|
|
2964
|
+
}
|
|
2965
|
+
catch (error) {
|
|
2966
|
+
return handleError(error);
|
|
2967
|
+
}
|
|
2968
|
+
});
|
|
2969
|
+
mcpServer.tool('get-resume-visibility-employers-list', `Searching for employers to add to the visibility list`, {
|
|
2970
|
+
resume_id: z.string(),
|
|
2971
|
+
list_type: z.string(),
|
|
2972
|
+
text: z.string(),
|
|
2973
|
+
per_page: z.string().optional(),
|
|
2974
|
+
page: z.string().optional(),
|
|
2975
|
+
}, async (args) => {
|
|
2976
|
+
try {
|
|
2977
|
+
const { resume_id, list_type, ...queryParams } = args;
|
|
2978
|
+
const url = `/resumes/${resume_id}/${list_type}/search`;
|
|
2979
|
+
const response = await apiClient.request({
|
|
2980
|
+
method: 'GET',
|
|
2981
|
+
url: url,
|
|
2982
|
+
params: queryParams,
|
|
2983
|
+
});
|
|
2984
|
+
return handleResult(response.data);
|
|
2985
|
+
}
|
|
2986
|
+
catch (error) {
|
|
2987
|
+
return handleError(error);
|
|
2988
|
+
}
|
|
2989
|
+
});
|
|
2990
|
+
mcpServer.tool('get-resume-visibility-list', `Getting visibility lists`, {
|
|
2991
|
+
resume_id: z.string(),
|
|
2992
|
+
list_type: z.string(),
|
|
2993
|
+
}, async (args) => {
|
|
2994
|
+
try {
|
|
2995
|
+
const { resume_id, list_type, ...queryParams } = args;
|
|
2996
|
+
const url = `/resumes/${resume_id}/${list_type}`;
|
|
2997
|
+
const response = await apiClient.request({
|
|
2998
|
+
method: 'GET',
|
|
2999
|
+
url: url,
|
|
3000
|
+
params: queryParams,
|
|
3001
|
+
});
|
|
3002
|
+
return handleResult(response.data);
|
|
3003
|
+
}
|
|
3004
|
+
catch (error) {
|
|
3005
|
+
return handleError(error);
|
|
3006
|
+
}
|
|
3007
|
+
});
|
|
3008
|
+
mcpServer.tool('add-resume-visibility-list', `Adding employers to the visibility list`, {
|
|
3009
|
+
resume_id: z.string(),
|
|
3010
|
+
list_type: z.string(),
|
|
3011
|
+
}, async (args) => {
|
|
3012
|
+
try {
|
|
3013
|
+
const { resume_id, list_type, ...requestData } = args;
|
|
3014
|
+
const url = `/resumes/${resume_id}/${list_type}`;
|
|
3015
|
+
const response = await apiClient.request({
|
|
3016
|
+
method: 'POST',
|
|
3017
|
+
url: url,
|
|
3018
|
+
data: requestData,
|
|
3019
|
+
});
|
|
3020
|
+
return handleResult(response.data);
|
|
3021
|
+
}
|
|
3022
|
+
catch (error) {
|
|
3023
|
+
return handleError(error);
|
|
3024
|
+
}
|
|
3025
|
+
});
|
|
3026
|
+
mcpServer.tool('delete-resume-visibility-list', `Clearing the visibility list`, {
|
|
3027
|
+
resume_id: z.string(),
|
|
3028
|
+
list_type: z.string(),
|
|
3029
|
+
}, async (args) => {
|
|
3030
|
+
try {
|
|
3031
|
+
const { resume_id, list_type, ...queryParams } = args;
|
|
3032
|
+
const url = `/resumes/${resume_id}/${list_type}`;
|
|
3033
|
+
const response = await apiClient.request({
|
|
3034
|
+
method: 'DELETE',
|
|
3035
|
+
url: url,
|
|
3036
|
+
params: queryParams,
|
|
3037
|
+
});
|
|
3038
|
+
return handleResult(response.data);
|
|
3039
|
+
}
|
|
3040
|
+
catch (error) {
|
|
3041
|
+
return handleError(error);
|
|
3042
|
+
}
|
|
3043
|
+
});
|
|
3044
|
+
mcpServer.tool('delete-employer-from-resume-visibility-list', `Removing employers from the visibility list`, {
|
|
3045
|
+
resume_id: z.string(),
|
|
3046
|
+
list_type: z.string(),
|
|
3047
|
+
id: z.string(),
|
|
3048
|
+
}, async (args) => {
|
|
3049
|
+
try {
|
|
3050
|
+
const { resume_id, list_type, ...queryParams } = args;
|
|
3051
|
+
const url = `/resumes/${resume_id}/${list_type}/employer`;
|
|
3052
|
+
const response = await apiClient.request({
|
|
3053
|
+
method: 'DELETE',
|
|
3054
|
+
url: url,
|
|
3055
|
+
params: queryParams,
|
|
3056
|
+
});
|
|
3057
|
+
return handleResult(response.data);
|
|
3058
|
+
}
|
|
3059
|
+
catch (error) {
|
|
3060
|
+
return handleError(error);
|
|
3061
|
+
}
|
|
3062
|
+
});
|