Skip to main content
Glama

scan

Runs the declared security controls against a Saga descriptor and returns a verdict with findings ranked by priority. Use when you need a reproducible gate, not a substitute for full code review.

Instructions

Run a scan for a Saga descriptor and return the verdict with findings ranked by priority. This is expensive and has side effects: it clones repositories, executes external scanners and reaches the network. Prefer summarize_report when a recent report already exists.

Scope: this runs the controls the descriptor declares over the components it declares, and nothing else. It is a reproducible floor, not a substitute for reading the code. It does not reason about trust boundaries, whether a build context carries secrets into an image, how credentials are passed to subprocesses, protocol assumptions, or anything a control was not enabled for. If the question was whether a repository is safe to ship rather than whether it passes this gate, keep looking after this returns, the findings here are the part that can be checked the same way every time, not the whole answer. A scan whose scanners do more than read, such as probing a live host or sending data to a third party, or whose results are delivered off this machine, asks the user to approve it first.

Input Schema

NameRequiredDescriptionDefault
pathYespath to the Saga descriptor to scan
limitNomaximum findings to return; defaults to 20
minPriorityNoonly return findings at this priority or above: p1, p2, p3 or p4

Output Schema

NameRequiredDescriptionDefault
nextYeswhat to do with this result
noteNo
feedsNoexploitability datasets the scan consulted; absent means no finding was checked against KEV or EPSS
totalYesfindings the report judged, before any priority filter; excludes suppressed
countsYes
unreadNodependency files no scanner took packages from, and Terraform files calling a module no scanner loaded; what they declare was not checked
verdictYespass or fail, by the same policy the CI gate applies
acceptedNothe suppressed findings with who decided and why, most severe first, capped at limit; report each as a decision, never as work to fix
controlsYesthe controls this scan ran; nothing outside them was examined
findingsYes
returnedYes
deliveredNowhere this run's reports were delivered, from the descriptor's config.publishers
uncoveredNosurfaces this descriptor declares that no enabled control examined
suppressedNofindings a recorded decision took out of the ranking; not part of total
unexaminedYeswhat a Draugr scan does not examine, whatever the verdict

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does: it declares cost ("expensive"), enumerates side effects (clones repositories, executes external scanners, reaches network), and flags when user approval is required. It also discloses negative scope — trust boundaries, secret propagation, credential passing, protocol assumptions — so the agent knows what the verdict does not cover.

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?

Front-loaded correctly: purpose first, then cost/side effects, then scope caveats. There is some redundancy — "a reproducible floor, not a substitute for reading the code" restates essentially the same idea as "the findings here are the part that can be checked the same way every time, not the whole answer" — which could be tightened, but the length is defensible for a high-stakes, side-effecting tool.

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

Completeness5/5

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

Return values are covered by the output schema, and the description fills the remaining gaps: cost, side effects, approval conditions, and an explicit statement of what the scan does not reason about. Nothing an agent needs in order to decide whether to call this, or how to interpret the result, is missing.

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% and all three parameters (path, limit, minPriority) are documented in the schema itself. The description adds no syntax, format, or range detail beyond that, so the baseline 3 is appropriate — the schema does the heavy lifting here.

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 concrete verb and resource ("Run a scan for a Saga descriptor") plus the return shape ("verdict with findings ranked by priority"), and the scope paragraph nails down exactly what the scan covers. It also distinguishes itself from summarize_report, so an agent can pick between them without opening either schema.

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

Usage Guidelines5/5

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

Explicit routing: "Prefer summarize_report when a recent report already exists," plus an explicit "keep looking after this returns" for the broader safety-to-ship question. It also states a precondition (user approval when scanners do more than read or results leave the machine), which is exactly the when-to-use guidance an agent needs.

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