Skip to main content
Glama

Drupal MCP Server

CI codecov PyPI version Python versions PyPI downloads License: MIT

A Model Context Protocol (MCP) server for Drupal operations. Provides 414 tools across 41 modules for site analysis, migration, content management, configuration, commerce, headless, DevOps, security, and more.

Demo

A real run — version check, the nine supported clients, live detection of the agents on this machine, and a zero-install start straight from PyPI:

Related MCP server: Axolot MCP Server

Why Use This?

  • Unified interface — Access JSON:API, GraphQL, Drush, and AI through one MCP server

  • AI-powered — Content analysis, field mapping, and migration planning with your choice of LLM

  • Multi-transport — Stdio for desktop apps, HTTP/SSE for remote deployments

  • Secure — Input validation, OAuth 2.1, no shell injection

  • Comprehensive — 41 tool modules covering every major Drupal subsystem

Features

  • JSON:API & GraphQL — Full support for Drupal's REST endpoints, schema introspection, sparse fieldsets

  • Drush Integration — Execute any Drush command (cache, cron, updb, watchdog, php-eval, etc.)

  • DDEV/Lando/Acquia Support — Local and cloud development environment management

  • AI-Powered Tools — Multi-provider AI (Ollama, OpenAI, Anthropic, NVIDIA NIM, Google)

  • Migration Assistance — Generate and validate migration configurations, D7→D10 upgrades

  • Security Audits — PHPStan, Drupal Check, dependency scanning, SQL injection, XSS, CSP, file permissions

  • Content Management — CRUD for nodes, media, users, taxonomy, comments, revisions, paragraphs

  • Commerce — Stores, products, orders, payments, promotions, shipping (18 tools)

  • Configuration — Export/import, sync, diff, split (7 tools)

  • DevOps — Database queries, Composer, cache, cron, queues, backups (20 tools)

  • Headless — Next.js/Gatsby helpers, JSON:API optimization, GraphQL schema (10 tools)

  • Search — Search API servers, indexes, facets, reindex (13 tools)

  • Multilingual — Languages, content translation, interface translation, config translation (18 tools)

  • Module Development — Scaffolding for modules, services, plugins, forms, controllers, tests (12 tools)

  • Theme Development — Theme creation, libraries, regions, templates, preprocessing, assets (11 tools)

  • Webform — Forms, submissions, elements, handlers, tokens, export (16 tools)

Installation

pip install drupal-mcp-server

Or with uv:

uv pip install drupal-mcp-server

Quickstart

1. Configure

cp examples/.env.example .env

Minimal .env:

DRUPAL_BASE_URL=https://your-drupal-site.com
DRUPAL_USERNAME=admin
DRUPAL_PASSWORD=secret

2. Run

drupal-mcp

3. Use with Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "drupal": {
      "command": "drupal-mcp",
      "env": {
        "DRUPAL_BASE_URL": "https://your-drupal-site.com",
        "DRUPAL_USERNAME": "admin",
        "DRUPAL_PASSWORD": "secret"
      }
    }
  }
}

AI Coding Agents

Register the server with any MCP client in one command:

drupal-mcp install

It detects the agents on your machine — Claude Code, Claude Desktop, Cursor, Codex CLI, OpenCode, Windsurf, Pi, Hermes Agent and OpenClaw — gathers DRUPAL_* settings from ./.env or the environment, and writes each client's config (preferring the client's own mcp add command when it has one).

drupal-mcp install --client claude-code --print   # preview without writing
drupal-mcp install --command 'uvx --from drupal-mcp-server drupal-mcp'  # run from PyPI, no install

See the AI Coding Agents guide for per-client copy-paste snippets, options, and caveats.

Configuration

Drupal connection

Variable

Default

Description

DRUPAL_BASE_URL

http://localhost

Base URL of the Drupal site

DRUPAL_USERNAME / DRUPAL_PASSWORD

—

Credentials (see below)

DRUPAL_VERIFY_SSL

true

Set false for self-signed dev certs (DDEV, Lando)

Authentication

Set DRUPAL_USERNAME and DRUPAL_PASSWORD. Drupal rejects basic auth on its write endpoints with 403, so the server logs in to /user/login, reuses the session cookie, and attaches the CSRF token that mutating JSON:API requests require. Basic auth headers are still sent when a session cannot be established, so reads keep working on sites without /user/login.

Other methods, used when the username/password pair is not set:

  1. OAuth2 — Set DRUPAL_OAUTH_CLIENT_ID, DRUPAL_OAUTH_CLIENT_SECRET, DRUPAL_OAUTH_TOKEN_URL

  2. Bearer Token — Set DRUPAL_API_TOKEN, sent as Authorization: Bearer

Drush

Drush tools shell out to DRUSH_PATH (default drush). It may contain arguments, so container-based setups work:

DRUSH_PATH="ddev drush"    # start the MCP server from the project directory

AI Providers

Set DEFAULT_AI_PROVIDER to one of:

  • ollama (default, local)

  • openai

  • anthropic

  • nvidia_nim

  • google

Transport

Set MCP_TRANSPORT to one of:

  • stdio (default, for desktop apps)

  • http (for remote HTTP deployment)

  • sse (for Server-Sent Events)

  • streamable-http (for Streamable HTTP)

HTTP transports serve tools that execute drush, composer and shell commands, so the server refuses to bind one unless DRUPAL_OAUTH_CLIENT_ID is set — MCP-side tokens are then issued and checked in-process; set MCP_ALLOW_INSECURE_HTTP=1 to serve unauthenticated on the default loopback MCP_HOST (127.0.0.1) if you accept the risk. See Configuration. Once bound, MCP_READ_ONLY=1 hides every tool that writes (185 of 414 remain — no drush, composer, shell, or file output) and MCP_RATE_LIMIT caps requests per client with 429 + Retry-After.

Tools (414 total)

Accessibility (5)

  • accessibility_axe_scan — Run axe-core accessibility scan

  • accessibility_wcag_check — WCAG compliance check

  • accessibility_color_contrast — Color contrast validation

  • accessibility_aria_validate — ARIA attribute validation

  • accessibility_report_generate — Generate accessibility report

AI (4)

  • ai_analyze_content_quality — Analyze content quality with AI

  • ai_suggest_field_mappings — Suggest field mappings between bundles

  • ai_generate_migration_plan — Generate migration plan with AI

  • ai_translate_content — Translate content with AI

Analysis (9)

  • analyze_d7_site — Analyze D7 site for D10 readiness

  • analyze_d9_site — Analyze D9+ for deprecated APIs

  • inventory_content_types — List all content types

  • inventory_modules — List all modules

  • map_modules_d7_to_d10 — AI-powered module mapping D7→D10

  • find_deprecated_code — Scan for deprecated APIs

  • find_entity_references — Bundles whose reference fields target an entity type

  • search_entities — Substring search across titles, names, and subjects

  • find_entity_by_path — Resolve a URL path or alias to its entity

Code Audit (7)

  • code_audit_phpstan — Run PHPStan static analysis

  • drupal_check — Run Drupal Check

  • code_sniffer — Run PHP_CodeSniffer

  • deprecation_scan — Scan for deprecated code

  • security_audit — Security-focused code audit

  • composer_audit — Composer dependency audit

  • code_quality_report — Combined code quality report

Codebase (12)

  • codebase_index_refresh, codebase_search, codebase_module_list, codebase_module_describe

  • codebase_unused_modules, codebase_redundancy_check, codebase_hooks_find, codebase_paths_list

  • codebase_files_list, codebase_directory_tree, codebase_file_read, codebase_function_read

Comments (10)

  • comment_list, comment_get, comment_create, comment_update, comment_delete

  • comment_thread_list, comment_approve, comment_unapprove

  • comment_field_settings, comment_field_configure

Commerce (18)

  • commerce_store_list, commerce_store_get, commerce_store_create, commerce_store_update

  • commerce_product_list, commerce_product_get, commerce_product_create, commerce_product_update

  • commerce_order_list, commerce_order_get, commerce_order_create, commerce_order_update

  • commerce_payment_gateway_list, commerce_payment_gateway_get

  • commerce_promotion_list, commerce_promotion_create

  • commerce_shipping_method_list, commerce_shipping_method_create

Config (8)

  • config_get, config_set, export_config, import_config, sync_config, diff_config, split_config, config_status

Contact (9)

  • contact_form_list, contact_form_get, contact_form_create, contact_form_update, contact_form_delete

  • contact_message_list, contact_message_get, contact_message_delete, contact_spam_check

Content (14)

  • create_node, get_node, update_node, delete_node, query_nodes

  • upload_media, create_media

  • clean_nodes_ai, map_fields_ai, bulk_update_nodes

  • fix_media_references, bulk_update_aliases

  • analyze_content_quality, generate_test_content

Database (4)

  • db_query, db_tables, db_table_info, db_count

DevOps (20)

  • drush_command — Execute any Drush command

  • ddev_setup, ddev_start, ddev_stop, ddev_exec

  • lando_start, lando_stop, lando_exec, lando_setup

  • acquia_deploy, backup_database, cache_rebuild

  • composer_install, composer_require, composer_update

  • drush_cron, drush_watchdog, cache_clear, drush_updb, drush_php_eval

Drupal.org (12)

  • module_search, module_get, module_versions, module_dependencies, module_compatibility

  • theme_search, theme_get, release_history, project_usage

  • module_issues_search, module_popular, module_recommendation

Exports (4)

  • export_nodes, export_users, export_media, export_taxonomy

Feeds (12)

  • feeds_feed_list, feeds_feed_get, feeds_feed_create, feeds_feed_update, feeds_feed_delete

  • feeds_import, feeds_import_status, feeds_log_list

  • feeds_tamper_list, feeds_parser_list, feeds_fetcher_list, feeds_processor_list

Fields (10)

  • field_config_list, field_config_get, field_config_create, field_config_update, field_config_delete

  • field_storage_list, field_storage_get, field_storage_create, field_storage_update, field_storage_delete

Headless (10)

  • jsonapi_schema_get, jsonapi_include_optimize, jsonapi_sparse_fieldsets, jsonapi_resources_list, jsonapi_resource_types

  • graphql_schema_get, graphql_query, graphql_schema_extend

  • nextjs_helpers_generate, gatsby_helpers_generate

Layout Builder (15)

  • block_list, block_get, block_create, block_update, block_delete, block_place

  • layout_builder_list, layout_builder_get, layout_builder_create, layout_builder_update

  • layout_builder_sections_list, layout_builder_section_add

  • block_plugin_list, block_region_list, layout_builder_override_remove

The block_* tools work normally. Layout Builder has no JSON:API resource, so the layout_builder_* tools go through Drush to the real API instead: entity_view_display holds the sections, and per-entity overrides live in the entity's layout_builder__layout field. layout_builder_list reports which displays have Layout Builder enabled; layout_builder_get, layout_builder_sections_list, layout_builder_section_add, layout_builder_create and layout_builder_update read and write the layout; layout_builder_override_remove reverts an entity's override.

Media Enhanced (8)

  • media_type_list, media_type_get, media_type_create

  • media_create_from_url, media_create_from_base64, media_derivative_generate

  • media_bulk_import, media_library_list

Menus (10)

  • menu_list, menu_get, menu_create, menu_update, menu_delete

  • menu_link_list, menu_link_get, menu_link_create, menu_link_update, menu_link_delete

Metatag (9)

  • metatag_config_list, metatag_config_get, metatag_config_create, metatag_config_update

  • metatag_defaults_get, metatag_defaults_set, metatag_token_list

  • metatag_canonical_set, metatag_jsonld_generate

Migration (17)

  • generate_migration_yaml — Generate migration YAML

  • generate_module_migration — Generate migration module

  • run_migration_test — Test migration with limited records

  • validate_migration — Validate migration config

  • rollback_migration — Rollback a migration

  • sync_media_files — Sync media between paths

  • migrate_taxonomy — Migrate taxonomy vocabularies

  • create_migration_plan — Create a persisted migration manifest

  • get_migration_plan — Read a migration manifest and tracked state

  • list_migration_plans — List migration manifests

  • migration_status — Summarize migration progress

  • migrate_records — Copy a batch of source records to the target site

  • record_migration_result — Record externally executed migration outcomes

  • analyze_source_site — Analyze a source Drupal JSON:API resource type

  • reconcile_migration_counts — Compare source and target counts

  • run_migration_wave — Fetch and migrate one source resource type

  • run_migration — Run an ordered end-to-end migration for all planned types

Moderation (13)

  • moderation_state_list, moderation_state_get, moderation_state_create, moderation_state_update, moderation_state_delete

  • moderation_transition_list, moderation_transition_get, moderation_transition_create, moderation_transition_execute, moderation_transition_delete

  • content_moderation_dashboard, workflow_list, workflow_get

Module Development (12)

  • module_create, module_service_create, module_plugin_create, module_form_create

  • module_controller_create, module_event_subscriber_create, module_hook_implement

  • module_info_generate, module_permission_create, module_config_schema_create

  • module_test_create, module_dependencies_analyze

Multilingual (18)

  • language_list, language_get, language_add, language_enable, language_disable, language_delete

  • content_translation_enable, translation_status, translation_add, translation_update

  • interface_translation_list, interface_translation_add, interface_translation_update, interface_translation_delete

  • config_translation_list, config_translation_add

  • language_negotiation_get, language_negotiation_set

Paragraphs (10)

  • paragraphs_type_list, paragraphs_type_get, paragraphs_type_create, paragraphs_type_update, paragraphs_type_delete

  • paragraphs_item_list, paragraphs_item_get, paragraphs_item_create, paragraphs_item_update, paragraphs_item_delete

Pathauto (8)

  • pathauto_pattern_list, pathauto_pattern_get, pathauto_pattern_create, pathauto_pattern_update, pathauto_pattern_delete

  • pathauto_generate, pathauto_token_list, redirect_pattern_list

Performance (7)

  • performance_query_log, performance_cache_stats, performance_redis_info

  • performance_bigpipe_status, performance_bigpipe_enable, performance_memcached_stats

  • performance_page_load_analyze

Redirects (7)

  • redirect_list, redirect_get, redirect_create, redirect_update, redirect_delete

  • redirect_bulk_create, redirect_bulk_delete

Revisions (5)

  • revision_list, revision_get, revision_revert, revision_delete, revision_diff

Scheduler (7)

  • cron_run, cron_list, queue_list, queue_run, queue_delete, queue_info, queue_create

Search API (13)

  • search_api_server_list, search_api_server_get, search_api_server_create, search_api_server_enable, search_api_server_disable

  • search_api_index_list, search_api_index_get, search_api_index_create, search_api_index_update

  • search_api_index_reindex, search_api_index_clear, search_api_facet_list, search_api_facet_create

Security Audit (10)

  • security_scan — PHPStan with security extensions

  • dependency_scan — Composer audit

  • config_security_check — Drupal config security

  • permission_audit — Role and permission audit

  • sql_injection_scan — SQL injection detection

  • xss_scan — XSS vulnerability detection

  • csp_audit — Content Security Policy audit

  • file_permissions_audit — File permissions audit

  • code_security_scan — Local pattern scan, nothing to install

  • route_access_audit — Route access control classification

Status (4)

  • status_report — The site's status report (/admin/reports/status), read-only

  • database_updates — Pending database updates, read-only

  • available_updates — Packages with newer versions, from composer

  • health_check — Drush, database, JSON:API, and module diagnostics

Taxonomy (10)

  • create_vocabulary, get_vocabulary, update_vocabulary, delete_vocabulary, list_vocabularies

  • create_term, get_term, update_term, delete_term, list_terms

Testing (9)

  • test_run_phpunit, test_run_kernel, test_run_behat, test_run_nightwatch

  • test_scaffold_phpunit, test_scaffold_behat, test_scaffold_nightwatch

  • test_coverage_report, test_list_suites

Theme Analysis (8)

  • theme_active, theme_info, theme_regions, theme_blocks

  • theme_templates, theme_template_overrides, template_suggestions

  • view_template_info

Theme Development (11)

  • theme_create, theme_library_create, theme_region_create, theme_template_override

  • theme_preprocess_function, theme_breakpoint_create, theme_base_change

  • theme_settings_form, theme_asset_optimize, theme_debug_enable, theme_lint_twig

Users (12)

  • create_user, get_user, get_user_by_email, update_user, delete_user, list_users

  • assign_role, remove_role, list_roles, get_user_roles, block_user, unblock_user

Views (7)

  • views_list, views_get, views_create, views_update, views_delete, views_execute, views_export

Webform (16)

  • webform_list, webform_get, webform_create, webform_update, webform_delete

  • webform_submission_list, webform_submission_get, webform_submission_delete

  • webform_element_list, webform_element_create

  • webform_handler_list, webform_handler_create, webform_handler_update, webform_handler_delete

  • webform_token_list, webform_export_submissions

Documentation

Known limitations

These are real constraints of Drupal and its APIs, not TODOs. Each was confirmed against a live Drupal 11 site under DDEV, and the affected tools say so at runtime rather than returning an opaque error.

  • Layout Builder has no JSON:API resource. The six layout_builder_* tools originally asked JSON:API for a resource that has never existed and returned an opaque 404. They now go through Drush to the real API — sections are the layout_builder.sections third-party setting on entity_view_display, and per-entity overrides live in the entity's layout_builder__layout field — so reading, writing and reverting layouts all work. The API has no display-level lock, so the lock argument marks components rather than the display.

  • Revisions have no collection endpoint. JSON:API addresses a single revision via ?resourceVersion=id:<vid> but exposes no revision listing or deletion, so revision_list and revision_delete return an honest limitation error rather than a 404.

  • Drush offers no per-run queue limit. queue:run drains the whole queue and has neither --limit nor --count. queue_run runs without one and reports that the requested limit could not be applied.

  • Drush only knows registered queues. queue:list and queue:run resolve queue workers that a module registered as a service, so queue_list and queue_info cannot see a queue nothing has registered, and queue_run answers "Queue not found" for one — including a queue queue_create just made. queue_create and queue_delete deliberately go around this and work on any queue name.

  • Composer is its own binary. Drush ships no composer command, so composer_install / composer_require / composer_update / composer_audit run composer directly and need it on PATH (or at ./vendor/bin/composer). They also do not require Drush. When the project is a DDEV or Lando project the command runs as ddev composer / lando composer instead: the host binary resolves against the host's PHP, which once locked in a doctrine/collections release needing 8.4 for a container running 8.3 — Composer's platform check then aborted every subsequent request and took the site down.

  • GraphQL needs a server before /graphql exists. The module installs no default, so graphql_query and graphql_schema_get answer a bare 404 on a fresh site. They now explain that, naming the graphql_server config entity, the execute default arbitrary graphql requests permission, and the fact that basic_auth has to be enabled before credentials reach Drupal at all.

  • langcode is not always writable. With content_translation installed and no bundle configured for translation, JSON:API refuses any write to langcode with a 403 regardless of the value sent — "en" as much as a nonsense one. The create tools omit it unless a language was asked for, so a create succeeds; one that does pass it gets Drupal's own explanation.

  • Security scanning needs PHPStan 1.x. Older PHPStan has no --exclude-path; the tools probe for it and fall back rather than failing.

  • release_history for Drupal 7 projects. packages.drupal.org is the live source for releases, dependencies, and core compatibility. D7-era projects fall back to updates.drupal.org's XML feed, which has been frozen since Drupal 8.

  • DDEV's key is docroot, not webroot. DDEV 1.24 silently drops an unrecognised key, so ddev_setup writes docroot: — an empty docroot makes nginx serve the project root and every request 404s.

Modules the tools target are installed in the test site — Commerce, Paragraphs, Webform, Search API, Feeds, Metatag, Pathauto — so a missing module is no longer the usual explanation for a tool that does nothing. Two resources stay out of reach by design: content_moderation_state is never exposed through JSON:API, and feeds_feed needs a feed type with a feeds_item field configured on its target bundle. Both are reported as not exposed rather than as failures.

Development

# Create venv
python3 -m venv venv
source venv/bin/activate

# Install dev dependencies
pip install -e ".[dev]"

# Run tests
pytest

# Lint
ruff check src/ tests/

# Type check
mypy src/drupal_mcp_server/

The offline suite cannot catch most of the bugs that matter in this package — they need a real Drupal. Live runs do, and tests/live/README.md lists what each one has found so far:

python tests/live/smoke_test.py           # 9 end-to-end cases, ~30s
python tests/live/layout_builder_test.py  # 10 Layout Builder cases, ~60s
python tests/live/queue_test.py           # 18 cron/queue cases, ~60s
python tests/live/filter_check.py         # every hard-coded JSON:API filter
python tests/live/resource_check.py       # every resource name, asked of Drupal
python tests/live/install_modules.py      # the modules the tools assume, ~10 min
python tests/live/sweep.py                # all 414 tools, ~30 min
python tests/live/mcp_call.py list_vocabularies '{}'  # one call, for spot checks

They need ddev running and the site in drupal-live/; tests/live/README.md covers setup.

License

MIT

Available Tools

414 tools
accessibility_aria_validateAccessibility Aria ValidateC

Validate ARIA attributes on entity.

Inputs: entity_id (required), entity_type (required). Returns: object

accessibility_axe_scanAccessibility Axe ScanC

Run axe-core accessibility scan on a URL.

Inputs: url (required), rules, format. Returns: object

accessibility_color_contrastAccessibility Color ContrastB

Check color contrast ratio.

Pure arithmetic: it deliberately does not touch the site, so it works without Drush configured.

Inputs: background (required), foreground (required). Returns: object

accessibility_report_generateAccessibility Report GenerateC

Generate comprehensive accessibility report.

Inputs: urls (required), level, output_dir. Returns: object

accessibility_wcag_checkAccessibility Wcag CheckC

Check WCAG compliance for entity content.

Inputs: entity_id (required), entity_type (required), level. Returns: object

acquia_deployAcquia DeployC

Deploy to Acquia Cloud via acquia-cli or Drush acquia integration.

Supports both acquia-cli (preferred) and legacy Drush acquia commands.

Inputs: environment (required), branch, site_id, timeout, +3 more. Returns: object

ai_analyze_content_qualityAi Analyze Content QualityC

Analyze content quality using AI.

Inputs: content (required). Returns: object

ai_generate_migration_planAi Generate Migration PlanD

Generate migration plan using AI.

Inputs: source_type (required), target_version. Returns: object

ai_suggest_field_mappingsAi Suggest Field MappingsC

Suggest field mappings using AI.

Inputs: source_fields (required), target_bundle (required). Returns: object

ai_translate_contentAi Translate ContentC

Translate content using AI.

Inputs: content (required), target_lang (required), source_lang. Returns: object

analyze_content_qualityAnalyze Content QualityC

Analyze content quality with AI for specific nodes or an entire type.

Inputs: node_ids, content_type. Returns: object

analyze_d7_siteAnalyze D7 SiteC

Analyze a Drupal 7 site for D10 upgrade readiness.

Inputs: site_url (required), auth, include_content, include_modules. Returns: object

analyze_d9_siteAnalyze D9 SiteC

Analyze a Drupal 9+ site for deprecated code and APIs.

Inputs: site_url (required), auth, check_deprecated. Returns: object

analyze_source_siteAnalyze Source SiteC

Analyze a source Drupal JSON:API resource type and optionally store counts in a plan.

username/password authenticate to the source site: JSON:API field access hides attributes (user name/mail, for example) from anonymous requests, so unauthenticated analysis under-reports.

Inputs: token, password, username, source_url, +3 more. Returns: object

assign_roleAssign RoleC

Assign a role to a user.

Inputs: uid (required), role (required). Returns: object

available_updatesAvailable UpdatesA

List packages with newer versions available, from composer.

Read-only (composer outdated); needs the project's composer.json and network access. Packages are grouped into core, contrib, and other. Dev dependencies are excluded unless include_dev is set -- filtered via composer.json's require-dev, because composer marks none of them itself.

With security_only, the outdated list is cross-referenced against composer audit: only packages that are both outdated and covered by a security advisory are returned, with the advisories attached. (The composer_audit tool lists advisories regardless of updates.)

Inputs: include_dev, security_only. Returns: object

backup_databaseBackup DatabaseC

Create database backup via Drush.

Inputs: backup_path. Returns: object

block_createBlock CreateD

Create a new block.

Inputs: id (required), label (required), plugin (required), region, +2 more. Returns: object

block_deleteBlock DeleteC

Delete a block.

Inputs: block_id (required). Returns: object

block_getBlock GetC

Get a single block by ID.

Inputs: block_id (required), include. Returns: object

block_listBlock ListC

List all blocks.

Inputs: filters, page_limit, page_offset. Returns: object

block_placeBlock PlaceC

Place a block in a region with weight.

Inputs: region (required), block_id (required), weight. Returns: object

block_plugin_listBlock Plugin ListC

List available block plugins.

Inputs: filters, page_limit. Returns: object

block_region_listBlock Region ListC

List available regions for a theme.

Inputs: theme. Returns: object

block_updateBlock UpdateD

Update a block.

Inputs: block_id (required), label, region, settings, +1 more. Returns: object

block_userBlock UserC

Block a user account.

Inputs: uid (required). Returns: object

bulk_update_aliasesBulk Update AliasesB

Regenerate URL aliases for a content type.

Alias generation belongs to the Pathauto module, so this runs drush pathauto:generate. The previous implementation ran drush uuri, which is not a Drush command. pattern is not applied here: patterns are pathauto_pattern config objects, which pathauto_pattern_create / pathauto_pattern_update manage.

Inputs: bundle (required), pattern (required), action. Returns: object

bulk_update_nodesBulk Update NodesC

Apply the same field updates to every node matching a set of filters.

Inputs: bundle (required), filters (required), updates (required). Returns: object

cache_clearCache ClearC

Clear specific cache bins.

Inputs: bins. Returns: object

cache_rebuildCache RebuildB

Clear and rebuild all Drupal caches via Drush.

Inputs: no named parameters. Returns: object

clean_nodes_aiClean Nodes AiC

Clean duplicate or malformed nodes using AI. Requires confirm=True to execute deletions.

Inputs: bundle (required), entity_type (required), confirm, dry_run, +1 more. Returns: object

code_audit_phpstanCode Audit PhpstanC

Run PHPStan static analysis on Drupal custom modules.

Inputs: path (required), level, configuration. Returns: object

codebase_directory_treeCodebase Directory TreeB

Show a local module's directory structure as a nested tree.

Directories have children; files carry a size. The tree is depth and item capped to keep responses bounded.

Inputs: module (required). Returns: object

codebase_file_readCodebase File ReadA

Read one file from a local module.

path is module-relative (e.g. 'mymod.module'). Content is truncated at 64 KB with a truncated flag. Absolute paths, '..' traversal and symlinks escaping the codebase are rejected.

Inputs: path (required), module (required). Returns: object

codebase_files_listCodebase Files ListA

List every file in a local module as module-relative paths.

Useful to find the right path before calling codebase_file_read or codebase_function_read.

Inputs: module (required). Returns: object

codebase_function_readCodebase Function ReadA

Extract a single PHP function (with its docblock) from a module.

Returns the file path, the line of the function and its code — enough to review one hook or method without reading whole files. Searches all PHP-ish files in the module, including class methods.

Inputs: module (required), function_name (required). Returns: object

codebase_hooks_findCodebase Hooks FindA

Find which local modules implement a hook, with file and line.

Accepts the hook with or without its 'hook_' prefix (both 'form_alter' and 'hook_form_alter' work). Implementations are reported per module with the file and line of the function.

Inputs: hook_name (required). Returns: object

codebase_index_refreshCodebase Index RefreshA

Rebuild the local codebase module index.

Call after installing, enabling or creating modules so the other codebase tools see the current state. Returns counts of indexed modules by type and the module directories that were scanned.

Inputs: no named parameters. Returns: object

codebase_module_describeCodebase Module DescribeB

Describe one local module in full.

Returns the module's info.yml fields, dependencies, reverse dependencies, hooks, services, routes, classes and file count — everything the index knows about it.

Inputs: module (required). Returns: object

codebase_module_listCodebase Module ListA

List indexed local modules with metadata.

Each item carries machine name, human name, type (custom/contrib/ core), version, dependencies, path and description. With show_unused=True each item is flagged when nothing references it and it implements no hooks.

Inputs: scope, show_unused. Returns: object

codebase_paths_listCodebase Paths ListA

Show the configured docroot and the module directories indexed.

Use this to verify which locations the codebase tools actually scan (modules, web/modules, sites/*/modules, core) before relying on search results.

Inputs: no named parameters. Returns: object

codebase_redundancy_checkCodebase Redundancy CheckA

Check whether the local codebase already covers a capability.

Searches the index and reports the closest existing modules plus a recommendation: extend what exists rather than duplicating it.

Inputs: query (required). Returns: object

codebase_unused_modulesCodebase Unused ModulesA

List custom/contrib modules nothing references and that define no hooks.

A module counts as used when another module depends on it, when another module's services inject one of its services, or when it implements hooks itself. Candidates for removal.

Inputs: no named parameters. Returns: object

code_quality_reportCode Quality ReportC

Run multiple code quality tools and generate combined report.

Inputs: path (required), tools. Returns: object

code_security_scanCode Security ScanA

Scan custom code for vulnerability patterns — no tools to install.

Matches PHP/JS/Drupal files against a curated registry of XSS, SQL injection, command injection, path traversal, hardcoded secrets, access-control, CSRF, and deprecated-API patterns, with Drupal-aware false-positive rules (EntityQuery conditions, stream wrappers, escapeshellarg, and similar safe APIs are recognized). The counterpart of security_scan, which needs PHPStan installed.

Target one module by machine name, or a directory relative to DRUPAL_ROOT; with neither, the site's own modules/ and themes/ directories are scanned (contrib and core excluded). categories narrows to registry keys ('xss', 'sql_injection', 'command_injection', 'path_traversal', 'hardcoded_secrets', 'access_control', 'csrf', 'deprecated_api'); severity narrows to one level. Findings carry file, line, snippet, and a fix recommendation; counts cover the full run even when max_findings truncates the list.

Inputs: path, module, severity, categories, +1 more. Returns: object

code_snifferCode SnifferC

Run PHP_CodeSniffer with Drupal coding standards.

Inputs: path (required), severity, standard. Returns: object

comment_approveComment ApproveB

Approve a comment (set status to published).

Inputs: comment_id (required). Returns: object

comment_createComment CreateC

Create a new comment.

Inputs: body (required), subject (required), entity_id (required), entity_type (required), +3 more. Returns: object

comment_deleteComment DeleteC

Delete a comment.

Inputs: comment_id (required). Returns: object

comment_field_configureComment Field ConfigureD

Configure comment field settings.

Inputs: bundle (required), entity_type (required), settings, field_name. Returns: object

comment_field_settingsComment Field SettingsC

Get comment field settings for entity type/bundle.

Inputs: bundle (required), entity_type (required), field_name. Returns: object

comment_getComment GetC

Get a single comment by ID.

Inputs: comment_id (required), include. Returns: object

comment_listComment ListD

List comments.

Inputs: entity_id, page_limit, entity_type, page_offset. Returns: object

comment_thread_listComment Thread ListC

List comment thread for an entity.

Returns the whole thread, replies included. It used to add filter[pid] = 0 to get top-level comments only, but pid is an entity reference to the parent comment, so JSON:API rejected it with "must end with one of the following specifiers" -- and had it accepted pid.id = 0 it would have matched nothing, since no comment has id 0. Each row carries its own pid, which is what a caller needs to build the tree.

Inputs: entity_id (required), entity_type (required), field_name. Returns: object

comment_unapproveComment UnapproveB

Unapprove a comment (set status to unpublished).

Inputs: comment_id (required). Returns: object

comment_updateComment UpdateC

Update a comment.

Inputs: comment_id (required), body, status, subject. Returns: object

commerce_order_createCommerce Order CreateC

Create a new commerce order.

Inputs: id (required), store_id (required), items, order_type, +1 more. Returns: object

commerce_order_getCommerce Order GetC

Get a single commerce order by ID.

Inputs: order_id (required), include. Returns: object

commerce_order_listCommerce Order ListC

List commerce orders.

Inputs: filters, store_id, page_limit, page_offset. Returns: object

commerce_order_updateCommerce Order UpdateD

Update a commerce order.

Inputs: order_id (required), items, state, billing_profile. Returns: object

commerce_payment_gateway_getCommerce Payment Gateway GetC

Get a single payment gateway by ID.

Inputs: gateway_id (required), include. Returns: object

commerce_payment_gateway_listCommerce Payment Gateway ListC

List payment gateways.

Inputs: page_limit, page_offset. Returns: object

commerce_product_createCommerce Product CreateC

Create a new commerce product.

Inputs: id (required), price (required), title (required), store_id (required), +3 more. Returns: object

commerce_product_getCommerce Product GetB

Get a single commerce product by ID.

Inputs: product_id (required), include. Returns: object

commerce_product_listCommerce Product ListC

List commerce products.

Inputs: filters, store_id, page_limit, page_offset. Returns: object

commerce_product_updateCommerce Product UpdateC

Update a commerce product.

Inputs: product_id (required), sku, price, title, +1 more. Returns: object

commerce_promotion_createCommerce Promotion CreateC

Create a new commerce promotion.

Inputs: id (required), label (required), offer (required), store_id (required), +1 more. Returns: object

commerce_promotion_listCommerce Promotion ListC

List commerce promotions.

Inputs: store_id, page_limit, page_offset. Returns: object

commerce_shipping_method_createCommerce Shipping Method CreateC

Create a new shipping method.

Inputs: id (required), label (required), plugin (required), store_id (required), +1 more. Returns: object

commerce_shipping_method_listCommerce Shipping Method ListC

List shipping methods.

Inputs: store_id, page_limit, page_offset. Returns: object

commerce_store_createCommerce Store CreateC

Create a new commerce store.

Inputs: id (required), mail (required), label (required), address, +1 more. Returns: object

commerce_store_getCommerce Store GetC

Get a single commerce store by ID.

Inputs: store_id (required), include. Returns: object

commerce_store_listCommerce Store ListC

List all commerce stores.

Inputs: page_limit, page_offset. Returns: object

commerce_store_updateCommerce Store UpdateC

Update a commerce store.

Inputs: store_id (required), mail, label, address, +1 more. Returns: object

composer_auditComposer AuditB

Run Composer security audit on dependencies.

Inputs: no named parameters. Returns: object

composer_installComposer InstallD

Run composer install.

Inputs: no_dev, optimize, working_dir. Returns: object

composer_requireComposer RequireC

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.

Inputs: package (required), dev, version, working_dir. Returns: object

composer_updateComposer UpdateC

Run composer update.

Inputs: no_dev, working_dir. Returns: object

config_getConfig GetC

Get a single configuration object by name.

Inputs: name (required). Returns: object

config_security_checkConfig Security CheckB

Check Drupal configuration for security issues.

Inputs: no named parameters. Returns: object

config_setConfig SetC

Set a single configuration value.

Inputs: name (required), value (required). Returns: object

config_statusConfig StatusA

Compare active configuration with the exported sync directory.

Read-only: reports how many config objects are the same, differ, exist only in the database (never exported, or changed since), or exist only in the sync directory, with the differing names. This is what drush config:import would act on; nothing is exported, imported, or written here.

An empty sync directory shows everything as "Only in DB" -- export first with drush config:export (or the export_config tool) before expecting a useful comparison.

Inputs: no named parameters. Returns: object

config_translation_addConfig Translation AddA

Translate a config entity.

config_name is {entity_type}/{entity_id}, for example node_type/article. config_translation_list shows which entity types this site can translate. translation is a flat map of property to translated value.

A config entity is not a translatable entity. There is no TranslatableInterface to call, no addTranslation(), and no config:translation:add Drush command -- which is what this tool tried, twice, both failing every time. Drupal keeps a config translation as a language config override: the same config object, overridden per language. So the entity type is resolved through the config translation mapper to the config object it is stored as, and that object's override for the target language is what gets written.

Inputs: langcode (required), config_name (required), translation (required). Returns: object

config_translation_listConfig Translation ListB

List the config objects that support translation.

There is no config_translation resource in JSON:API, because Drupal does not store config translations as entities: a translation belongs to the config object that declares a translation mapping. Asking JSON:API for a resource that cannot exist returned a 404 that read exactly like a missing module, so the tool looked uninstalled rather than wrong.

Each mapping is returned with the entity type it translates. The mapping's own config-name list is empty until Drupal builds it inside the translation form, so it is not reported here -- the id and the entity type are what config_translation_add needs.

Inputs: page_limit. Returns: object

contact_form_createContact Form CreateC

Create a new contact form.

Inputs: id (required), label (required), recipients (required), message, +1 more. Returns: object

contact_form_deleteContact Form DeleteC

Delete a contact form.

Inputs: form_id (required). Returns: object

contact_form_getContact Form GetC

Get a single contact form by ID.

Inputs: form_id (required), include. Returns: object

contact_form_listContact Form ListC

List all contact forms.

Inputs: page_limit, page_offset. Returns: object

contact_form_updateContact Form UpdateD

Update a contact form.

Inputs: form_id (required), label, message, reply_to, +1 more. Returns: object

contact_message_deleteContact Message DeleteC

Delete a contact message.

Inputs: message_id (required). Returns: object

contact_message_getContact Message GetC

Get a single contact message by ID.

Inputs: message_id (required), include. Returns: object

contact_message_listContact Message ListC

List contact form submissions.

Inputs: form_id, page_limit, page_offset. Returns: object

contact_spam_checkContact Spam CheckC

Check if a contact message is spam.

Inputs: message_id (required). Returns: object

content_moderation_dashboardContent Moderation DashboardC

Get content pending moderation - dashboard view.

Inputs: filters, page_limit, page_offset. Returns: object

content_translation_enableContent Translation EnableC

Enable content translation for entity type/bundle.

Inputs: entity_type (required), bundle. Returns: object

create_mediaCreate MediaC

Create media entity from a remote URL (image, video, document, etc.).

Inputs: name (required), media_type (required), source_url (required), alt, +1 more. Returns: object

create_migration_planCreate Migration PlanC

Create or replace a persisted migration plan.

Inputs: migration_id (required), notes, source, target, +2 more. Returns: object

create_nodeCreate NodeC

Create a single node of the specified bundle with given fields.

Inputs: bundle (required), fields (required). Returns: object

create_termCreate TermC

Create a taxonomy term in a vocabulary.

Inputs: vid (required), name (required), parent, weight, +2 more. Returns: object

create_userCreate UserC

Create a user account.

Inputs: mail (required), name (required), pass_, roles, +1 more. Returns: object

create_vocabularyCreate VocabularyC

Create a taxonomy vocabulary.

Inputs: vid (required), name (required), langcode, description. Returns: object

cron_listCron ListA

List the jobs Drupal runs on cron, and when cron last ran.

In Drupal 8+ a "cron job" is a module implementing hook_cron; there is no job registry and no drupal_get_cron_jobs() - that Drupal 7 function is what this tool used to call, so it returned "Call to undefined function" on every site it has ever run against.

The implementations sit behind ModuleHandler::invokeAllWith(), whose callback is handed the listener without being forced to invoke it. Only $module is relied on: through Drupal 8-10 the callback receives ($function, $module, $arguments) and in Drupal 11 ($listener, $module), so the module is the second argument in every version, and never calling the first argument is what stops listing a job from running cron.

Inputs: no named parameters. Returns: object

cron_runCron RunC

Run cron.

Inputs: no named parameters. Returns: object

csp_auditCsp AuditC

Content Security Policy audit.

Inputs: no named parameters. Returns: object

database_updatesDatabase UpdatesA

List pending database updates (read-only; runs nothing).

Answers "did the modules I just updated leave schema behind?". Use drush_command("updatedb") (or the drush_updb tool) to apply them, after a database backup.

Inputs: no named parameters. Returns: object

db_countDb CountC

Count rows in a table.

Inputs: table (required), where. Returns: object

db_queryDb QueryA

Execute a single read-only SELECT query on the Drupal database.

One statement only, no comments, and no write or file-access clauses.

Inputs: query (required), args. Returns: object

db_table_infoDb Table InfoC

Get table schema information.

Inputs: table (required). Returns: object

db_tablesDb TablesB

List all database tables.

Inputs: no named parameters. Returns: object

ddev_execDdev ExecC

Run command in the container of the DDEV project under project_name (a directory containing .ddev).

Inputs: command (required), project_name. Returns: object

ddev_setupDdev SetupA

Generate .ddev/config.yaml for a local Drupal environment.

Refuses to overwrite an existing config: calling this with defaults on a working project used to replace the whole file with name: ., which takes the project down.

Inputs: force, docroot, project_name, drupal_version. Returns: object

ddev_startDdev StartA

Start the DDEV project under project_name.

project_name is the project directory (default .): DDEV resolves the project from the working directory it runs in, so this must be the directory containing .ddev. Passing another project's path starts that project, not the server's own directory.

Inputs: project_name. Returns: object

ddev_stopDdev StopC

Stop the DDEV project under project_name (a directory).

Inputs: project_name. Returns: object

delete_nodeDelete NodeB

Delete a single node by ID.

Inputs: nid (required). Returns: object

delete_termDelete TermC

Delete a taxonomy term.

Inputs: tid (required), vid (required). Returns: object

delete_userDelete UserC

Delete a user account.

Inputs: uid (required). Returns: object

delete_vocabularyDelete VocabularyC

Delete a taxonomy vocabulary.

Inputs: vid (required). Returns: object

dependency_scanDependency ScanB

Scan dependencies for vulnerabilities using Composer audit and other tools.

Inputs: no named parameters. Returns: object

deprecation_scanDeprecation ScanC

Scan for deprecated Drupal API usage.

Inputs: path (required), drupal_version. Returns: object

diff_configDiff ConfigB

Show differences in configuration between environments.

Inputs: config_name (required), env1, env2. Returns: object

drupal_checkDrupal CheckC

Run Drupal Check for deprecated code detection.

Inputs: path (required), severity. Returns: object

drush_commandDrush CommandB

Execute any Drush command.

options values are rendered as drush expects them. Drush flags take no value, so {"yes": True} must become --yes and not --yes=True, which drush rejects with "The --yes option does not accept a value". That made every confirmation-answering call fail -- including pm:install, so installing a module reported success while nothing was installed. A False means the caller does not want the flag, so it is omitted rather than spelled --yes=False; that direction was the dangerous one, because it used to pass --yes and silently suppress confirmation on destructive commands.

Inputs: command (required), args, options. Returns: object

drush_cronDrush CronC

Run cron.

Inputs: no named parameters. Returns: object

drush_php_evalDrush Php EvalC

Execute arbitrary PHP code via Drush.

Inputs: code (required). Returns: object

drush_updbDrush UpdbC

Run database updates.

Inputs: no named parameters. Returns: object

drush_watchdogDrush WatchdogC

Show recent log entries from watchdog.

Inputs: count, severity, type_filter. Returns: object

export_configExport ConfigC

Export Drupal configuration to files.

Inputs: export_path, include_optional. Returns: object

export_mediaExport MediaB

Export the media library to a CSV or Excel file on disk.

One row per media item: id, bundle, name, status, dates, owner, and the managed file's filename and URI when there is one (found through relationships, so renamed file fields still work). media_type limits the export to a bundle such as "image". Empty sites write nothing and say so.

Inputs: limit, format, media_type, output_path. Returns: object

export_nodesExport NodesA

Export a node inventory to a CSV or Excel file on disk.

Writes one row per node (id, type, title, status, dates, author, path) and returns only the file path and statistics, so a 5,000-node audit never has to travel through the conversation. The data comes from JSON:API, so titles and bodies with newlines or accents survive intact.

content_type limits the export to one bundle (for example "article"); unpublished nodes are left out unless asked for. With include_fields a final fields column carries the node's remaining field values as JSON, each string capped at 5000 characters. limit caps the rows written (0 = no cap, 100000 maximum). format is "csv" (UTF-8 with BOM, opens cleanly in Excel) or "xlsx". The file may be written only inside the Drupal root, the system temp directory, or your home directory; without output_path it lands in {Drupal root}/exports/ or /tmp/drupal-mcp-exports/ with a timestamped name.

Inputs: limit, format, output_path, content_type, +2 more. Returns: object

export_taxonomyExport TaxonomyA

Export taxonomy terms to a CSV or Excel file on disk.

One row per term: id, vocabulary, name, description, weight, status, and - with include_usage (the default) - how many entities reference the term, through which fields, and a safe_to_delete verdict ("yes" only when nothing references it, and withheld entirely whenever some field could not be counted). Usage comes from one COUNT query per field storage targeting taxonomy terms, so a 5,000-term vocabulary costs a handful of queries, not 5,000.

vocabulary limits the export to one vocabulary machine name (for example "tags"). When Drush is unavailable the export still succeeds and says the usage columns are empty.

Inputs: limit, format, vocabulary, output_path, +1 more. Returns: object

export_usersExport UsersA

Export the site's user accounts to a CSV or Excel file on disk.

One row per user: id, name, email, active/blocked status, role labels, registration/last-login dates. Blocked accounts are always included (their status column says so) - an audit needs them. The file lands in {Drupal root}/exports/ or /tmp/drupal-mcp-exports/ unless output_path says otherwise (confined to the Drupal root, the temp directory, or your home). Drupal's uid-0 anonymous pseudo-account carries no id attributes and is skipped rather than exported as a row of nulls (see skipped_without_id).

Inputs: limit, format, output_path. Returns: object

feeds_feed_createFeeds Feed CreateC

Create a new feed.

Inputs: id (required), label (required), parser, fetcher, +2 more. Returns: object

feeds_feed_deleteFeeds Feed DeleteC

Delete a feed.

Inputs: feed_id (required). Returns: object

feeds_feed_getFeeds Feed GetC

Get a single feed by ID.

Inputs: feed_id (required), include. Returns: object

feeds_feed_listFeeds Feed ListC

List all feeds.

Inputs: page_limit, page_offset. Returns: object

feeds_feed_updateFeeds Feed UpdateD

Update a feed.

Inputs: feed_id (required), label, configuration. Returns: object

feeds_fetcher_listFeeds Fetcher ListB

List available feed fetchers.

Inputs: no named parameters. Returns: object

feeds_importFeeds ImportC

Run a feed import.

Inputs: feed_id (required), source. Returns: object

feeds_import_statusFeeds Import StatusC

Get feed import status.

Inputs: feed_id (required). Returns: object

feeds_log_listFeeds Log ListA

List feed import logs.

Superseded by feeds_import_status, which reports the outcome of the current import. Feeds 3.x removed the log entity, so there is nothing of this shape to list on any site.

Inputs: feed_id, page_limit, page_offset. Returns: object

feeds_parser_listFeeds Parser ListA

List available feed parsers.

Inputs: no named parameters. Returns: object

feeds_processor_listFeeds Processor ListB

List available feed processors.

Inputs: no named parameters. Returns: object

feeds_tamper_listFeeds Tamper ListB

List tamper plugins for a feed.

Inputs: feed_id (required). Returns: object

field_config_createField Config CreateC

Create a new field configuration.

Inputs: label (required), bundle (required), field_name (required), field_type (required), +4 more. Returns: object

field_config_deleteField Config DeleteC

Delete a field configuration.

Inputs: config_id (required). Returns: object

field_config_getField Config GetB

Get a single field configuration by ID.

Inputs: config_id (required), include. Returns: object

field_config_listField Config ListC

List all field configurations on a Drupal site.

Inputs: filters, page_limit, page_offset. Returns: object

field_config_updateField Config UpdateC

Update a field configuration.

Inputs: config_id (required), label, required, settings, +1 more. Returns: object

field_storage_createField Storage CreateC

Create a new field storage configuration.

Inputs: label (required), field_name (required), field_type (required), settings, +1 more. Returns: object

field_storage_deleteField Storage DeleteC

Delete a field storage configuration.

Inputs: config_id (required). Returns: object

field_storage_getField Storage GetB

Get a single field storage configuration by ID.

Inputs: config_id (required), include. Returns: object

field_storage_listField Storage ListC

List all field storage configurations on a Drupal site.

Inputs: filters, page_limit, page_offset. Returns: object

field_storage_updateField Storage UpdateD

Update a field storage configuration.

Inputs: config_id (required), label, settings, description. Returns: object

file_permissions_auditFile Permissions AuditC

Audit file permissions for security issues.

Inputs: path. Returns: object

find_deprecated_codeFind Deprecated CodeC

Scan custom modules for deprecated Drupal APIs.

Inputs: site_path (required), scan_custom_modules. Returns: result

find_entity_by_pathFind Entity By PathA

Resolve a URL path or alias ("/about", "/node/123") to its entity.

Internal routes such as /node/123 are read directly. Anything else is looked up in the path alias table, and the resolved target is parsed the same way. A full URL is accepted; the query string and fragment are ignored. Returns the entity id and a short summary, or found: false when nothing resolves.

Inputs: path (required). Returns: object

find_entity_referencesFind Entity ReferencesA

Find which bundles use reference fields targeting an entity type.

Answers "where are these used?" at the configuration level: for entity_type ("taxonomy_term", "node", "media", ...) it lists every field on every bundle whose storage targets that type, e.g. which content types have a tags or category field. Filter by the referencing bundle or by field_name.

This reads field configuration, not content: it reports where references can live, not which individual rows currently point at which entity. For the data, query the field's table with db_query.

Inputs: entity_type (required), limit, bundle, field_name. Returns: object

fix_media_referencesFix Media ReferencesC

Find broken media references across a content type.

Scans nodes of the given type and checks every media relationship, reporting references whose target media entity no longer resolves.

Inputs: content_type (required). Returns: object

gatsby_helpers_generateGatsby Helpers GenerateC

Generate Gatsby source plugin config and helpers.

Inputs: entity_types (required), output_dir. Returns: object

generate_migration_yamlGenerate Migration YamlD

Generate migration YAML configuration.

Inputs: source (required), destination (required), migration_type (required). Returns: object

generate_module_migrationGenerate Module MigrationC

Generate migration module for a custom module with source plugin, process plugins, and migration template.

Inputs: module_name (required), source_version (required), target_version (required), base_path. Returns: object

generate_test_contentGenerate Test ContentA

Generate sample nodes for a bundle to populate a development site.

Inputs: bundle (required), count, fields. Returns: object

get_migration_planGet Migration PlanC

Read a persisted migration plan and its tracked state.

Inputs: migration_id (required). Returns: object

get_nodeGet NodeB

Get a single node by ID with optional relationship includes.

Inputs: nid (required), include. Returns: object

get_termGet TermC

Get a taxonomy term by ID.

Inputs: tid (required), vid (required). Returns: object

get_userGet UserC

Get a user by ID with optional relationship includes.

Inputs: uid (required), include. Returns: object

get_user_by_emailGet User By EmailC

Get a user by email address.

Inputs: mail (required). Returns: object

get_user_rolesGet User RolesC

Get roles assigned to a user.

Inputs: uid (required). Returns: object

get_vocabularyGet VocabularyB

Get a taxonomy vocabulary by ID.

Inputs: vid (required). Returns: object

graphql_queryGraphql QueryC

Execute a GraphQL query.

Inputs: query (required), variables. Returns: object

graphql_schema_extendGraphql Schema ExtendC

Extend GraphQL schema with custom fields.

Verifies the site actually has a graphql.schema.customization configuration object before touching it. The previous call passed a whole JSON document as drush config:set's key argument -- config:set takes <config> <key> <value> -- so every invocation failed at drush, and no module on most sites provides that config object in the first place.

Inputs: fields (required), type_name (required). Returns: object

graphql_schema_getGraphql Schema GetC

Get GraphQL schema.

Inputs: format. Returns: object

health_checkHealth CheckA

Check that this server can actually reach a working Drupal site.

Runs four read-only probes: Drush and the site status, the database connection, the JSON:API index, and the modules the other tools assume (jsonapi required; dblog and basic_auth recommended). Each failure comes with the concrete fix. Run this first when other tools return opaque connection errors.

Inputs: no named parameters. Returns: object

import_configImport ConfigC

Import Drupal configuration from files.

Inputs: import_path, skip_hash_check. Returns: object

interface_translation_addInterface Translation AddA

Add an interface translation for one source string.

Written through Locale's own string storage -- createString() / createTranslation() plus save() -- which is what locale:import does with a .po file, one entry at a time. There is no locale:translate:* command to run instead.

If the source string is not one Drupal has already collected, it is created too and the reply says so: a translation nobody will ever look up is worth knowing about. The locale lookup cache is invalidated, so the new text is visible without a cache rebuild.

Inputs: source (required), langcode (required), translation (required), context. Returns: object

interface_translation_deleteInterface Translation DeleteA

Remove an interface translation from one language.

Drops the row from locales_target for this source and language; the source string itself stays, because it is Drupal's own string and other languages still use it. There is no locale:translate:delete command, and re-importing a .po file without the entry is no longer the only way to do this.

Inputs: source (required), langcode (required), context. Returns: object

interface_translation_listInterface Translation ListA

List the interface translations Drupal holds.

Locale does not store translations as entities, so there is no interface_translation resource to page through: they live in Locale's own storage, joined from each source string to its translation in a language -- which is where drush locale:export reads them from too.

langcode narrows the list to one language; left out, every language is listed and each row says which one it is. filters accepts search (a substring of the source text) and context (the source context, matched exactly). Only translated strings are returned: an untranslated source is not a translation. count is the total that matched, before paging.

Inputs: filters, langcode, page_limit, page_offset. Returns: object

interface_translation_updateInterface Translation UpdateA

Change an existing interface translation.

Same storage as interface_translation_add, but this one refuses to invent anything: an unknown source string, or a source with no translation in langcode, is an error that says which of those it is and points at interface_translation_add. The string is marked customized so a later locale:import does not overwrite it.

Inputs: source (required), langcode (required), translation (required), context. Returns: object

inventory_content_typesInventory Content TypesC

List all content types on a Drupal site.

Inputs: site_url (required), auth, include_field_details. Returns: result

inventory_modulesInventory ModulesC

List all modules on a Drupal site.

Inputs: site_url (required), auth, filter_custom. Returns: result

jsonapi_include_optimizeJsonapi Include OptimizeC

Get optimized include paths for entity type.

Inputs: includes (required), entity_type (required). Returns: object

jsonapi_resources_listJsonapi Resources ListC

List all available JSON:API resources.

Inputs: page_limit. Returns: object

jsonapi_resource_typesJsonapi Resource TypesB

Get all resource types available in JSON:API.

Inputs: no named parameters. Returns: object

jsonapi_schema_getJsonapi Schema GetC

Get JSON:API schema (OpenAPI/Swagger).

Inputs: entity_type. Returns: object

jsonapi_sparse_fieldsetsJsonapi Sparse FieldsetsC

Get entity with sparse fieldsets (only requested fields).

Inputs: fields (required), entity_type (required). Returns: object

lando_execLando ExecC

Run command in the container of the Lando project under project_name (a directory).

Inputs: command (required), project_name. Returns: object

lando_setupLando SetupC

Generate .lando.yml for a local Drupal environment.

Inputs: force, webroot, project_name, drupal_version. Returns: object

lando_startLando StartB

Start the Lando project under project_name (a directory).

Inputs: project_name. Returns: object

lando_stopLando StopB

Stop the Lando project under project_name (a directory).

Inputs: project_name. Returns: object

language_addLanguage AddC

Add a new language.

Inputs: name (required), langcode (required), weight, direction. Returns: object

language_deleteLanguage DeleteC

Delete a language.

Inputs: langcode (required). Returns: object

language_disableLanguage DisableC

Disable a language.

Inputs: langcode (required). Returns: object

language_enableLanguage EnableC

Enable a language.

Inputs: langcode (required). Returns: object

language_getLanguage GetC

Get a single language by langcode.

Inputs: langcode (required), include. Returns: object

language_listLanguage ListC

List all languages.

Inputs: filters, page_limit, page_offset. Returns: object

language_negotiation_getLanguage Negotiation GetB

Get language negotiation configuration.

Inputs: no named parameters. Returns: object

language_negotiation_setLanguage Negotiation SetC

Set language negotiation method.

Inputs: method (required), weight. Returns: object

layout_builder_createLayout Builder CreateB

Replace the Layout Builder layout for a bundle.

layout may be a list of section specs, {"sections": [...]}, or a single {"layout_id": ..., "components": [...]}. Layout Builder is switched on if it was off. lock marks each component as locked against per-entity editing; Layout Builder has no display-level lock, so this is a component lock.

Inputs: bundle (required), layout (required), entity_type (required), lock. Returns: object

layout_builder_getLayout Builder GetA

Read the Layout Builder layout for an entity type and bundle.

Returns whether Layout Builder is enabled and overridable for the bundle, plus every section with its layout plugin, region and components. This reads the real view display rather than the JSON:API resource that does not exist.

Inputs: bundle (required), entity_type (required). Returns: object

layout_builder_listLayout Builder ListB

Report which entity view displays have Layout Builder enabled.

Layouts themselves are not readable over JSON:API (see the other layout_builder_* tools), but the display config that switches Layout Builder on for a bundle is, so this returns that instead of a 404.

Inputs: bundle, entity_type. Returns: object

layout_builder_override_removeLayout Builder Override RemoveA

Remove a Layout Builder override so an entity falls back to the default.

Pass entity_id (for a node, its nid) to revert that one entity. Omit it to list the entities of this bundle that currently carry an override, which is what you need before you can pick one.

Reverting clears the entity's layout_builder__layout field through OverridesSectionStorage, which is where Drupal keeps overrides - they are not config and cannot be read from entity_view_display.

Inputs: bundle (required), entity_type (required), entity_id. Returns: object

layout_builder_section_addLayout Builder Section AddA

Append a section to a bundle's Layout Builder layout.

section takes layout_id (default layout_onecol) and components, which may be plugin ids or objects with plugin, region and configuration. Layout Builder is switched on if it was off. Returns the full section list afterwards.

Inputs: bundle (required), section (required), entity_type (required). Returns: object

layout_builder_sections_listLayout Builder Sections ListB

List the sections in a bundle's Layout Builder layout.

Each section reports its layout plugin, and the components in it report region, plugin id and weight.

Inputs: bundle (required), entity_type (required). Returns: object

layout_builder_updateLayout Builder UpdateA

Update the Layout Builder layout for a bundle.

With layout given it replaces every section, exactly like layout_builder_create. With layout omitted it only applies lock, or just reports the current state when both are omitted.

Inputs: bundle (required), entity_type (required), lock, layout. Returns: object

list_migration_plansList Migration PlansB

List all persisted migration plans.

Inputs: no named parameters. Returns: result

list_rolesList RolesB

List all available roles.

Inputs: no named parameters. Returns: object

list_termsList TermsC

List terms in a vocabulary with filters and pagination.

Inputs: vid (required), sorts, filters, page_limit, +1 more. Returns: object

list_usersList UsersC

List users with filters and pagination.

Inputs: sorts, filters, page_limit, page_offset. Returns: object

list_vocabulariesList VocabulariesB

List all taxonomy vocabularies.

Inputs: no named parameters. Returns: object

map_fields_aiMap Fields AiB

Suggest AI-powered field mappings from a source field list to a target bundle.

Reads the target bundle's available fields, then asks the AI provider to map each source field onto the closest target field.

Inputs: source_fields (required), target_bundle (required). Returns: object

map_modules_d7_to_d10Map Modules D7 To D10C

Map Drupal 7 modules to D10 equivalents using AI + known mappings.

Inputs: module_list (required), ai_provider. Returns: object

media_bulk_importMedia Bulk ImportC

Bulk import media files from directory.

Inputs: source_dir (required), recursive, media_type. Returns: object

media_create_from_base64Media Create From Base64C

Create media from base64 encoded file data.

Inputs: filename (required), base64_data (required), name, mime_type, +1 more. Returns: object

media_create_from_urlMedia Create From UrlC

Create media from URL (oEmbed).

Inputs: url (required), media_type (required), name, field_name. Returns: object

media_derivative_generateMedia Derivative GenerateC

Generate a specific derivative for media.

Inputs: media_id (required), derivative_id (required). Returns: object

media_library_listMedia Library ListD

List media library items.

Inputs: filters, page_limit, page_offset. Returns: object

media_type_createMedia Type CreateD

Create a new media type.

Inputs: id (required), label (required), source, description, +1 more. Returns: object

media_type_getMedia Type GetC

Get a single media type by ID.

Inputs: media_type_id (required), include. Returns: object

media_type_listMedia Type ListC

List all media types.

Inputs: filters, page_limit, page_offset. Returns: object

metatag_canonical_setMetatag Canonical SetC

Set canonical URL for an entity.

Inputs: entity_id (required), entity_type (required), canonical_url (required). Returns: object

metatag_config_createMetatag Config CreateC

Create a new metatag configuration.

Inputs: id (required), label (required), entity_type (required), tags, +1 more. Returns: object

metatag_config_getMetatag Config GetC

Get a single metatag configuration by ID.

Inputs: config_id (required), include. Returns: object

metatag_config_listMetatag Config ListC

List all metatag configurations.

Inputs: page_limit, page_offset. Returns: object

metatag_config_updateMetatag Config UpdateD

Update a metatag configuration.

Inputs: config_id (required), tags, label. Returns: object

metatag_defaults_getMetatag Defaults GetC

Get default metatag values for entity type/bundle.

Inputs: entity_type (required), bundle. Returns: object

metatag_defaults_setMetatag Defaults SetC

Set default metatag values for entity type/bundle.

Inputs: entity_type (required), tags, bundle. Returns: object

metatag_jsonld_generateMetatag Jsonld GenerateC

Generate JSON-LD structured data for entity.

Inputs: entity_id (required), entity_type (required), schema_type. Returns: object

metatag_token_listMetatag Token ListC

List available metatag tokens.

Inputs: entity_type. Returns: object

migrate_recordsMigrate RecordsC

Copy a batch of source records into the target Drupal site through JSON:API.

Inputs: records (required), entity_type (required), migration_id (required), dry_run, +2 more. Returns: object

migrate_taxonomyMigrate TaxonomyC

Migrate taxonomy vocabularies and their terms to this site.

Each vocabulary carries vid/id, name, description and optional terms. A term's tid/id is used only to find an existing term: JSON:API treats it as read-only and rejects it as a settable attribute.

Inputs: vocabularies (required), include_terms. Returns: object

migration_statusMigration StatusC

Summarize migration progress for a persisted plan.

Inputs: migration_id (required). Returns: object

moderation_state_createModeration State CreateC

Create a new moderation state.

Inputs: label (required), state_id (required), workflow_id (required), weight, +1 more. Returns: object

moderation_state_deleteModeration State DeleteC

Delete a moderation state.

Inputs: state_id (required). Returns: object

moderation_state_getModeration State GetC

Get a single moderation state by ID.

Inputs: state_id (required), include. Returns: object

moderation_state_listModeration State ListC

List all moderation states.

Inputs: filters, page_limit, page_offset. Returns: object

moderation_state_updateModeration State UpdateC

Update a moderation state.

Inputs: state_id (required), label, weight, is_default. Returns: object

moderation_transition_createModeration Transition CreateA

Create a new moderation transition on a workflow.

Transitions are configuration inside the workflow entity, so they cannot be POSTed as a JSON:API resource. This adds one the way Drupal's own transition form does: through WorkflowTypeInterface::addTransition() and a save of the workflow, which writes the change back into the workflow's configuration.

Both the origin states and the target state must already exist in the workflow; an error names the ones that do not and lists the states the workflow does have. weight defaults to 0, which places the transition first -- pass a higher number to append it.

Inputs: label (required), to_state (required), from_states (required), workflow_id (required), +2 more. Returns: object

moderation_transition_deleteModeration Transition DeleteA

Delete a moderation transition from a workflow.

The counterpart of moderation_transition_create: a transition is configuration inside its workflow, so this removes it through WorkflowTypeInterface::deleteTransition() and saves the workflow, exactly as Drupal's own delete form does. The reply reports how many transitions the workflow has left, and warns when that was the last one -- a workflow with no transitions cannot move content at all.

Inputs: workflow_id (required), transition_id (required). Returns: object

moderation_transition_executeModeration Transition ExecuteA

Execute a moderation transition on an entity.

Looks the transition up on its workflow and applies its target state to the entity, refusing when the entity's current state is not one the transition starts from. The old version fetched the transition through JSON:API, which has no such resource, so this never ran.

Inputs: entity_id (required), entity_type (required), transition_id (required), user_id. Returns: object

moderation_transition_getModeration Transition GetA

Get a single moderation transition by ID.

Transitions belong to a workflow rather than being entities, so this searches every workflow's transitions for the named one. Pass include=states to attach the states of the workflow that owns it -- transitions have no JSON:API relationships to include.

Inputs: transition_id (required), include. Returns: object

moderation_transition_listModeration Transition ListA

List a workflow's moderation transitions.

Transitions are configuration inside the workflow entity, not entities of their own, so there is no workflow_transition resource for JSON:API to list. They are read from the workflow's workflow-type plugin (WorkflowTypeInterface::getTransitions()), which is where Drupal keeps them.

Every workflow is read when workflow_id is left out. Naming a workflow that does not exist answers an error listing the ones this site has, rather than an empty list that reads as "no transitions".

Inputs: page_limit, page_offset, workflow_id. Returns: object

module_compatibilityModule CompatibilityB

Check whether a project has releases for a given core version.

Inputs: project_id (required), core_version. Returns: object

module_config_schema_createModule Config Schema CreateC

Create or update config schema YAML for module settings.

Inputs: machine_name (required), path, schema, schema_name. Returns: object

module_controller_createModule Controller CreateC

Create a controller class with routing.

Inputs: machine_name (required), controller_name (required), path, methods, +1 more. Returns: object

module_createModule CreateC

Create a new Drupal module with full scaffolding.

Inputs: name (required), path, package, description, +7 more. Returns: object

module_dependenciesModule DependenciesA

Get the packages a module release requires.

Read from Composer metadata on packages.drupal.org, which is where Drupal publishes dependency data today. Omit version for the newest release.

Inputs: project_id (required), version. Returns: object

module_dependencies_analyzeModule Dependencies AnalyzeC

Analyze module code and suggest missing dependencies.

Inputs: machine_name (required), path. Returns: object

module_event_subscriber_createModule Event Subscriber CreateC

Create an event subscriber service with getSubscribedEvents method.

Inputs: machine_name (required), subscriber_name (required), path, events, +1 more. Returns: object

module_form_createModule Form CreateC

Create a form class (ConfigForm, ConfirmForm, FormBase, etc.) with proper scaffolding.

Inputs: form_name (required), machine_name (required), path, fields, +3 more. Returns: object

module_getModule GetB

Get module details from Drupal.org by machine name.

Inputs: project_id (required). Returns: object

module_hook_implementModule Hook ImplementC

Implement a hook in an existing module.

Inputs: hook (required), machine_name (required), path. Returns: object

module_info_generateModule Info GenerateC

Generate .info.yml from existing module code (reverse engineering).

Inputs: machine_name (required), path. Returns: object

module_permission_createModule Permission CreateC

Create or update permissions.yml with custom permissions.

Inputs: machine_name (required), path, permissions. Returns: object

module_plugin_createModule Plugin CreateC

Create a plugin (block, field, views, etc.) with proper scaffolding.

Inputs: label (required), plugin_id (required), plugin_type (required), machine_name (required), +4 more. Returns: object

module_recommendationModule RecommendationB

Recommend modules for a need: what the local codebase already ships, plus drupal.org options.

Combines the local codebase index (available when DRUPAL_ROOT is set) with drupal.org search, so the answer starts with modules you already have before suggesting downloads.

Inputs: need (required). Returns: object

module_service_createModule Service CreateC

Create a service definition with PHP class stub.

Inputs: machine_name (required), service_name (required), path, tags, +2 more. Returns: object

module_test_createModule Test CreateC

Create a PHPUnit/Kernel test skeleton.

Inputs: test_name (required), machine_name (required), path, test_type, +2 more. Returns: object

module_versionsModule VersionsC

Get all available releases for a module.

Inputs: project_id (required), core_version. Returns: object

nextjs_helpers_generateNextjs Helpers GenerateC

Generate Next.js helper functions for Drupal entities.

Inputs: entity_types (required), output_dir. Returns: object

paragraphs_item_createParagraphs Item CreateC

Create a new paragraph item of the specified type.

Inputs: fields (required), type_id (required). Returns: object

paragraphs_item_deleteParagraphs Item DeleteC

Delete a paragraph item.

Inputs: paragraph_id (required). Returns: object

paragraphs_item_getParagraphs Item GetC

Get a single paragraph item by ID.

Inputs: paragraph_id (required), include. Returns: object

paragraphs_item_listParagraphs Item ListA

List paragraph items, optionally filtered by type.

A paragraph's type is its bundle, so filtering by type means addressing the paragraph--{type} collection. filter[paragraphs_type] does not exist -- it answered 400 "the field paragraphs_type does not exist" on every call, because there is no such field; the type lives in the resource type itself.

Inputs: filters, type_id, page_limit, page_offset. Returns: object

paragraphs_item_updateParagraphs Item UpdateC

Update a paragraph item.

Inputs: fields (required), paragraph_id (required). Returns: object

paragraphs_type_createParagraphs Type CreateC

Create a new paragraph type.

Inputs: label (required), type_id (required), weight, description. Returns: object

paragraphs_type_deleteParagraphs Type DeleteC

Delete a paragraph type.

Inputs: type_id (required). Returns: object

paragraphs_type_getParagraphs Type GetC

Get a single paragraph type configuration by ID.

Inputs: type_id (required), include. Returns: object

paragraphs_type_listParagraphs Type ListC

List all paragraph types on a Drupal site.

Inputs: filters, page_limit, page_offset. Returns: object

paragraphs_type_updateParagraphs Type UpdateC

Update an existing paragraph type.

Inputs: type_id (required), label, weight, description. Returns: object

pathauto_generatePathauto GenerateC

Generate pathauto aliases.

Inputs: count, bundle, entity_type. Returns: object

pathauto_pattern_createPathauto Pattern CreateD

Create a new pathauto pattern.

Inputs: id (required), label (required), bundle (required), pattern (required), +3 more. Returns: object

pathauto_pattern_deletePathauto Pattern DeleteC

Delete a pathauto pattern.

Inputs: pattern_id (required). Returns: object

pathauto_pattern_getPathauto Pattern GetC

Get a single pathauto pattern by ID.

Inputs: pattern_id (required), include. Returns: object

pathauto_pattern_listPathauto Pattern ListA

List pathauto patterns.

A pattern's target entity type and bundle are encoded in its id, as {entity_type}--{bundle}, rather than held in fields of their own. filter[entity_type] and filter[bundle] therefore answered 400 "the field ... does not exist" on every call. Both are needed to filter server-side; with only one there is no field to match on, so every pattern is returned and the caller narrows from the ids.

Inputs: bundle, page_limit, entity_type, page_offset. Returns: object

pathauto_pattern_updatePathauto Pattern UpdateD

Update a pathauto pattern.

Inputs: pattern_id (required), label, weight, pattern. Returns: object

pathauto_token_listPathauto Token ListC

List available pathauto tokens.

Inputs: entity_type. Returns: object

performance_bigpipe_enablePerformance Bigpipe EnableC

Enable or disable BigPipe.

Inputs: enable. Returns: object

performance_bigpipe_statusPerformance Bigpipe StatusB

Check BigPipe status and configuration.

Inputs: no named parameters. Returns: object

performance_cache_statsPerformance Cache StatsB

Get cache performance statistics.

Inputs: no named parameters. Returns: object

performance_memcached_statsPerformance Memcached StatsC

Get Memcached statistics.

Inputs: no named parameters. Returns: object

performance_page_load_analyzePerformance Page Load AnalyzeC

Analyze page load performance.

Inputs: url (required), runs. Returns: object

performance_query_logPerformance Query LogA

Get the recent db_query watchdog entries (requires devel logging).

min_duration is refused rather than ignored: watchdog rows carry no query duration, so a duration filter cannot be honored here -- durations come from devel's own query log.

Inputs: limit, min_duration. Returns: object

performance_redis_infoPerformance Redis InfoB

Get Redis server info.

Inputs: no named parameters. Returns: object

permission_auditPermission AuditC

Audit user permissions and roles.

Inputs: role. Returns: object

project_usageProject UsageC

Get download/usage statistics for a project.

Inputs: project_id (required), period. Returns: object

query_nodesQuery NodesC

Query nodes with filters, sorts, includes, and pagination.

Inputs: sorts, bundle, fields, filters, +3 more. Returns: object

queue_createQueue CreateA

Create a queue and make it ready to accept items.

class_name is refused rather than silently dropped. Drupal resolves a queue's implementation in settings.php - queue_service_<name>, else queue_default, else the queue.database service - and that service must already exist in the container, so no API accepts a class name when a queue is created. Accepting it would let a caller believe they had a custom queue implementation when they had the default one.

Inputs: queue_name (required), class_name. Returns: object

queue_deleteQueue DeleteA

Delete queue items: one by id, the oldest count, or the whole queue.

Drush's queue:delete takes exactly one argument - the queue name - so the item_id and count forms cannot go through it: they passed extra arguments that Drush refused with "Too many arguments", and all three branches failed, so this tool never once succeeded.

Even the plain case now runs in PHP rather than through Drush, because queue:delete only resolves queues that are registered as services and answers "Queue not found" for anything else - including a queue this very server just created with queue_create. Queue::deleteQueue() is what Drush calls internally, so the result is the same operation without Drush's registration requirement.

item_id deliberately repeats the queue name in its condition even though core's own DatabaseQueue::deleteItem() does not - that method deletes by item_id alone, so without the name a request for an item in one queue would happily delete a different queue's item that happened to share the id.

Inputs: queue_name (required), count, item_id. Returns: object

queue_infoQueue InfoC

Get queue information.

Inputs: queue_name (required). Returns: object

queue_listQueue ListB

List all queues.

Inputs: no named parameters. Returns: object

queue_runQueue RunC

Run a specific queue.

Inputs: queue_name (required), limit. Returns: object

reconcile_migration_countsReconcile Migration CountsC

Compare recorded source counts with current target-site counts.

Inputs: migration_id (required), target_resource_types. Returns: object

record_migration_resultRecord Migration ResultC

Record the outcome of a manually executed migration operation.

Inputs: legacy_id (required), entity_type (required), migration_id (required), error, +2 more. Returns: object

redirect_bulk_createRedirect Bulk CreateC

Create multiple redirects in bulk.

Inputs: redirects (required). Returns: object

redirect_bulk_deleteRedirect Bulk DeleteC

Delete multiple redirects in bulk.

Inputs: redirect_ids (required). Returns: object

redirect_createRedirect CreateC

Create a new redirect.

Inputs: redirect_source (required), redirect_redirect (required), language, status_code, +2 more. Returns: object

redirect_deleteRedirect DeleteC

Delete a redirect.

Inputs: redirect_id (required). Returns: object

redirect_getRedirect GetB

Get a single redirect configuration by ID.

Inputs: redirect_id (required), include. Returns: object

redirect_listRedirect ListC

List all redirects on a Drupal site.

Inputs: filters, page_limit, page_offset. Returns: object

redirect_pattern_listRedirect Pattern ListC

List redirect patterns.

Inputs: page_limit, page_offset. Returns: object

redirect_updateRedirect UpdateC

Update an existing redirect.

Inputs: redirect_id (required), language, status_code, redirect_source, +3 more. Returns: object

release_historyRelease HistoryC

Get release history for a project.

Inputs: project_id (required), core_version. Returns: object

remove_roleRemove RoleC

Remove a role from a user.

Inputs: uid (required), role (required). Returns: object

revision_deleteRevision DeleteC

Delete a specific revision of an entity.

Inputs: entity_id (required), entity_type (required), revision_id (required). Returns: object

revision_diffRevision DiffC

Diff two revisions of an entity.

Inputs: entity_id (required), entity_type (required), revision_id_1 (required), revision_id_2 (required). Returns: object

revision_getRevision GetC

Get a specific revision of an entity.

Inputs: entity_id (required), entity_type (required), revision_id (required), include. Returns: object

revision_listRevision ListC

List revisions for an entity.

Only the current revision is enumerable over JSON:API; the tool reports that honestly rather than inventing a collection URL.

Inputs: entity_id (required), entity_type (required), page_limit, page_offset. Returns: object

revision_revertRevision RevertA

Revert an entity to a specific revision.

Applies the revision's field values to the current entity. A PATCH that Drupal rejects is atomic, so a failure leaves the entity untouched.

Inputs: entity_id (required), entity_type (required), revision_id (required). Returns: object

rollback_migrationRollback MigrationC

Rollback a completed migration.

Inputs: migration_id (required). Returns: object

route_access_auditRoute Access AuditA

Classify every route's access control from *.routing.yml files.

The routing half of a pre-deployment review: each route is classified by what it requires — fully anonymous (access: TRUE), a permission, roles, entity access, a custom access callback, or nothing at all, which is the finding. Controllers are mapped to the file that declares the class when it can be found, so a risky route leads straight to code. Targets work like code_security_scan: one module by machine name, a DRUPAL_ROOT directory, or the site's own modules/ and themes/ by default.

Inputs: path, module. Returns: object

run_migrationRun MigrationB

Run an ordered end-to-end migration for one or all planned entity types.

Waves run in the order given (dependencies first). A failed wave stops the run by default, since a schema or auth problem tends to repeat; set continue_on_error to attempt the remaining types anyway.

Inputs: migration_id (required), dry_run, verify_tls, entity_types, +4 more. Returns: object

run_migration_testRun Migration TestC

Test migration with limited records.

Inputs: migration_id (required), limit. Returns: object

run_migration_waveRun Migration WaveC

Fetch and migrate one resource type from the plan's source site into the target site.

source_username/source_password authenticate to the source site. Credentials may instead be stored in the plan's source block (username/password), which keeps waves self-contained.

Inputs: migration_id (required), resource_type (required), dry_run, batch_size, +5 more. Returns: object

search_api_facet_createSearch Api Facet CreateC

Create a Search API facet.

Inputs: id (required), field (required), label (required), index_id (required), +2 more. Returns: object

search_api_facet_listSearch Api Facet ListB

List Search API facets.

index_id is no longer applied. A facet is attached to a facet source, not to the index, and the only field it carries is facet_source_id -- so filter[index] answered 400 "the field index does not exist" on every call, and there is no field to filter on instead. Each returned facet carries its facet_source_id, which is what a caller needs to match facets to an index.

Inputs: index_id, page_limit. Returns: object

search_api_index_clearSearch Api Index ClearC

Clear a Search API index.

Inputs: index_id (required). Returns: object

search_api_index_createSearch Api Index CreateC

Create a new Search API index.

Inputs: id (required), label (required), server_id (required), datasource (required), +2 more. Returns: object

search_api_index_getSearch Api Index GetC

Get a single Search API index by ID.

Inputs: index_id (required), include. Returns: object

search_api_index_listSearch Api Index ListC

List Search API indexes.

Inputs: filters, server_id, page_limit, page_offset. Returns: object

search_api_index_reindexSearch Api Index ReindexC

Trigger reindexing of a Search API index.

Inputs: index_id (required), batch_size. Returns: object

search_api_index_updateSearch Api Index UpdateD

Update a Search API index.

Inputs: index_id (required), label, status, processors. Returns: object

search_api_server_createSearch Api Server CreateC

Create a new Search API server.

Inputs: id (required), label (required), backend, backend_config. Returns: object

search_api_server_disableSearch Api Server DisableC

Disable a Search API server.

Inputs: server_id (required). Returns: object

search_api_server_enableSearch Api Server EnableC

Enable a Search API server.

Inputs: server_id (required). Returns: object

search_api_server_getSearch Api Server GetC

Get a single Search API server by ID.

Inputs: server_id (required), include. Returns: object

search_api_server_listSearch Api Server ListC

List all Search API servers.

Inputs: filters, page_limit, page_offset. Returns: object

search_entitiesSearch EntitiesA

Case-insensitive substring search across entity titles and names.

Scans node titles, user names and emails, taxonomy term names, comment subjects, media names, and file names with one read-only LIKE query per type, returning matches grouped by entity type.

Pass entity_types (e.g. ["node", "taxonomy_term"]) to search fewer tables: a LIKE scan reads every row, so keep it narrow on large sites. This does not search node bodies -- for full text use the site's own search or the search_api tools.

Inputs: query (required), limit, entity_types. Returns: object

security_auditSecurity AuditC

Run security-focused static analysis.

Inputs: path (required), include_vendors. Returns: object

security_scanSecurity ScanC

Run security-focused SAST using PHPStan with security extensions.

Inputs: path (required), include_vendors. Returns: object

split_configSplit ConfigC

Split configuration into separate directories for atomic deployment.

Reads from source_dir (exported config) and creates individual config files in output_dir for each specified config object.

Inputs: config_names (required), output_dir, source_dir. Returns: object

sql_injection_scanSql Injection ScanC

Scan for SQL injection vulnerabilities in custom code.

Inputs: path (required). Returns: object

status_reportStatus ReportA

Run the site's status report (what /admin/reports/status shows).

Read-only. Returns each requirement with its title, severity ("error", "warning", "info", or "ok"), description, and value. By default errors and warnings are returned; use include_ok for the whole report or severity_filter for one level.

A failure here is usually the site's own requirements checker breaking, not this tool: the drush error is returned verbatim.

Inputs: include_ok, severity_filter. Returns: object

sync_configSync ConfigC

Sync configuration between environments via Drush.

source_env and target_env are drush aliases (staging or @staging): the export runs against the source alias and the import against the target. Until now both parameters were echoed back untouched and every call operated on the site the server was started on.

Inputs: source_env (required), target_env (required), dry_run. Returns: object

sync_media_filesSync Media FilesC

Sync media files between paths.

Inputs: source_path (required), destination_path (required). Returns: object

template_suggestionsTemplate SuggestionsA

Twig template names Drupal will try for an entity, specific first.

The suggestion chain for node, block, taxonomy_term, user, field, or page rendering (bracketed parts are placeholders Drupal fills in, e.g. node--article--123.html.twig beats node--article.html.twig). Unknown entity types get the generic chain. When DRUPAL_ROOT is configured each suggestion is marked in_checked_theme: whether the default theme already ships that file, so you know which name creating one would actually take effect.

Inputs: entity_type (required), bundle. Returns: object

test_coverage_reportTest Coverage ReportC

Generate a test coverage report (vendor/bin/phpunit).

Inputs: format, output_dir. Returns: object

test_list_suitesTest List SuitesB

List the site's PHPUnit test suites.

Inputs: no named parameters. Returns: object

test_run_behatTest Run BehatC

Run the site's Behat features (vendor/bin/behat).

Inputs: tags, format, profile. Returns: object

test_run_kernelTest Run KernelC

Run the site's Kernel-test suite (vendor/bin/phpunit).

Inputs: filter, test_path. Returns: object

test_run_nightwatchTest Run NightwatchC

Run Nightwatch tests (node_modules/.bin/nightwatch).

Inputs: env, test_path. Returns: object

test_run_phpunitTest Run PhpunitC

Run the site's PHPUnit tests (vendor/bin/phpunit).

Inputs: group, filter, coverage, test_path. Returns: object

test_scaffold_behatTest Scaffold BehatC

Scaffold a Behat feature file.

Inputs: module (required), feature_name (required), scenarios. Returns: object

test_scaffold_nightwatchTest Scaffold NightwatchC

Scaffold a Nightwatch test.

Inputs: module (required), test_name (required), test_steps. Returns: object

test_scaffold_phpunitTest Scaffold PhpunitC

Scaffold a PHPUnit test class.

Inputs: module (required), test_type, class_name, test_methods. Returns: object

theme_activeTheme ActiveA

List the site's themes: default, admin, and every enabled one.

Reads system.theme and drush pm:list; returns the default and admin theme machine names plus each enabled theme's package, path, and version, with counts of the disabled ones.

Inputs: no named parameters. Returns: object

theme_asset_optimizeTheme Asset OptimizeD

Configure theme asset optimization.

Inputs: machine_name (required), path, aggregate, optimize_js, +1 more. Returns: object

theme_base_changeTheme Base ChangeC

Change the base theme.

Inputs: machine_name (required), new_base_theme (required), path. Returns: object

theme_blocksTheme BlocksA

List placed blocks with optional theme, region, and text filters.

Reads every block.block.* placement from JSON:API: id, theme, region, label, plugin, weight, and enabled state. search matches label and plugin case-insensitively (the "do we have a block like Site branding?" question); theme_name and region narrow the list to one placement set. With no filters every placement on the site is returned, most specific sort first (theme, region, weight).

Inputs: region, search, theme_name. Returns: object

theme_breakpoint_createTheme Breakpoint CreateC

Add a breakpoint to theme.

Inputs: label (required), media_query (required), machine_name (required), breakpoint_id (required), +3 more. Returns: object

theme_createTheme CreateC

Create a new Drupal theme with full scaffolding.

Inputs: name (required), path, package, regions, +5 more. Returns: object

theme_debug_enableTheme Debug EnableC

Enable theme debugging (Twig debug, etc.).

Inputs: machine_name (required), path. Returns: object

theme_getTheme GetB

Get theme details from Drupal.org by machine name.

Inputs: project_id (required). Returns: object

theme_infoTheme InfoA

Describe one theme: metadata, base-theme chain, regions, libraries.

Combines drush pm:list (status, version, path) with a YAML parse of the theme's own .info.yml (description, regions in declaration order, libraries, dependencies) and follows the base theme chain upward as far as the site allows. Requires DRUPAL_ROOT: the info.yml lives on the local docroot.

Inputs: theme_name (required). Returns: object

theme_library_createTheme Library CreateC

Create or update a theme library.

Inputs: library_name (required), machine_name (required), js, css, +2 more. Returns: object

theme_lint_twigTheme Lint TwigC

Lint Twig templates in theme.

Inputs: machine_name (required), path. Returns: object

theme_preprocess_functionTheme Preprocess FunctionC

Add a preprocess function to theme.

Inputs: code (required), hook (required), machine_name (required), path. Returns: object

theme_region_createTheme Region CreateC

Add a region to theme.

Inputs: region_name (required), machine_name (required), region_label (required), path. Returns: object

theme_regionsTheme RegionsA

Region layout of a theme with the blocks placed in each one.

Regions come from the theme's info.yml in declaration order; each carries its blocks (label, plugin, weight, enabled state) and a count, so empty regions and placements in regions the theme no longer defines are both visible at a glance. Needs DRUPAL_ROOT (info.yml) and the JSON:API client (block placements).

Inputs: theme_name (required). Returns: object

theme_settings_formTheme Settings FormD

Generate theme settings form.

Inputs: machine_name (required), path, settings. Returns: object

theme_template_overrideTheme Template OverrideC

Create a template override in theme.

Inputs: machine_name (required), template_name (required), path, template_content. Returns: object

theme_template_overridesTheme Template OverridesB

Which core/module templates a theme overrides, and which it invented.

For every Twig file in the theme, the docroot is indexed once for files with the same name outside that theme; a match means the theme's copy wins at render time (an override), no match means a theme-original template. Returns both lists with paths, plus how many Twig files were scanned. Requires DRUPAL_ROOT.

Inputs: theme_name (required). Returns: object

theme_templatesTheme TemplatesA

List a theme's Twig templates (*.html.twig) with sizes.

Walks the theme directory on the local docroot (symlinks skipped, nothing outside DRUPAL_ROOT reported). pattern is a case-insensitive substring matched against the template name — "node--", "views", "field" — to narrow the list. Returns docroot-relative paths and byte sizes, sorted.

Inputs: theme_name (required), pattern. Returns: object

translation_addTranslation AddD

Add translation for an entity.

Inputs: langcode (required), entity_id (required), entity_type (required), fields. Returns: object

translation_statusTranslation StatusC

Get translation status for an entity.

Inputs: entity_id (required), entity_type (required). Returns: object

translation_updateTranslation UpdateC

Update translation for an entity.

Inputs: langcode (required), entity_id (required), entity_type (required), fields. Returns: object

unblock_userUnblock UserC

Unblock a user account.

Inputs: uid (required). Returns: object

update_nodeUpdate NodeC

Update a single node by ID with given fields.

Inputs: nid (required), fields (required). Returns: object

update_termUpdate TermD

Update a taxonomy term.

Inputs: tid (required), vid (required), fields (required). Returns: object

update_userUpdate UserC

Update a user account.

Inputs: uid (required), fields (required). Returns: object

update_vocabularyUpdate VocabularyD

Update a taxonomy vocabulary.

Inputs: vid (required), fields (required). Returns: object

upload_mediaUpload MediaC

Upload a file to the media library.

Inputs: file_path (required), alt, name, title, +1 more. Returns: object

validate_migrationValidate MigrationC

Validate migration configuration.

Inputs: migration_id (required). Returns: object

views_createViews CreateC

Create a new view.

Inputs: label (required), view_id (required), row, page, +16 more. Returns: object

views_deleteViews DeleteC

Delete a view.

Inputs: view_id (required). Returns: object

views_executeViews ExecuteA

Execute a view and return its rows.

Runs the view through the Views API rather than guessing at a GraphQL schema. The graphql module ships no view(view_id:...) root field, so the query this used to send could never resolve, and the fallback asked JSON:API for views/{id}/{display}, which is not a resource either. Neither path was reachable, so the tool failed wherever Views was installed and healthy.

args are the view's contextual filters, in order. filters are set on the view's exposed input, which is what a visitor filling in the view's own filter form sets. A display that does not exist is reported along with the displays the view does have: ViewExecutable::setDisplay would otherwise fail later, with a message naming neither the view nor the display the caller asked for.

Inputs: view_id (required), args, limit, offset, +2 more. Returns: object

views_exportViews ExportB

Export a view as configuration YAML or JSON.

Inputs: view_id (required), format. Returns: object

views_getViews GetC

Get a single view configuration by ID.

Inputs: view_id (required), include. Returns: object

views_listViews ListC

List all views on a Drupal site.

Inputs: filters, page_limit, page_offset. Returns: object

views_updateViews UpdateD

Update an existing view.

Inputs: view_id (required), row, page, sort, +14 more. Returns: object

view_template_infoView Template InfoA

Template names for overriding a Views display, verified against the site.

Looks the view up in the JSON:API view collection by its machine id (drupal_internal__id), so the display list is real: with display_id the chain starts at views-view--NAME--DISPLAY and falls back to the whole view; without it every display gets an entry, then the views-view base template. An unknown view errors with the views the site has, an unknown display_id with the displays that view has, and suggestions are marked in_checked_theme when the default theme's templates can be read (DRUPAL_ROOT). Views config changed names between Drupal generations (view.* on older sites, views.view.* on Drupal 11.4+), so the collection — addressed by entity id — is the stable source.

Inputs: view_name (required), display_id. Returns: object

webform_createWebform CreateC

Create a new webform.

Inputs: id (required), label (required), status, elements, +1 more. Returns: object

webform_deleteWebform DeleteC

Delete a webform.

Inputs: webform_id (required). Returns: object

webform_element_createWebform Element CreateC

Add an element to a webform.

Inputs: label (required), webform_id (required), element_key (required), element_type (required), +1 more. Returns: object

webform_element_listWebform Element ListB

List elements in a webform.

Inputs: webform_id (required). Returns: object

webform_export_submissionsWebform Export SubmissionsC

Export webform submissions.

Inputs: webform_id (required), format, filters. Returns: object

webform_getWebform GetC

Get a single webform by ID.

Inputs: webform_id (required), include. Returns: object

webform_handler_createWebform Handler CreateA

Create a webform handler (email, remote post, etc.).

A handler is a plugin held inside the webform's own configuration -- there is no webform_handler entity and JSON:API cannot POST one. This builds the plugin through plugin.manager.webform.handler and attaches it with Webform::addWebformHandler(), which is the same sequence Webform's own add-handler form runs.

id is the handler's id within the webform (email_confirmation, not email); handler_type is the plugin (email, webhook, auto_save, ...). configuration supplies plugin settings, which are merged over the plugin's defaults -- the reply echoes the whole resulting configuration so you can see what the defaults filled in.

Inputs: id (required), label (required), webform_id (required), handler_type (required), +1 more. Returns: object

webform_handler_deleteWebform Handler DeleteB

Delete a webform handler from its webform.

Removes it the way Webform's own delete form does -- through Webform::deleteWebformHandler(), which also runs the plugin's teardown. The webform's other handlers are left alone.

Inputs: handler_id (required), webform_id. Returns: object

webform_handler_listWebform Handler ListB

List the handlers attached to a webform.

Handlers are plugins configured on the webform, not entities, so there is no webform_handler resource for JSON:API to list. This reads them off the webform instead, which is where they live.

Inputs: page_limit, webform_id. Returns: object

webform_handler_updateWebform Handler UpdateA

Update a webform handler.

Handlers have no entity id of their own, so this finds the webform that owns handler_id and writes back through Webform::updateWebformHandler(). Pass webform_id to skip the search; without it, a handler id used by more than one webform is an error naming them rather than a guess.

configuration keys are replaced as a whole and keys you leave out keep their current value, so you can change one setting without resending the rest.

Inputs: handler_id (required), label, webform_id, configuration. Returns: object

webform_listWebform ListC

List all webforms.

Inputs: filters, page_limit, page_offset. Returns: object

webform_submission_deleteWebform Submission DeleteC

Delete a webform submission.

Inputs: submission_id (required). Returns: object

webform_submission_getWebform Submission GetC

Get a single webform submission by ID.

Inputs: submission_id (required), include. Returns: object

webform_submission_listWebform Submission ListC

List webform submissions.

Inputs: filters, page_limit, webform_id, page_offset. Returns: object

webform_token_listWebform Token ListC

List available webform tokens.

Inputs: webform_id. Returns: object

webform_updateWebform UpdateD

Update a webform.

Inputs: webform_id (required), label, status, elements, +1 more. Returns: object

workflow_getWorkflow GetC

Get a single workflow by ID.

Inputs: workflow_id (required), include. Returns: object

workflow_listWorkflow ListC

List all workflows.

Inputs: filters, page_limit, page_offset. Returns: object

xss_scanXss ScanC

Scan for XSS vulnerabilities in custom code.

Inputs: path (required). Returns: object

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    C2.1/5.0

    Scored across 414 tools

    Disambiguation2/5

    Many tools are distinct by resource, but there are multiple overlapping wrappers and near-duplicates: drush_command vs drush_cron/cron_run/cache_rebuild, security_scan vs security_audit vs code_audit_phpstan, ai_analyze_content_quality vs analyze_content_quality, and several media creation tools. With 414 tools, an agent will struggle to choose the right operation reliably.

    Naming Consistency2/5

    All names are snake_case, but conventions are mixed: verb-first tools like create_node and list_vocabularies coexist with resource-first tools like commerce_store_create and commerce_product_list, and test_run_phpunit vs run_migration adds further inconsistency. The prefixes are also overloaded across different domains, so there is no single predictable pattern.

    Tool Count1/5

    414 tools is far beyond an appropriate set for any coherent MCP server. Many tools are thin wrappers around Drush, duplicate existing operations, or cover very narrow subcases, making the surface extreme and hard to manage.

    Completeness3/5

    Core Drupal areas such as nodes, users, taxonomy, config, views, blocks, menus, fields, redirects, and paragraphs have strong coverage. However, several advertised subdomains are notably partial: commerce promotions/payment gateways/shipping methods lack full CRUD, media entities lack update/delete, webform submissions/elements lack create/update in places, and workflows/search API servers/facets have missing update or delete operations.

    Maintenance

    ActivitySlowing
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers