Skip to main content
Glama

Osv Query Commit

osv_query_commit
Read-onlyIdempotent

Query known vulnerabilities for one full Git commit hash (40 hexadecimal SHA-1 or 64 hexadecimal SHA-256 characters, case-insensitive). Abbreviated hashes are rejected. Returns advisory summaries, record-wide severity and GIT ranges with repositories and ordered fix events; use osv_get_vulnerability for full records. No package-specific fixedVersions are inferred. For overflow, repeat the original input with page: overflow.page. Continue the same path with offset: page.nextOffset and revision: page.revision until nextOffset is null. Retrieve entries[].deferred.path separately at offset zero without a revision. Do not pass the output page object as input. Pages are fresh lookups; restart a changed node without a revision. Transmission overflow and upstream truncated are separate; neither confirms clean.

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": {
      "commit": "<commit>"
    },
    "name": "osv_query_commit"
  }
}

Input Schema

NameRequiredDescriptionDefault
pageNoRepeat the original commit with page: overflow.page first, then select path, offset: page.nextOffset and revision: page.revision.
commitYesFull Git commit hash: 40 SHA-1 or 64 SHA-256 hex characters, case-insensitive.
cursorNoPass nextCursor unchanged with the same effective query. Repeat this input cursor when retrieving fields from a resumed response.

Output Schema

NameRequiredDescriptionDefault
pageNoOne bounded page of an addressed normalized node.
errorNoPresent when the call failed. Absent on success.
vulnsNoMatching advisories. An empty initial result confirms no known vulnerabilities only when truncated is false. An empty terminal resume confirms exhaustion of the continuation.
noticeNoClean, upstream-incomplete, or exhausted continuation outcome.
previewNoCompact view; overflow identifies omissions. This is not the complete record.
overflowNoTransmission overflow disclosure; independent of upstream truncation.
queryMetaNoEffective commit query and retrieved count.
truncatedNoTrue when the page cap or operation deadline interrupted OSV matching. Use nextCursor to continue.
nextCursorNoResume the OSV query by passing this value unchanged as cursor with the same identifier.
continuationExhaustedNoThe resumed OSV continuation is exhausted and returned no further advisories.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedOutput schema / properties / notice
      Added value: +{
      +  "description": "Clean, upstream-incomplete, or exhausted continuation outcome.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / vulns / items / properties / upstream
      Added value: +{
      +  "description": "IDs of upstream vulnerabilities covered by this advisory, in OSV order. Use CVE IDs for NVD lookup. Absent when OSV supplies no upstream list.",
      +  "items": {
      +    "description": "Upstream vulnerability ID.",
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
  2. Changed7 schema fields changed
    • addedInput schema / properties / cursor
      Added value: +{
      +  "description": "Pass nextCursor unchanged with the same effective query. Repeat this input cursor when retrieving fields from a resumed response.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / continuationExhausted
      Added value: +{
      +  "const": true,
      +  "description": "The resumed OSV continuation is exhausted and returned no further advisories.",
      +  "type": "boolean"
      +}
    • changedOutput schema / properties / error / properties / data / properties / reason / description
      Previous value: -"Machine-readable failure mode. Declared by this tool: `invalid_commit_query`: OSV rejects the complete commit query. `invalid_page_path`: The requested field is unknown or cannot fit a bounded page. `stale_page_revision`: The freshly retrieved node changed. Other values are possible when a failure originates below the handler."New value: +"Machine-readable failure mode. Declared by this tool: `invalid_cursor`: The cursor is malformed, belongs to another query, or was rejected by OSV. `invalid_commit_query`: OSV rejects the complete commit query. `invalid_page_path`: The requested field is unknown or cannot fit a bounded page. `stale_page_revision`: The freshly retrieved node changed. Other values are possible when a failure originates below the handler."
    • changedOutput schema / properties / error / properties / data / properties / reason / examples
      Previous value: -[
      -  "invalid_commit_query",
      -  "invalid_page_path",
      -  "stale_page_revision"
      -]New value: +[
      +  "invalid_cursor",
      +  "invalid_commit_query",
      +  "invalid_page_path",
      +  "stale_page_revision"
      +]
    • addedOutput schema / properties / nextCursor
      Added value: +{
      +  "description": "Resume the OSV query by passing this value unchanged as cursor with the same identifier.",
      +  "type": "string"
      +}
    • changedOutput schema / properties / truncated / description
      Previous value: -"More OSV pages remain beyond the fetch cap; an empty truncated list is not confirmed clean."New value: +"True when the page cap or operation deadline interrupted OSV matching. Use nextCursor to continue."
    • changedOutput schema / properties / vulns / description
      Previous value: -"Matching advisories. Empty confirms no known vulnerabilities only when truncated is false."New value: +"Matching advisories. An empty initial result confirms no known vulnerabilities only when truncated is false. An empty terminal resume confirms exhaustion of the continuation."
  3. Added

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already establish read-only, open-world, idempotent behavior, and the description adds genuinely new operational context: pages are fresh lookups, a changed node must be restarted without a revision, the output page object must not be passed back as input, and upstream truncation versus transmission overflow are distinct and neither implies a clean result. That is substantial disclosure beyond the structured fields.

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 purpose and input constraint are front-loaded in the first two sentences, followed by return-shape expectations and then pagination mechanics in the order an agent needs them. The telegraphic style is dense but each sentence carries a distinct operational rule with no filler.

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?

An output schema exists, yet the description still signals what comes back (advisory summaries, record-wide severity, GIT ranges with fix events) and explicitly warns that no package-specific fixedVersions are inferred. For a tool with nested pagination and three parameters, the resume/restart semantics are fully covered, leaving no operational gap.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, but the description adds workflow-level meaning the schema only states locally: repeat the original commit with page: overflow.page first, then set offset to page.nextOffset and revision to page.revision until nextOffset is null, and fetch deferred child paths at offset zero with no revision. This clarifies ordering and interaction between the nested page fields rather than merely restating them.

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 (query known vulnerabilities for one full Git commit hash), pins the exact accepted input shape (40/64 hex, case-insensitive), and explicitly excludes abbreviated hashes. It also distinguishes itself from osv_get_vulnerability, which returns full records, so an agent can pick correctly 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 Guidelines4/5

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

Gives a clear condition of use (single full commit hash) and names the alternative for full records via osv_get_vulnerability. The remainder of the guidance targets pagination rather than tool selection, so it stops short of a complete when-to-use/when-not matrix.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.