@convisoappsec/mcp 0.6.1 → 0.6.3
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
|
@@ -60,6 +60,9 @@ export function buildCreateProjectInput(a = {}) {
|
|
|
60
60
|
scope: a.scope,
|
|
61
61
|
startDate: a.start_date,
|
|
62
62
|
endDate: a.end_date,
|
|
63
|
+
// Platform quirk: requirement/checklist IDs are called "playbooks" on this input.
|
|
64
|
+
playbooksIds: a.requirement_ids,
|
|
65
|
+
assetsIds: a.asset_ids,
|
|
63
66
|
...(a.extra || {}),
|
|
64
67
|
}),
|
|
65
68
|
};
|
|
@@ -790,7 +793,8 @@ class GraphQLClient {
|
|
|
790
793
|
return this.execute(query, { companyId: company_id, id: ticket_id });
|
|
791
794
|
}
|
|
792
795
|
|
|
793
|
-
async get_requirements(scope_id, { page = 1, limit = 25, filters } = {}) {
|
|
796
|
+
async get_requirements(scope_id, { page = 1, limit = 25, search, filters } = {}) {
|
|
797
|
+
if (search) filters = { ...(filters || {}), label: search };
|
|
794
798
|
const query = `
|
|
795
799
|
query GetRequirements($scopeId: Int!, $pagination: BasePaginationInput!, $filters: RequirementsFilterInput) {
|
|
796
800
|
requirements(scopeId: $scopeId, pagination: $pagination, filters: $filters) {
|
|
@@ -361,14 +361,19 @@ function buildServer() {
|
|
|
361
361
|
|
|
362
362
|
tool('get_requirements', {
|
|
363
363
|
title: 'List Requirements',
|
|
364
|
-
desc: 'List security requirements/checklists for a scope (company) id, paginated. Optional: filters (raw RequirementsFilterInput).',
|
|
364
|
+
desc: 'List security requirements/checklists (also called playbooks) for a scope (company) id, paginated. Optional: search (label substring — use to find a requirement by name), only_from_company (exclude global requirements), filters (raw RequirementsFilterInput). To attach requirements to a NEW project, pass their ids as requirement_ids in create_project.',
|
|
365
365
|
schema: z.object({
|
|
366
366
|
scope_id: z.number(),
|
|
367
367
|
page: z.number().optional(),
|
|
368
368
|
limit: z.number().optional(),
|
|
369
|
+
search: z.string().optional(),
|
|
370
|
+
only_from_company: z.boolean().optional(),
|
|
369
371
|
filters: z.record(z.string(), z.any()).optional(),
|
|
370
372
|
}),
|
|
371
|
-
}, ({ scope_id, page, limit, filters }) =>
|
|
373
|
+
}, ({ scope_id, page, limit, search, only_from_company, filters }) => {
|
|
374
|
+
if (only_from_company !== undefined) filters = { ...(filters || {}), onlyFromCompany: only_from_company };
|
|
375
|
+
return gql.get_requirements(scope_id, { page, limit, search, filters });
|
|
376
|
+
});
|
|
372
377
|
|
|
373
378
|
tool('get_requirement', {
|
|
374
379
|
title: 'Requirement Details',
|
|
@@ -559,7 +564,7 @@ function buildServer() {
|
|
|
559
564
|
|
|
560
565
|
tool('create_project', {
|
|
561
566
|
title: 'Create Project',
|
|
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 (
|
|
567
|
+
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; requirement_ids = requirement/checklist ids to associate (find them with get_requirements — the platform calls these playbooks); asset_ids = asset ids to link; extra = advanced CreateProjectInput fields (tags, allocatedPortalUserEmails...).',
|
|
563
568
|
schema: z.object({
|
|
564
569
|
company_id: z.number(),
|
|
565
570
|
type_id: z.number(),
|
|
@@ -568,6 +573,8 @@ function buildServer() {
|
|
|
568
573
|
scope: z.string(),
|
|
569
574
|
start_date: z.string(),
|
|
570
575
|
end_date: z.string().optional(),
|
|
576
|
+
requirement_ids: z.array(z.number()).optional(),
|
|
577
|
+
asset_ids: z.array(z.number()).optional(),
|
|
571
578
|
extra: z.record(z.string(), z.any()).optional(),
|
|
572
579
|
}),
|
|
573
580
|
write: true,
|