Skip to main content
Glama

Newest compatible version

find_compatible_version
Read-only

Finds the newest stable, non-withdrawn version of a package whose own declared requirements admit the runtimes you give it: npm engines and peerDependencies, PyPI Requires-Python, Rust rust-version (minimum Rust), PHP require.php and required packages. Returns the best version with the per-constraint checks, the newest release that is incompatible together with the reason it fails, and a list of unverified constraints (a version that declares nothing for a constraint is not counted against it but is flagged). Read-only and requires no authentication. If per-version requirement data for a package is still being loaded, the result has status "requirements_not_synced_yet" and retry_after_s. Use it when a project is pinned to an older Node, React, Python, Rust or PHP and the latest release may not support it. For the plain latest version use package_status; to check whether the runtime itself is still supported use eol_status.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesExact package name, e.g. "vite", "django", "tokio" or "laravel/framework"
withYesComma-separated name@version constraints. npm: "node@18,react@18"; pypi: "python@3.8"; crates: "rust@1.70"; packagist: "php@8.1" or other packages such as "illuminate/support@10". A bare major such as "18" means any 18.x
ecosystemYesRegistry to query: "npm" (JavaScript/TypeScript), "pypi" (Python), "crates" (Rust, crates.io) or "packagist" (PHP, Composer; names have the form "vendor/package")

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • changedInput schema / properties / ecosystem / description
      Previous value: -"Package ecosystem (crates = Rust/crates.io, packagist = PHP/Composer, names like \"laravel/framework\")"New value: +"Registry to query: \"npm\" (JavaScript/TypeScript), \"pypi\" (Python), \"crates\" (Rust, crates.io) or \"packagist\" (PHP, Composer; names have the form \"vendor/package\")"
    • changedInput schema / properties / name / description
      Previous value: -"Package name"New value: +"Exact package name, e.g. \"vite\", \"django\", \"tokio\" or \"laravel/framework\""
    • changedInput schema / properties / with / description
      Previous value: -"Comma-separated constraints: \"node@18,react@18\" (npm), \"python@3.8\" (pypi), \"rust@1.70\" (crates) or \"php@8.1\" (packagist)"New value: +"Comma-separated name@version constraints. npm: \"node@18,react@18\"; pypi: \"python@3.8\"; crates: \"rust@1.70\"; packagist: \"php@8.1\" or other packages such as \"illuminate/support@10\". A bare major such as \"18\" means any 18.x"
  2. Changed3 schema fields changed
    • changedInput schema / properties / ecosystem / description
      Previous value: -"Package ecosystem"New value: +"Package ecosystem (crates = Rust/crates.io, packagist = PHP/Composer, names like \"laravel/framework\")"
    • changedInput schema / properties / ecosystem / enum
      Previous value: -[
      -  "npm",
      -  "pypi"
      -]New value: +[
      +  "npm",
      +  "pypi",
      +  "crates",
      +  "packagist"
      +]
    • changedInput schema / properties / with / description
      Previous value: -"Comma-separated constraints: \"node@18,react@18\" (npm) or \"python@3.8\" (pypi)"New value: +"Comma-separated constraints: \"node@18,react@18\" (npm), \"python@3.8\" (pypi), \"rust@1.70\" (crates) or \"php@8.1\" (packagist)"
  3. Added

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint and openWorldHint, but the description adds real behavioral context: no authentication required, the full shape of the result (best version, incompatible newest release with reason, unverified constraints, per-constraint checks), and the transient requirements_not_synced_yet status with retry_after_s. This meaningfully exceeds 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.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the core definition and scoping before the return-value detail and the alternatives. It is dense and long, but nearly every clause adds distinct information (constraint semantics, retry status, when-to-use, alternatives); a small amount of compression is possible.

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?

With no output schema, the description carries the return-value burden and does so fully – best version, per-constraint checks, incompatible release plus reason, unverified constraints, and the transient status field. Combined with the when-to-use guidance and named alternatives, an agent has everything needed to select and call it.

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, and the schema already documents all three parameters including the with-constraint format. The description adds semantic value by enumerating which runtime constraints are actually evaluated per ecosystem (npm engines/peerDependencies, PyPI Requires-Python, Rust rust-version, PHP require.php), which goes beyond the schema's examples.

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 precise verb+resource (finds the newest stable, non-withdrawn version of a package) with the key qualifier that the package's declared requirements must admit the given runtimes. It distinguishes itself clearly from siblings by naming package_status and eol_status and the conditions under which each is preferred.

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?

Explicitly gives the triggering scenario (a project pinned to an older Node, React, Python, Rust or PHP where the latest release may not support it) and names two alternatives with their own selection conditions (package_status for plain latest, eol_status for runtime support). Nothing 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.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.