Skip to main content
Glama

Composer Require

composer_require

Install one or more Drupal modules or PHP packages via Composer, accepting space-separated names plus optional version and dev flags.

Instructions

Require one or more packages via composer.

Several packages may be given at once, space separated, the way composer require itself accepts them. They used to arrive as a single argv token, so composer read "drupal/pathauto" as a version constraint on "drupal/token" and refused the command with "Could not parse version constraint" -- a confusing error for the ordinary request "install these two modules". A package name never contains a space, so the split is unambiguous.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
devNo
packageYes
versionNo
working_dirNo.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.6/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full behavioral burden, yet it says nothing about side effects (writing composer.json/composer.lock, network fetching), permissions required, or reversibility. The only behavioral detail is a historical note about a parsing bug, which does not help the agent understand what the call actually does to the project.

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 a large share of the text is an anecdotal post-mortem about an argv-splitting bug. That history is interesting but not load-bearing for an agent deciding how to call the tool, so the description is longer than its useful content warrants.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/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 explained, but for a mutation tool with zero annotations and 0% parameter coverage the description leaves major gaps: the meaning of dev/version/working_dir and the side effects on the project are missing. The one thing it does explain well (space-separated packages) is not enough.

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

Parameters2/5

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

Schema coverage is 0% across four parameters, so the description must compensate. It explains only the 'package' argument's multi-value syntax, and even that is framed around a past bug; 'dev', 'version', and 'working_dir' remain completely undocumented in both schema and description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening line states a specific verb and resource ('Require one or more packages via composer'), which is unambiguous and immediately recognizable. It does not, however, differentiate itself from close siblings such as composer_install, composer_update, or composer_audit, so an agent must infer the boundary.

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

Usage Guidelines2/5

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

There is no explicit when-to-use guidance relative to the many composer/drush siblings. The multi-package format is documented, which is invocation syntax rather than selection guidance, and no prerequisites or exclusions are given.

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

Deploy Server

Other Tools