Skip to main content
Glama

trigger_scan_local

Zip and upload a local directory to create a Checkmarx One scan, returning a scan ID for status polling. Use it to compare local results with pipeline scans via matching filters and resolutions.

Instructions

Scan a local directory by zipping and uploading it. Returns the created scan ID for status polling. By default the zip holds the same files as a cx scan create pipeline scan, so results can be compared. Local build output and caches (e.g. dist/, .angular/) are included like cx does; add them to excludePatterns if the pipeline scans a clean checkout. Use a separate branch label (e.g. '-mcp') so manual scans don't mix into the real branch history. With scaResolution 'local', dependencies are resolved locally as cx --sca-resolver does, and with containersResolution 'local', container images are resolved locally as cx does, so the scan stores the same SCA packages and container findings as the pipeline scan. Pass gitRef to scan a commit as a CI checkout sees it, plus extraPaths for CI build output. The result lists warnings when the scan can't match a cx pipeline scan.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "directory": "<directory>"
    },
    "name": "trigger_scan_local"
  }
}

Input Schema

NameRequiredDescriptionDefault
branchNoBranch name label for the scan (defaults to 'local-scan')
gitRefNoScan this commit, branch or tag of the git repository that contains directory, instead of the working tree: tracked files only, with no .git, ignored or untracked files, as a CI checkout sees it. Your index and working tree are not changed. Submodules are not included.
zipModeNoWhich files go into the zip. 'cx' (default): the file types the cx CLI uploads, skipping node_modules, .git, .vs, .vscode and .idea. 'all': every file type, skipping build output, dependency and tool folders (dist, build, vendor, iac, .angular and similar).cx
directoryYesAbsolute path to local directory to scan
projectIdNoProject UUID (uses CHECKMARX_PROJECT_ID if not provided)
scaFilterNoSCA file filter, same as cx --sca-filter
scanTypesNoScanner engines to run (defaults to sast, sca, kics). Use 'containers' to scan the images in Dockerfiles, Docker Compose files and Helm charts for CVEs.
extraPathsNoFiles or folders, relative to directory, copied from the working tree on top of the gitRef checkout: the CI build output the pipeline scans, e.g. ['dist', 'iac/generated']. They go through the same zip filters as the rest. Needs gitRef.
kicsFilterNoKICS (IaC) file filter, same as cx --iac-security-filter
presetNameNoSAST preset name, same as cx --sast-preset-name
sastFilterNoSAST file filter, same as cx --sast-filter (e.g. '!*.spec.ts,!test')
incrementalNoRun an incremental SAST scan, same as cx --sast-incremental
scaResolutionNoWhere SCA dependencies are resolved. 'local': run SCA Resolver on the directory and upload its result, as cx --sca-resolver does. It runs as CHECKMARX_SCA_RESOLVER says, or in Docker when that is not set. 'cloud': Checkmarx resolves the uploaded lock files, dev dependencies included. Defaults to 'local' when CHECKMARX_SCA_RESOLVER is set and sca is requested, else 'cloud'.
containerImagesNoImages to analyse in addition to the ones found in the files, the same as cx --container-images (e.g. the image the pipeline builds and ships, ['registry.example.com/app:1.2.3']). Needs 'containers' in scanTypes and containersResolution 'local'.
excludePatternsNoAdditional glob patterns to exclude from zip (node_modules, .git already excluded)
scaResolverParamsNoSCA Resolver arguments, the same string as cx --sca-resolver-params (e.g. "--ignore-dev-dependencies --extract-archives zip,ear,war"). Only for scaResolution 'local'.
containersResolutionNoWhere container images are resolved. 'local': find the images in Dockerfiles, Docker Compose files and Helm charts, analyse them and containerImages with the containers resolver, and upload the result, as cx does when the tenant flag CONTAINER_ENGINE_CLI_ENABLED is on. It runs as CHECKMARX_CONTAINERS_RESOLVER says, or in Docker when that is not set; images are read from the local Docker daemon first, so pull or build private images locally. 'cloud': Checkmarx resolves the images named in the uploaded files. Defaults to 'local' when containers is requested, the flag is on, and CHECKMARX_CONTAINERS_RESOLVER is set or containerImages is given; else 'cloud'.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the behavioral burden well: it explains that the directory is zipped and uploaded, that a scan ID is returned for polling, how default zip contents compare to cx, that local build output and caches are included, and that warnings appear when pipeline parity cannot be achieved. It does not discuss permissions or broader side effects beyond creating the scan.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is dense but front-loads purpose and return behavior before moving into defaults and resolution semantics. It is appropriately sized for a 17-parameter tool, though the paragraph is long and could be slightly more scannable with clearer separation between setup, filtering, and resolution guidance.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a complex scan tool with many parameters, no annotations, and no output schema, the description is largely complete: it covers purpose, return signal, default file selection, CI parity, gitRef usage, and warnings. It leaves out some operational prerequisites such as authentication and environment setup, but the schema covers the parameter surface in detail.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Even though schema coverage is already 100%, the description adds valuable cross-parameter meaning: extraPaths depends on gitRef, containerImages requires 'containers' in scanTypes and local containersResolution, excludePatterns should be used for build output when the pipeline scans a clean checkout, and local resolutions mirror cx behavior. This goes well beyond restating the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource: scanning a local directory by zipping and uploading it, then returning the created scan ID. It clearly distinguishes this operation from a local gitRef scan by describing the default directory-based behavior and CI-comparison goal.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives clear operational guidance: use a separate branch label to avoid mixing manual scans, add build output to excludePatterns when scanning a clean checkout, use gitRef plus extraPaths for CI parity, and choose local vs cloud resolution modes. It does not explicitly say when to use this tool instead of trigger_scan_git or trigger_scan_image, but the context is otherwise strong.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.