Skip to main content
Glama

scan_repo

Read-onlyIdempotent

Inventory cryptography in one local directory tree by scanning source, config, CI and infrastructure files, returning each algorithm with file, line, family and coverage.

Instructions

Inventory the cryptography inside one local directory tree, file by file.

Reads source, configuration (nginx.conf, sshd_config, .ini, .toml), CI pipelines, Terraform and Kubernetes manifests under path. Returns each algorithm found with its file and line, the mathematical family and standing of every post-quantum scheme, and a coverage count.

Use this to answer what a specific project on this machine actually uses. Do not use it to ask whether this server knows a given algorithm, or to explain how one is classified without scanning anything -- list_algorithms answers that from the same table and reads no files. It is also the wrong tool for a network endpoint, a running host or a certificate store: it opens files on disk and nothing else.

Coverage is reported as a fraction with a base. files_scanned + unreadable_files + files_skipped_by_type + the linked files in symlinks_not_followed == files_present; a link is not followed and is named, not read. A file that could not be opened is listed, never counted as scanned, because no findings in a file nobody read is not the same as a file that is clean. Files skipped because this tool does not claim their type are counted by extension, so the reader can judge the boundary rather than assume past it.

The owner's own settings apply and are reported, never silent: a .qrp.toml at the root (its excludes are listed under coverage.not_examined as excluded_by_config; its baseline marks rows new or baselined), and qrp:ignore <family> <reason> comments, whose rows move to suppressed with the reason and are counted in coverage.suppressed; a marker past its until=YYYY-MM-DD no longer applies and is listed as expired.

The result also says where this version may miss, read from the finished result without changing any row: operation_closure (the (operation, ecosystem) pairs whose documented spellings this version tests one by one), ecosystems (each ecosystem of the files read, closed, partially closed or not closed against that catalogue), angles (dependency, code and configuration where they disagree), chosen_outside_files.leads (includes and key paths followed to the files read) and where_to_look. None of these enters the findings or their fingerprint, and the CBOM from export_cbom does not carry them.

Cost scales with the size of the tree, so a large monorepo takes proportionally longer; there is no cache and no partial mode.

Quoted lines are masked by default. Reading happens on this machine, but this result does not stay on it: it is returned to a model, which is a place the scanned line has not been before. A secret sharing a line with a finding -- a token in the call that names the cipher -- would travel with it. Masking keeps what a reader needs (the algorithm, the file, the line number, the shape of the call) and removes what nobody asked for. Pass level="full" when the line itself is the thing being examined.

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_repo"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesDirectory to scan, absolute or relative to the working directory: a checked-out repository, a service directory, a config tree. Vendored, build and cache directories (.git, node_modules, vendor, venv, .venv, dist, build, target, .tox, __pycache__, .pytest_cache, .mypy_cache, .ruff_cache) are excluded and do not count toward files_present; the verdict names how many files each one held, .git excepted.
levelNoHow much of each matched line to return. `masked` (the default) keeps the characters that spell the algorithm and stars every other letter and digit; `full` returns the line as written; `trimmed` returns no line at all. File and line number are the same at every level.masked
profileNoWhose rules each `replacement` follows. `nist` (the default) is FIPS 203/204/205. The others read one national document each and say whom it addresses: us-cnsa2 (NSA, US National Security Systems), uk-ncsc, au-ism, ca-cccs, de-bsi, fr-anssi, nl-ncsc, eu-eccg (EU product certification), bg (no Bulgarian guidance found; EU roadmap dates). Detection is identical under every profile.nist

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.35.0
    • changedInput schema / properties / path / description
      Previous value: -"Directory to scan, absolute or relative to the working directory: a checked-out repository, a service directory, a config tree. Vendored and build directories (.git, node_modules, vendor, dist, build, target) are excluded and do not count toward files_present."New value: +"Directory to scan, absolute or relative to the working directory: a checked-out repository, a service directory, a config tree. Vendored, build and cache directories (.git, node_modules, vendor, venv, .venv, dist, build, target, .tox, __pycache__, .pytest_cache, .mypy_cache, .ruff_cache) are excluded and do not count toward files_present; the verdict names how many files each one held, .git excepted."
  2. Changed1 schema field changedv0.27.0
    • addedInput schema / properties / profile
      Added value: +{
      +  "default": "nist",
      +  "description": "Whose rules each `replacement` follows. `nist` (the default) is FIPS 203/204/205. The others read one national document each and say whom it addresses: us-cnsa2 (NSA, US National Security Systems), uk-ncsc, au-ism, ca-cccs, de-bsi, fr-anssi, nl-ncsc, eu-eccg (EU product certification), bg (no Bulgarian guidance found; EU roadmap dates). Detection is identical under every profile.",
      +  "enum": [
      +    "nist",
      +    "us-cnsa2",
      +    "uk-ncsc",
      +    "au-ism",
      +    "ca-cccs",
      +    "de-bsi",
      +    "fr-anssi",
      +    "nl-ncsc",
      +    "eu-eccg",
      +    "bg"
      +  ],
      +  "title": "Profile",
      +  "type": "string"
      +}
  3. Changed1 schema field changedv0.17.0
    • addedInput schema / properties / level
      Added value: +{
      +  "default": "masked",
      +  "description": "How much of each matched line to return. `masked` (the default) keeps the characters that spell the algorithm and stars every other letter and digit; `full` returns the line as written; `trimmed` returns no line at all. File and line number are the same at every level.",
      +  "enum": [
      +    "full",
      +    "masked",
      +    "trimmed"
      +  ],
      +  "title": "Level",
      +  "type": "string"
      +}
  4. Changed1 schema field changedv0.6.0
    • addedInput schema / properties / path / description
      Added value: +"Directory to scan, absolute or relative to the working directory: a checked-out repository, a service directory, a config tree. Vendored and build directories (.git, node_modules, vendor, dist, build, target) are excluded and do not count toward files_present."
  5. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already establish readOnly/idempotent/local-only, and the description still adds substantial behavior beyond them: the coverage identity (files_scanned + unreadable + skipped + symlink targets == files_present), the rule that unreadable files are listed but never counted as clean, symlinks named but not followed, and the cost model ('no cache and no partial mode'). It also discloses how .qrp.toml excludes, baselines and qrp:ignore markers (including expiry) silently change what is reported, and warns that masked lines still leave the machine to a model.

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?

Purpose is front-loaded, then exclusions, then coverage semantics, masking and metadata -- a logical order. It is long, and the paragraph enumerating operation_closure, ecosystems, angles, chosen_outside_files.leads and where_to_look restates return fields that the output schema already defines, which is the main place words could be cut.

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?

For a read-only scanner with an output schema and full annotation coverage, this leaves no operational gap: it covers what is read and skipped, how coverage is computed, how project config alters results, what does not enter findings or the CBOM, cost scaling, and the masking trade-off. An agent can invoke it correctly and interpret the result without further help.

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 the schema already documents every enum value and default for path, level and profile, so baseline is 3. The description adds one piece of genuine guidance not in the schema -- the privacy rationale for the masked default and the instruction to pass level="full" when the line itself is the object of study -- but it says nothing further about path or profile that the schema does not already carry.

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?

Opens with a specific verb and bounded resource: 'Inventory the cryptography inside one local directory tree, file by file,' then enumerates the file classes read (source, nginx.conf, sshd_config, .ini/.toml, CI, Terraform, K8s). It explicitly separates itself from list_algorithms and from network/host/certificate-store queries, so the sibling boundary is drawn 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?

Gives positive when-to-use ('what a specific project on this machine actually uses'), explicit when-not ('do not use it to ask whether this server knows a given algorithm'), and names the alternative that answers that case, list_algorithms, plus a second exclusion for network endpoints, running hosts and certificate stores. Nothing about tool selection is left to inference.

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