Skip to main content
Glama

Scan a path

scan_path
Read-onlyIdempotent

Run a read-only, offline scan of a file or directory to detect malicious or risky content like prompt injection before installing or enabling a skill, plugin, hook, or MCP server.

Instructions

Scans one file or directory (a skill folder, plugin, hook script, MCP server source or MCP config) for malicious or risky content, such as prompt injection, hidden text, credential theft and data exfiltration. Useful before a skill, plugin or server is installed, enabled or run. Read-only and offline: nothing is executed, written or sent anywhere.

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": {
      "path": "<path>"
    },
    "name": "scan_path"
  }
}

Input Schema

NameRequiredDescriptionDefault
deepNoAlso walk node_modules, virtualenvs and caches.
pathYesFile or directory to scan. Relative paths resolve against the server working directory; a leading ~ means the home directory.
max_findingsNoLargest number of findings to return, most severe first.
min_severityNoLeave out findings below this severity.low

Output Schema

NameRequiredDescriptionDefault
toolYes
countsYes
skippedYes
targetsYes
versionYes
completeYesFalse when some files or folders were not scanned; a scan that is not complete is not a clean result.
findingsYes
filesScannedYes
skippedFilesYes
highestSeverityYes
omittedFindingsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.3.1
    • addedOutput schema / properties / complete
      Added value: +{
      +  "description": "False when some files or folders were not scanned; a scan that is not complete is not a clean result.",
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / skipped
      Added value: +{
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "path": {
      +        "type": "string"
      +      },
      +      "reason": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "path",
      +      "reason"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "tool",
      -  "version",
      -  "filesScanned",
      -  "targets",
      -  "counts",
      -  "highestSeverity",
      -  "findings",
      -  "omittedFindings",
      -  "skippedFiles"
      -]New value: +[
      +  "tool",
      +  "version",
      +  "filesScanned",
      +  "targets",
      +  "counts",
      +  "highestSeverity",
      +  "findings",
      +  "omittedFindings",
      +  "skippedFiles",
      +  "complete",
      +  "skipped"
      +]
  2. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so the safety profile is covered; the description reinforces this with 'nothing is executed, written or sent anywhere', which matters because scanning untrusted code could otherwise imply execution. It adds the threat categories detected, but says nothing about cost or behavior on large trees.

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?

Two sentences, front-loaded with the scope and the input types, then the use case, then the safety guarantee. No sentence is redundant.

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?

An output schema exists, so return values need no explanation, and annotations carry the safety profile. What remains thin is operational context — whether deep=true is expensive or slow on large trees — which would help an agent choose parameter values on a big directory.

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 description coverage is 100%, so path resolution, the deep flag, max_findings and min_severity are all documented in the schema. The description adds no parameter-level meaning beyond that, so the baseline 3 applies.

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?

States a specific verb ('Scans') and a precisely scoped resource ('one file or directory'), then enumerates the artifact types it accepts (skill folder, plugin, hook script, MCP server source/config) and what it looks for. The 'one file or directory' framing implicitly but clearly separates it from scan_text (raw text) and scan_installed (installed components).

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?

Gives a concrete trigger: 'Useful before a skill, plugin or server is installed, enabled or run.' That is a clear when-to-use context, but the description never names scan_text or scan_installed as alternatives or states when this tool is the wrong choice.

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

Deploy Server

Other Tools