Skip to main content
Glama

scan_gitlab

Read GitLab projects, issues, and merge requests to detect leaked secrets. Returns redacted findings without modifying your repositories.

Instructions

Read GitLab project code, issues, and merge requests to detect leaked secrets. Never modifies GitLab — no commits, comments, or MRs are created. Auth: requires a personal access token with read_api scope; set GITLAB_TOKEN env var or pass api_key directly. Side effects: a redacted scan report is uploaded to the n0s1 backend; set allow_secret_upload=True to also upload AES-encrypted secret values for AI validation. Returns redacted findings — raw secret values are never included in the output. Subject to GitLab API rate limits.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
api_keyYesGitLab personal access token with read_api scope (or set GITLAB_TOKEN env var)
serverNoGitLab server URL (default: https://gitlab.com or GITLAB_URL env var)
ownerYesGitLab group or user name
repoNoProject name (optional — omit to scan all projects for owner)
branchNoBranch to scan (optional — defaults to default branch)
report_formatNoOutput report formatn0s1
show_matched_secret_on_logsNoInclude redacted secret snippets in logs (default: false)
ai_analysisNoQueue async AI credential validation after the scan (requires n0s1 Pro)
n0s1_api_keyNon0s1 API key; overrides the N0S1_TOKEN env var
allow_secret_uploadNoUpload AES-encrypted secret values to the n0s1 backend for AI validation (default: false)
report_uuidNoUUID to assign to the scan report; overrides the auto-generated one

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
report_uuidYes
statusYes
summaryYes
findingsNo
next_cursorNo
usageYes
ai_analysis_statusNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changedv1.1.6
    • changedInput schema / properties / allow_secret_upload / description
      Previous value: -"Allow encrypted secrets to be uploaded to the n0s1 backend (default: false)"New value: +"Upload AES-encrypted secret values to the n0s1 backend for AI validation (default: false)"
    • changedInput schema / properties / api_key / description
      Previous value: -"GitLab personal access token"New value: +"GitLab personal access token with read_api scope (or set GITLAB_TOKEN env var)"
    • changedInput schema / properties / branch / description
      Previous value: -"Branch to scan (optional)"New value: +"Branch to scan (optional — defaults to default branch)"
    • changedInput schema / properties / owner / description
      Previous value: -"GitLab group or user"New value: +"GitLab group or user name"
    • changedInput schema / properties / repo / description
      Previous value: -"Project name (optional, scans all if omitted)"New value: +"Project name (optional — omit to scan all projects for owner)"
    • changedInput schema / properties / server / description
      Previous value: -"GitLab server URL (default: https://gitlab.com)"New value: +"GitLab server URL (default: https://gitlab.com or GITLAB_URL env var)"
    • changedInput schema / properties / show_matched_secret_on_logs / description
      Previous value: -"Show matched secret values in reports and logs (default: false)"New value: +"Include redacted secret snippets in logs (default: false)"
  2. Changed4 schema fields changedv1.1.4
    • addedInput schema / properties / allow_secret_upload
      Added value: +{
      +  "description": "Allow encrypted secrets to be uploaded to the n0s1 backend (default: false)",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / report_format / description
      Added value: +"Output report format"
    • addedInput schema / properties / report_uuid
      Added value: +{
      +  "description": "UUID to assign to the scan report; overrides the auto-generated one",
      +  "type": "string"
      +}
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$defs": {
      +    "Finding": {
      +      "description": "A single redacted secret finding.",
      +      "properties": {
      +        "file": {
      +          "title": "File",
      +          "type": "string"
      +        },
      +        "line": {
      +          "anyOf": [
      +            {
      +              "type": "integer"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ],
      +          "default": null,
      +          "title": "Line"
      +        },
      +        "redacted_match": {
      +          "title": "Redacted Match",
      +          "type": "string"
      +        },
      +        "severity": {
      +          "$ref": "#/$defs/Severity"
      +        },
      +        "type": {
      +          "title": "Type",
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "file",
      +        "type",
      +        "severity",
      +        "redacted_match"
      +      ],
      +      "title": "Finding",
      +      "type": "object"
      +    },
      +    "ScanSummary": {
      +      "description": "Aggregate counts from a completed scan.",
      +      "properties": {
      +        "by_severity": {
      +          "additionalProperties": {
      +            "type": "integer"
      +          },
      +          "propertyNames": {
      +            "$ref": "#/$defs/Severity"
      +          },
      +          "title": "By Severity",
      +          "type": "object"
      +        },
      +        "by_type": {
      +          "additionalProperties": {
      +            "type": "integer"
      +          },
      +          "title": "By Type",
      +          "type": "object"
      +        },
      +        "total_findings": {
      +          "title": "Total Findings",
      +          "type": "integer"
      +        }
      +      },
      +      "required": [
      +        "total_findings",
      +        "by_severity",
      +        "by_type"
      +      ],
      +      "title": "ScanSummary",
      +      "type": "object"
      +    },
      +    "Severity": {
      +      "enum": [
      +        "info",
      +        "low",
      +        "medium",
      +        "high",
      +        "critical"
      +      ],
      +      "title": "Severity",
      +      "type": "string"
      +    },
      +    "Usage": {
      +      "description": "Token-usage accounting block.",
      +      "properties": {
      +        "savings_pct": {
      +          "title": "Savings Pct",
      +          "type": "number"
      +        },
      +        "tokens_in_estimate": {
      +          "title": "Tokens In Estimate",
      +          "type": "integer"
      +        },
      +        "tokens_out_actual": {
      +          "title": "Tokens Out Actual",
      +          "type": "integer"
      +        },
      +        "tokens_saved_estimate": {
      +          "title": "Tokens Saved Estimate",
      +          "type": "integer"
      +        }
      +      },
      +      "required": [
      +        "tokens_in_estimate",
      +        "tokens_out_actual",
      +        "tokens_saved_estimate",
      +        "savings_pct"
      +      ],
      +      "title": "Usage",
      +      "type": "object"
      +    }
      +  },
      +  "description": "Full result returned by every scan_* tool.",
      +  "properties": {
      +    "ai_analysis_status": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "default": null,
      +      "title": "Ai Analysis Status"
      +    },
      +    "findings": {
      +      "anyOf": [
      +        {
      +          "items": {
      +            "$ref": "#/$defs/Finding"
      +          },
      +          "type": "array"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "default": null,
      +      "title": "Findings"
      +    },
      +    "next_cursor": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "default": null,
      +      "title": "Next Cursor"
      +    },
      +    "report_uuid": {
      +      "title": "Report Uuid",
      +      "type": "string"
      +    },
      +    "status": {
      +      "enum": [
      +        "pending",
      +        "running",
      +        "complete",
      +        "failed"
      +      ],
      +      "title": "Status",
      +      "type": "string"
      +    },
      +    "summary": {
      +      "$ref": "#/$defs/ScanSummary"
      +    },
      +    "usage": {
      +      "$ref": "#/$defs/Usage"
      +    }
      +  },
      +  "required": [
      +    "report_uuid",
      +    "status",
      +    "summary",
      +    "usage"
      +  ],
      +  "title": "ScanResult",
      +  "type": "object"
      +}
  3. First observedv1.1.1

TDQS

A4/5.0
Behavior3/5

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

The description discloses side effects (uploading redacted reports to n0s1 backend, optional encrypted upload) and notes API rate limits. However, there is a contradiction: annotations set readOnlyHint: false, but the description claims 'Never modifies GitLab'. This inconsistency hurts reliability for an agent.

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

Conciseness5/5

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

The description is four sentences, front-loaded with purpose, then covers safety, auth, side effects, and output. Every sentence adds value without redundancy.

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?

Given 11 parameters and an output schema (not shown but available), the description covers essential aspects: purpose, read-only guarantee, auth, side effects, output format (redacted), and rate limits. It does not detail return values, but the output schema fills that gap.

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

Parameters3/5

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

Schema coverage is 100%, and each parameter's description in the schema is detailed. The description adds little new semantic information beyond repeating authentication methods and side effects. It does not deepen understanding of individual parameters beyond 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 clearly states the tool scans GitLab projects for leaked secrets, using specific verbs (Read, detect) and resource (GitLab project code, issues, MRs). It distinguishes itself from sibling tools that target other platforms (e.g., scan_github, scan_jira).

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?

The description specifies when to use: for detecting secrets in GitLab. It notes the tool never modifies GitLab (read-only) and describes authentication requirements. It does not explicitly list when not to use or alternatives, but the sibling list implies other platform-specific scanners. The guidance is clear enough for an agent.

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