Skip to main content
Glama

Query Batch

query_batch
Read-onlyIdempotent

Batch vulnerability query against OSV.dev (up to 1000 entries per call), for SBOM-style "scan every dependency in this lockfile" workflows. Pass an array of {package:{name,ecosystem}, version?} or {commit} entries. Returns the vuln IDs matched per query (use get_vulnerability for full detail per ID). Keyless.

Example tool call

This call uses example arguments supplied in the tool’s input schema.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "queries": [
        {
          "package": {
            "name": "django",
            "ecosystem": "PyPI"
          },
          "version": "3.0.0"
        },
        {
          "package": {
            "name": "log4j-core",
            "ecosystem": "Maven"
          },
          "version": "2.14.1"
        },
        {
          "package": {
            "name": "lodash",
            "ecosystem": "npm"
          },
          "version": "4.17.20"
        }
      ]
    },
    "name": "query_batch"
  }
}

Input Schema

NameRequiredDescriptionDefault
queriesYesUp to 1000 query objects. Each: {package:{name,ecosystem}, version?} or {commit}.

Output Schema

NameRequiredDescriptionDefault
resultsNoBatch query results (one per input query)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / examples
      Previous value: -[
      -  {
      -    "queries": [
      -      {
      -        "package": {
      -          "ecosystem": "PyPI",
      -          "name": "django"
      -        },
      -        "version": "3.0.0"
      -      },
      -      {
      -        "package": {
      -          "ecosystem": "Maven",
      -          "name": "log4j-core"
      -        },
      -        "version": "2.14.1"
      -      },
      -      {
      -        "commit": "a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6"
      -      }
      -    ]
      -  }
      -]New value: +[
      +  {
      +    "queries": [
      +      {
      +        "package": {
      +          "ecosystem": "PyPI",
      +          "name": "django"
      +        },
      +        "version": "3.0.0"
      +      },
      +      {
      +        "package": {
      +          "ecosystem": "Maven",
      +          "name": "log4j-core"
      +        },
      +        "version": "2.14.1"
      +      },
      +      {
      +        "package": {
      +          "ecosystem": "npm",
      +          "name": "lodash"
      +        },
      +        "version": "4.17.20"
      +      }
      +    ]
      +  }
      +]
  2. Added

TDQS

A4.3/5.0
Behavior4/5

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

Adds context beyond the annotations: 'Keyless' (no auth required), the 1000-entry ceiling, and the fact that the response contains only matched vuln IDs rather than full records. Rate limits and partial-failure behavior for oversized batches are not mentioned.

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 dense sentences, front-loaded with purpose and limit, then the input shape and the follow-up pointer. No filler or repeated schema text beyond what is needed for orientation.

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, so return values need not be enumerated, and the description nonetheless signals the ID-only return and the next tool to call. Auth, scale limit, input alternatives, and use case are all present for a one-parameter tool.

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 single parameter is already documented with the same entry shapes. The description restates {package:{name,ecosystem}, version?} and {commit} without adding syntax, error, or mutual-exclusivity rules, so it matches the baseline.

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+resource (batch vulnerability query against OSV.dev) with a hard scope marker (up to 1000 entries per call) and an intended workflow (SBOM lockfile scanning). The batch/scale framing makes it distinguishable from single-package and commit-oriented siblings.

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 use case ('scan every dependency in this lockfile') and routes the agent onward to get_vulnerability for full per-ID detail. It does not explicitly contrast with query_package_vulns or query_by_commit, which is the main remaining gap.

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.