Skip to main content
Glama

Scan a site's composer files for a core upgrade

scan_composer
Read-onlyIdempotent

Which of a site's drupal/* packages need a new release for a target core, and which have none? Send composer.lock and composer.json once; do not query one package at a time. The answer is the release scan for every package, plus extra.patches as check_patches items. Constraints are read by composer's own semver library.

  • composer_lock: the whole file, or its path to get the upload command. A real lock does not fit a call. With the path, the files go from disk to the api by curl and only the plan comes back. composer_json: adds constraints and extra.patches. patches_file and patches_lock: the two documents a site on cweagans/composer-patches 2.x keeps its patches in, since such a site declares none under extra.patches. Sent as text with a lock path, the command lists every patch to send. target_core: 11.4, 11.4.5, or latest for the newest core the site's constraint allows. Without patches, target_from holds the package whose constraint decided latest. When the site requires no core package, latest is the installed core and target_from says so. Empty scans against the installed core (target_is_installed): what can be updated without a core upgrade.

  • installed_unknown: the release data does not have the installed version; the row offers no older release. installed_from_tag: the project's git tag answered instead. Neither is a finding about the site.

  • A sub-module has no releases of its own; drupal.org packages it as a metapackage built from its project's release. Its row says submodule_of and has that project's answer. The lock's type, require and extra.drupal.datestamp fields pair a metapackage with its project.

  • rows, problems first. no_release: no published release supports the target; latest_any and dev_branch say what exists. update: a compatible release the site does not have; latest, latest_core. unknown: not a drupal.org project in the bundle; note says where its releases are. current: installed_supports and nothing newer needed; such a row has package, installed and installed_supports only. counts covers every package even when rows are cut.

  • candidates, on every row that is not current: the newest three releases, each with version, core constraint, date and supports_target. project_profile adds installs and branches to the same three.

  • patches: one item per declared patch with the installed version filled in. Pass them to check_patches after composer update; local paths need the file text. A patch on a package outside drupal/ gets no item and no row; outside_drupal lists it.

  • patches:true answers with plan instead: every patch judged against the release its package would install for target_core. plan.counts: the verdict tally. plan.package_counts: the scan tallies. plan.no_release: the packages that block the target. plan.patches: one row per patch needing a decision (conflicts, unknown, merged, and an applies that only a lenient apply took). plan.applying: the number that apply with nothing to decide. The scan rows are not in a plan; call again without patches for them.

  • A patch whose package has no release for the target is judged against the branch when the lock installs a dev version. Otherwise it is unknown, with the reason in note. plan.warnings: a package is in no_release because of something the site controls. Each warning gives the requirement to change: its own constraint, or its minimum stability. A row's project for reroll_patch is its package without the drupal/ prefix.

  • A plan never has a re-rolled diff. plan.next_step points at reroll_patch, one call per patch, when any patch needs a re-roll.

  • bundle_date: when the release data was published. A release after it is invisible here. Confirm a no_release with composer show or drupal.org before acting.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
patchesNoJudge the site's patches in the same call: each one against the release its package would install for target_core. Returns a verdict per patch instead of items to check yourself.
patch_filesNoThe text of every patch the site declares, keyed by the source as written: a path (patches/x.patch) or its base name, or the URL. Only needed with patches:true. Fetch a URL patch yourself and send its text under that URL. For a merge request .patch URL, send its .diff form under a second key too.
target_coreNoCore to move to: a minor (11.4), a release (11.4.5), or latest for the newest core the site's own constraint allows. Leave empty to scan against the core the site already runs: which packages have a newer release for it.
patches_fileNoThe text of the patches file, for a site on cweagans/composer-patches 2.x that keeps its patches out of composer.json. The path is in its own extra.composer-patches.patches-file, patches.json by default. A site on 2.x declares nothing under extra.patches, so without this its patches are invisible.
patches_lockNoThe text of patches.lock.json, which 2.x of the patch manager writes and applies from. Send it to judge what the site actually applies: it answers alone, over extra.patches and the patches file.
composer_jsonNoThe contents of composer.json (require, require-dev, extra.patches). Send the text; this server cannot read your filesystem. Optional; without it there are no constraints and no patches.
composer_lockYesThe text of composer.lock. A real lock is too big to paste: send its path (composer.lock) instead. The answer is then the curl command that uploads the files from the site root.
installed_coreNoWhat each installed release requires of core, keyed by composer name. Read it from the site's own vendor directory: composer show -f json <pkg>, or the drupal/core entry of its composer.json. Send it and the installed release is judged by what it declares.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / target_core / description
      Previous value: -"Core version to move to, e.g. 11.4 or 11.4.5. Leave empty to scan against the core the site already runs: which packages have a newer release for it."New value: +"Core to move to: a minor (11.4), a release (11.4.5), or latest for the newest core the site's own constraint allows. Leave empty to scan against the core the site already runs: which packages have a newer release for it."
  2. Changed1 schema field changed
    • changedInput schema / properties / patch_files / description
      Previous value: -"The text of every patch listed in extra.patches, keyed by the source as written: a path (patches/x.patch) or its base name, or the URL. Only needed with patches:true. Fetch a URL patch yourself and send its text under that URL. For a merge request .patch URL, send its .diff form under a second key too."New value: +"The text of every patch the site declares, keyed by the source as written: a path (patches/x.patch) or its base name, or the URL. Only needed with patches:true. Fetch a URL patch yourself and send its text under that URL. For a merge request .patch URL, send its .diff form under a second key too."
  3. Changed2 schema fields changed
    • addedInput schema / properties / patches_file
      Added value: +{
      +  "description": "The text of the patches file, for a site on cweagans/composer-patches 2.x that keeps its patches out of composer.json. The path is in its own extra.composer-patches.patches-file, patches.json by default. A site on 2.x declares nothing under extra.patches, so without this its patches are invisible.",
      +  "type": "string"
      +}
    • addedInput schema / properties / patches_lock
      Added value: +{
      +  "description": "The text of patches.lock.json, which 2.x of the patch manager writes and applies from. Send it to judge what the site actually applies: it answers alone, over extra.patches and the patches file.",
      +  "type": "string"
      +}
  4. Changed2 schema fields changed
    • changedInput schema / properties / composer_json / description
      Previous value: -"The text of composer.json, not a path (require, require-dev, extra.patches). Optional; without it there are no constraints and no patches."New value: +"The contents of composer.json (require, require-dev, extra.patches). Send the text; this server cannot read your filesystem. Optional; without it there are no constraints and no patches."
    • changedInput schema / properties / composer_lock / description
      Previous value: -"The text of composer.lock, not a path."New value: +"The text of composer.lock. A real lock is too big to paste: send its path (composer.lock) instead. The answer is then the curl command that uploads the files from the site root."
  5. Changed1 schema field changed
    • changedInput schema / properties / patch_files / description
      Previous value: -"The text of each local patch file listed in extra.patches, keyed by the path as written (patches/x.patch) or its base name. Only needed with patches:true. URL patches need nothing."New value: +"The text of every patch listed in extra.patches, keyed by the source as written: a path (patches/x.patch) or its base name, or the URL. Only needed with patches:true. Fetch a URL patch yourself and send its text under that URL. For a merge request .patch URL, send its .diff form under a second key too."
  6. Changed1 schema field changed
    • changedInput schema / properties / composer_lock / description
      Previous value: -"The text of composer.lock, not a path, or the slim form {\"packages\":[{\"name\":…,\"version\":…}]} with only drupal/* packages."New value: +"The text of composer.lock, not a path."
  7. Changed4 schema fields changed
    • changedInput schema / properties / composer_json / description
      Previous value: -"The composer.json contents as text, not a path (require, require-dev, extra.patches). Optional: without it there are no constraints and no patches."New value: +"The text of composer.json, not a path (require, require-dev, extra.patches). Optional; without it there are no constraints and no patches."
    • changedInput schema / properties / composer_lock / description
      Previous value: -"The composer.lock contents as text (not a path), or the slim form {\"packages\":[{\"name\":…,\"version\":…}]} with only drupal/* packages (a few KB instead of hundreds)."New value: +"The text of composer.lock, not a path, or the slim form {\"packages\":[{\"name\":…,\"version\":…}]} with only drupal/* packages."
    • changedInput schema / properties / installed_core / description
      Previous value: -"What each installed release requires of core, keyed by composer name, read from the site's own vendor directory (composer show -f json <pkg>, or the drupal/core entry of its composer.json). The release data here can be months behind a project; a site cannot. Send it and the installed release is judged as it actually is."New value: +"What each installed release requires of core, keyed by composer name. Read it from the site's own vendor directory: composer show -f json <pkg>, or the drupal/core entry of its composer.json. Send it and the installed release is judged by what it declares."
    • changedInput schema / properties / patch_files / description
      Previous value: -"Text of each local patch file named in extra.patches, keyed by the path as written (patchs/x.patch) or its base name. Only needed with patches:true; URL patches need nothing."New value: +"The text of each local patch file listed in extra.patches, keyed by the path as written (patches/x.patch) or its base name. Only needed with patches:true. URL patches need nothing."
  8. Changed1 schema field changed
    • addedInput schema / properties / installed_core
      Added value: +{
      +  "additionalProperties": {
      +    "type": "string"
      +  },
      +  "description": "What each installed release requires of core, keyed by composer name, read from the site's own vendor directory (composer show -f json <pkg>, or the drupal/core entry of its composer.json). The release data here can be months behind a project; a site cannot. Send it and the installed release is judged as it actually is.",
      +  "type": "object"
      +}
  9. Changed2 schema fields changed
    • addedInput schema / properties / patch_files
      Added value: +{
      +  "additionalProperties": {
      +    "type": "string"
      +  },
      +  "description": "Text of each local patch file named in extra.patches, keyed by the path as written (patchs/x.patch) or its base name. Only needed with patches:true; URL patches need nothing.",
      +  "type": "object"
      +}
    • addedInput schema / properties / patches
      Added value: +{
      +  "description": "Judge the site's patches in the same call: each one against the release its package would install for target_core. Returns a verdict per patch instead of items to check yourself.",
      +  "type": "boolean"
      +}
  10. Changed2 schema fields changed
    • changedInput schema / properties / composer_json / description
      Previous value: -"The composer.json text (require, require-dev, extra.patches). Optional: without it there are no constraints and no patches."New value: +"The composer.json contents as text, not a path (require, require-dev, extra.patches). Optional: without it there are no constraints and no patches."
    • changedInput schema / properties / composer_lock / description
      Previous value: -"The composer.lock text, or the slim form {\"packages\":[{\"name\":…,\"version\":…}]} with only drupal/* packages (a few KB instead of hundreds)."New value: +"The composer.lock contents as text (not a path), or the slim form {\"packages\":[{\"name\":…,\"version\":…}]} with only drupal/* packages (a few KB instead of hundreds)."
  11. Added

TDQS

A4.7/5.0
Behavior5/5

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

Annotations cover the safety profile (readOnly/idempotent/non-destructive/closed-world), and the description adds substantial behavior beyond them: data freshness (bundle_date makes later releases invisible), the distinction that installed_unknown/installed_from_tag are not findings about the site, and that a plan omits scan rows and never contains a re-rolled diff.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

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

The purpose is front-loaded, but the body is a ~600-word wall of dash-prefixed fragments whose bullet semantics are ambiguous, with some cryptic lines ('the files go from disk to the api by curl'). Length is defensible given no output schema, but structure and readability suffer.

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 full return burden and does so: it documents rows/counts/candidates, the patches items, and the plan shape (counts, package_counts, no_release, patches, applying, warnings, next_step). An agent has what it needs to interpret results correctly.

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% and the schema descriptions are already rich, so the baseline is 3. The description still adds real meaning the schema doesn't: patches:true switches the return shape to a plan, patches_lock answers alone over extra.patches and the patches file, and an empty target_core scans against the installed core.

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?

The opening sentence states a precise verb+resource+scope: which drupal/* packages need a new release for a target core. It also implicitly differentiates from siblings by naming check_patches and reroll_patch as downstream steps, so an agent knows where this tool sits in the workflow.

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?

Explicit when-to-use ('send composer.lock and composer.json once'), an explicit exclusion ('do not query one package at a time'), and explicit routing to alternatives ('pass them to check_patches after composer update', 'plan.next_step points at reroll_patch'). It even states when to re-call the tool without patches.

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.

Resources