@convisoappsec/mcp 0.6.0 → 0.6.1
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/package.json
CHANGED
|
@@ -557,6 +557,29 @@ class GraphQLClient {
|
|
|
557
557
|
return this.execute(PROJECTS_QUERY, variables);
|
|
558
558
|
}
|
|
559
559
|
|
|
560
|
+
async get_project_types(search = null) {
|
|
561
|
+
const query = `
|
|
562
|
+
query GetProjectTypes($page: Int, $limit: Int, $params: ProjectTypeSearch) {
|
|
563
|
+
projectTypes(page: $page, limit: $limit, params: $params) {
|
|
564
|
+
collection { id code label description defaultDuration }
|
|
565
|
+
metadata { totalCount totalPages currentPage limitValue }
|
|
566
|
+
}
|
|
567
|
+
}`;
|
|
568
|
+
const params = search ? { labelCont: search } : undefined;
|
|
569
|
+
return this.execute(query, { page: 1, limit: 100, params });
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
async get_project_statuses() {
|
|
573
|
+
const query = `
|
|
574
|
+
query GetProjectStatuses($page: Int, $limit: Int) {
|
|
575
|
+
projectStatuses(page: $page, limit: $limit) {
|
|
576
|
+
collection { id label isInitial }
|
|
577
|
+
metadata { totalCount }
|
|
578
|
+
}
|
|
579
|
+
}`;
|
|
580
|
+
return this.execute(query, { page: 1, limit: 100 });
|
|
581
|
+
}
|
|
582
|
+
|
|
560
583
|
async get_project_by_id(project_id) {
|
|
561
584
|
const query = `
|
|
562
585
|
query GetProject($id: ID!) {
|
|
@@ -231,6 +231,18 @@ function buildServer() {
|
|
|
231
231
|
schema: z.object({ project_id: z.number() }),
|
|
232
232
|
}, ({ project_id }) => gql.get_project_by_id(project_id));
|
|
233
233
|
|
|
234
|
+
tool('get_project_types', {
|
|
235
|
+
title: 'List Project Types',
|
|
236
|
+
desc: 'List the available project types (id, code, label, description). Use this to find the type_id required by create_project. Optional: search (label substring).',
|
|
237
|
+
schema: z.object({ search: z.string().optional() }),
|
|
238
|
+
}, ({ search }) => gql.get_project_types(search));
|
|
239
|
+
|
|
240
|
+
tool('get_project_statuses', {
|
|
241
|
+
title: 'List Project Statuses',
|
|
242
|
+
desc: 'List the available project statuses (id, label, isInitial). Use to find valid status values for project status updates.',
|
|
243
|
+
schema: z.object({}),
|
|
244
|
+
}, () => gql.get_project_statuses());
|
|
245
|
+
|
|
234
246
|
tool('get_asset', {
|
|
235
247
|
title: 'Asset Details',
|
|
236
248
|
desc: 'Get an asset by ID.',
|
|
@@ -547,7 +559,7 @@ function buildServer() {
|
|
|
547
559
|
|
|
548
560
|
tool('create_project', {
|
|
549
561
|
title: 'Create Project',
|
|
550
|
-
desc: 'Create a project. Required: company_id, type_id (
|
|
562
|
+
desc: 'Create a project. Required: company_id, type_id (call get_project_types to find it), label, goal, scope, start_date (YYYY-MM-DD). Optional: end_date; extra = advanced CreateProjectInput fields (assetsIds, tags, allocatedPortalUserEmails...).',
|
|
551
563
|
schema: z.object({
|
|
552
564
|
company_id: z.number(),
|
|
553
565
|
type_id: z.number(),
|