API Reference

Complete reference of every tool, resource, and prompt exposed by the WPZylos MCP server.


Tools

Core Tools

set_project_target

Set the active plugin directory. All subsequent tool calls operate against this path.

ParameterTypeRequiredDescription
pathstringyesAbsolute path to the plugin directory

recommend_package

Suggest framework packages that match a feature keyword.

ParameterTypeRequiredDescription
featurestringyesKeyword describing the desired feature (e.g. "rest api", "custom table", "settings")

inspect_package

Deep-dive into a specific framework package. Returns its classes, public methods, stubs, and usage notes.

ParameterTypeRequiredDescription
namestringyesPackage name as listed in the registry

inspect_class

Get detailed information about a single class: properties, methods, constructor signature, and inheritance chain.

ParameterTypeRequiredDescription
fqcnstringyesFully qualified class name

search_framework

Full-text search across all framework source files. Returns matching file paths and line snippets.

ParameterTypeRequiredDescription
querystringyesSearch term or phrase

find_pattern

Find code patterns (class usage, function calls, hooks) inside a plugin directory.

ParameterTypeRequiredDescription
patternstringyesPattern or keyword to search for
pathstringnoDirectory to search. Defaults to active project

Scaffolding Tools

scaffold_plugin

Generate a complete, boot-ready plugin with entry file, bootstrap, PluginContext, Lifecycle, config, routes, and composer.json.

ParameterTypeRequiredDescription
namestringyesHuman-readable plugin name
slugstringyesURL-safe slug
namespacestringyesPHP root namespace
prefixstringyesDatabase / option prefix
textDomainstringyesi18n text domain
descriptionstringnoPlugin header description
authorstringnoAuthor name
authorUristringnoAuthor URL
pluginUristringnoPlugin URL
licensestringnoLicense identifier
minPhpstringnoMinimum PHP version
minWpstringnoMinimum WordPress version

scaffold_crud_module

Generate a full CRUD module: model, migration, controller, service provider, routes, and optionally REST endpoints and views.

ParameterTypeRequiredDescription
namestringyesModule name (PascalCase, singular)
fieldsarrayyesArray of { name, type, default? } objects
hasRestbooleannoGenerate REST controller and routes
hasViewsbooleannoGenerate admin view templates

scaffold_cpt_module

Generate a custom post type with registration, labels, and optionally a meta box.

ParameterTypeRequiredDescription
namestringyesPost type name (PascalCase)
slugstringyesPost type slug (lowercase, hyphenated)
supportsarraynoSupported features: title, editor, thumbnail, etc.
hasMetaBoxbooleannoGenerate a meta box for custom fields

scaffold_rest_module

Generate a REST API controller with route registration.

ParameterTypeRequiredDescription
namestringyesResource name (PascalCase, singular)
methodsarraynoHTTP methods to scaffold: index, show, store, update, delete. Defaults to all.

scaffold_settings_page

Generate an admin settings page with sections and fields.

ParameterTypeRequiredDescription
namestringyesPage name / menu title
sectionsarraynoArray of { id, title, fields[] } objects
capabilitystringnoRequired capability. Defaults to manage_options

build_from_blueprint

Generate a complete plugin from a single specification object. Combines scaffold_plugin, model generation, controller generation, route wiring, and provider registration in one pass.

ParameterTypeRequiredDescription
specobjectyesFull blueprint specification (see Examples)

Generation Tools

These tools generate a single file from a framework stub.

generate_from_stub

Generate any file from a registered stub template.

ParameterTypeRequiredDescription
stubNamestringyesStub identifier (e.g. model, controller)
namespacestringyesTarget PHP namespace
classNamestringyesTarget class name
extraTokensobjectnoAdditional replacement tokens for the stub

generate_provider

Generate a service provider class.

ParameterTypeRequiredDescription
namestringyesProvider name
namespacestringnoTarget namespace

generate_model

Generate a model class.

ParameterTypeRequiredDescription
namestringyesModel name
namespacestringnoTarget namespace
tablestringnoCustom table name
fillablearraynoFillable fields

generate_controller

Generate a controller class.

ParameterTypeRequiredDescription
namestringyesController name
namespacestringnoTarget namespace
methodsarraynoMethods to include

generate_middleware

Generate a middleware class.

ParameterTypeRequiredDescription
namestringyesMiddleware name
namespacestringnoTarget namespace

Enhancement Tools

scaffold_ajax_handler

Generate an AJAX handler with a dedicated service provider.

ParameterTypeRequiredDescription
namestringyesHandler name
actionstringyesWordPress AJAX action name
isPublicbooleannoRegister for non-logged-in users too

scaffold_cron_job

Generate a cron job with scheduling and a service provider.

ParameterTypeRequiredDescription
namestringyesJob name
schedulestringyesWP schedule interval (e.g. hourly, daily)
callbackstringyesCallback method name

scaffold_custom_table

Generate a custom database table with a migration file.

ParameterTypeRequiredDescription
namestringyesTable name (without prefix)
columnsarrayyesArray of { name, type, nullable?, default? } objects

scaffold_meta_box

Generate a meta box with field rendering and save logic.

ParameterTypeRequiredDescription
namestringyesMeta box name
postTypestringyesPost type to attach to
fieldsarrayyesArray of { name, type, label } objects

scaffold_admin_notice

Generate an admin notice with a service provider.

ParameterTypeRequiredDescription
namestringyesNotice name
typestringyesNotice type: success, warning, error, info
messagestringyesNotice message text

scaffold_update_checker

Generate a plugin update checker that calls a remote API.

ParameterTypeRequiredDescription
namestringyesChecker name
apiUrlstringyesRemote update API endpoint URL

Validation Tools

validate_conventions

Check a plugin against framework naming and structural conventions.

ParameterTypeRequiredDescription
pathstringnoPlugin path. Defaults to active project

Returns a list of violations grouped by severity: error, warning, info.

validate_security

Run a security audit on a plugin.

ParameterTypeRequiredDescription
pathstringnoPlugin path. Defaults to active project

Checks for: missing nonce verification, unescaped output, direct file access, raw SQL, missing capability checks.

validate_structure

Validate that a plugin's directory structure matches framework expectations.

ParameterTypeRequiredDescription
pathstringnoPlugin path. Defaults to active project

validate_composer

Validate the plugin's composer.json for correct autoloading, dependencies, and metadata.

ParameterTypeRequiredDescription
pathstringnoPlugin path. Defaults to active project

Gutenberg Tools

  • gutenberg_scaffold_block(name, title, category?, attributes?) -- Scaffold a custom Gutenberg block with block.json, edit/save components, and build config.
  • gutenberg_scaffold_sidebar(name, title) -- Scaffold a sidebar plugin for the block editor.
  • gutenberg_scaffold_format(name, title) -- Scaffold a custom RichText format type.

WooCommerce Tools

  • woo_scaffold_gateway(name, title, description?) -- Scaffold a payment gateway class with settings and process_payment stub.
  • woo_scaffold_product_type(name, slug) -- Scaffold a custom product type.
  • woo_scaffold_email(name, title, recipient?) -- Scaffold a custom WooCommerce email class.
  • woo_scaffold_widget(name, title) -- Scaffold a WooCommerce widget.

Multisite Tools

  • multisite_scaffold_network_settings(name, sections?) -- Scaffold a network-level settings page.
  • multisite_scaffold_site_module(name, scope?) -- Scaffold a module that operates at site or network scope.

Niche Tools

  • scaffold_shortcode(tag, attributes?, hasContent?) -- Scaffold a shortcode handler with ServiceProvider.
  • scaffold_widget(name, title, fields?) -- Scaffold a WordPress widget.
  • scaffold_cli_command(name, synopsis?) -- Scaffold a WP-CLI command.

Resources

Resources are read-only data endpoints that provide framework knowledge.

URIDescription
wpzylos://architecture/overviewHigh-level architecture and design philosophy
wpzylos://architecture/boot-sequenceStep-by-step plugin boot sequence
wpzylos://architecture/rulesCoding rules and conventions
wpzylos://architecture/dependency-graphPackage dependency relationships
wpzylos://scaffold/structureExpected directory layout for generated plugins
wpzylos://packages/registryComplete list of available framework packages
wpzylos://stubs/listAll registered code generation stubs
wpzylos://guides/framework-cookbookRecipes for common patterns
wpzylos://guides/security-checklistSecurity best practices checklist
wpzylos://guides/testingTesting setup and patterns
wpzylos://docs/indexDocumentation index and sitemap
wpzylos://project/contextCurrent active project metadata
wpzylos://project/providersRegistered service providers in active project
wpzylos://project/routesRoute definitions in active project
wpzylos://project/modelsModel classes in active project
wpzylos://project/configMerged config values from active project

Prompts

Prompts are pre-built prompt templates that combine multiple tool calls and produce structured output.

create_plugin

Guided plugin creation with follow-up scaffolding.

ParameterTypeRequiredDescription
namestringyesPlugin name
slugstringyesPlugin slug
descriptionstringyesWhat the plugin does
featuresarraynoList of features to include

audit_plugin

Comprehensive plugin review: conventions, security, performance, and architecture.

ParameterTypeRequiredDescription
pathstringyesPath to the plugin
areastringnoFocus area: security, performance, conventions, all

add_feature

Add a feature to an existing plugin with appropriate scaffolding.

ParameterTypeRequiredDescription
featurestringyesFeature description
pluginPathstringyesPath to target plugin

migrate_plugin

Analyze a legacy plugin and generate a migration plan to the framework.

ParameterTypeRequiredDescription
pathstringyesPath to the legacy plugin

explain_architecture

Get an explanation of a specific architectural concept.

ParameterTypeRequiredDescription
topicstringyesTopic to explain

debug_boot

Diagnose boot failures and provider registration issues.

ParameterTypeRequiredDescription
pathstringyesPath to the plugin

optimize_performance

Analyze and suggest performance improvements.

ParameterTypeRequiredDescription
pathstringyesPath to the plugin

generate_tests

Generate test cases for a plugin's components.

ParameterTypeRequiredDescription
pathstringyesPath to the plugin
scopestringnounit, integration, or all

refactor_module

Suggest and apply refactoring to a module.

ParameterTypeRequiredDescription
pathstringyesPath to the module
goalstringnoRefactoring goal

compare_approaches

Compare two implementation approaches for a feature.

ParameterTypeRequiredDescription
featurestringyesFeature to implement
approach1stringyesFirst approach
approach2stringyesSecond approach

document_plugin

Auto-generate documentation for a plugin.

ParameterTypeRequiredDescription
pathstringyesPath to the plugin
formatstringnoOutput format: markdown, phpdoc

plan_feature

Create a detailed implementation plan for a feature before building it.

ParameterTypeRequiredDescription
featurestringyesFeature description
pluginPathstringyesPath to target plugin

security_fix

Identify and fix a specific security issue.

ParameterTypeRequiredDescription
pathstringyesPath to the plugin
issuestringyesDescription of the security issue

check_compatibility

Check a plugin for compatibility with a specific WordPress or PHP version.

ParameterTypeRequiredDescription
pathstringyesPath to the plugin
wpVersionstringnoTarget WordPress version
phpVersionstringnoTarget PHP version

See Also