Skip to main content
Glama
tedorigawa001

OSV-Scanner-MCP

脆弱性を解消する推奨アップグレードの提案

suggest_fix

Scans a project for vulnerable dependencies and suggests the closest safe upgrade version for each, covering Java, JavaScript, Python, and Go.

Instructions

scan_projectと同じ検出でプロジェクトをスキャンし、脆弱な依存パッケージごとに推奨アップグレードバージョンを提案する。推奨はJava(Maven / Gradle)・JavaScript(npm)・Python(PyPI)・Goに対応。現在のバージョンに最も近いリリース系統の修正版を優先する3段階フォールバック(same_minor: 同一系統内 → major_internal: 同一メジャー内 → cross_major: メジャーアップグレード)で選定し、推奨バージョン・アップグレード距離(upgrade_tier)・CVEごとの修正版を返す。npm・Go・PyPIでは0.x系のマイナー更新もcross_major(破壊的変更の可能性)。requirements.txtの下限(>=)でスキャンした依存はversion_is_lower_boundを付け、推奨は下限の引き上げを意味する。直接/推移的依存の別(dependency_relation、npmはintroduced_by・declared_in)に応じて更新方法(update_hint)を示す。推奨先はapi.osv.devに照会し、現在の版には該当しない既知の脆弱性があれば避けて選び直す(結果はcandidate_check。has_known_vulnerabilities・failed・skippedの場合は推奨先の安全性が確認できていない。conflictは判定の食い違いで推奨を保留)。候補を全修正対象CVEの影響範囲と照合し、情報不足の場合は推奨を保留する。プレリリース版は正式版で解消できない場合だけ推奨し、recommended_is_prereleaseを付ける。現在より新しい修正版候補のないCVEはunfixedとして別表示し、推奨先での判定も返す。応答のcoverageを必ず確認すること(complete=falseなら提案に含まれない依存がある)。dependency_resolution.warningがある場合は推移的依存の脆弱性が提案に含まれない。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_pathYesスキャン対象のプロジェクトディレクトリ、または対応するlockfile・マニフェストの絶対パス

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.7.1
    • changedInput schema / properties / project_path / description
      Previous value: -"スキャン対象のプロジェクトディレクトリ、またはpom.xml/gradle.lockfileの絶対パス"New value: +"スキャン対象のプロジェクトディレクトリ、または対応するlockfile・マニフェストの絶対パス"
  2. Addedv0.1.11

TDQS

A4.2/5.0
Behavior5/5

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

With no annotations to carry the load, the description discloses substantial behavior: the three-tier fallback selection (same_minor/major_internal/cross_major), candidate_check safety re-query against api.osv.dev, handling of prerelase and unfixed CVEs, coverage and dependency_resolution.warning caveats. This is exactly the kind of behavioral context an agent needs for a complex remediation tool.

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 in the first sentence and nearly every subsequent sentence conveys distinct behavioral detail, so little is wasted. However it is delivered as one dense unbroken paragraph with no structuring, which makes the rich detail harder to scan than it needs to be.

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 tool with no annotations and no output schema, the description covers the return semantics extensively (upgrade_tier, version_is_lower_bound, dependency_relation/update_hint, recommended_is_prerelease, candidate_check, unfixed, coverage). An agent has everything needed to interpret results and handle caveats correctly.

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 there is a single parameter, so the schema already documents project_path fully; the description adds no extra meaning about the parameter. Baseline of 3 applies when the schema does the heavy lifting.

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 and resource: it scans the project with the same detection as scan_project and proposes a recommended upgrade version per vulnerable dependency. It explicitly names the sibling scan_project and clarifies how it differs (same scan, plus fix recommendations), so an agent can distinguish it from the other scan_* tools.

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

Usage Guidelines3/5

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

Usage is implied through the reference to scan_project (same detection, but adds remediation) and post-call guidance to verify coverage, but there is no explicit when/when-not statement or alternative routing (e.g. when to prefer scan_project or explain_vulnerability). It is enough to infer intent but leaves the choice among siblings to the agent.

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