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.
| Parameter | Type | Required | Description |
|---|---|---|---|
path | string | yes | Absolute path to the plugin directory |
recommend_package
Suggest framework packages that match a feature keyword.
| Parameter | Type | Required | Description |
|---|---|---|---|
feature | string | yes | Keyword 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.
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | yes | Package name as listed in the registry |
inspect_class
Get detailed information about a single class: properties, methods, constructor signature, and inheritance chain.
| Parameter | Type | Required | Description |
|---|---|---|---|
fqcn | string | yes | Fully qualified class name |
search_framework
Full-text search across all framework source files. Returns matching file paths and line snippets.
| Parameter | Type | Required | Description |
|---|---|---|---|
query | string | yes | Search term or phrase |
find_pattern
Find code patterns (class usage, function calls, hooks) inside a plugin directory.
| Parameter | Type | Required | Description |
|---|---|---|---|
pattern | string | yes | Pattern or keyword to search for |
path | string | no | Directory 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.
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | yes | Human-readable plugin name |
slug | string | yes | URL-safe slug |
namespace | string | yes | PHP root namespace |
prefix | string | yes | Database / option prefix |
textDomain | string | yes | i18n text domain |
description | string | no | Plugin header description |
author | string | no | Author name |
authorUri | string | no | Author URL |
pluginUri | string | no | Plugin URL |
license | string | no | License identifier |
minPhp | string | no | Minimum PHP version |
minWp | string | no | Minimum WordPress version |
scaffold_crud_module
Generate a full CRUD module: model, migration, controller, service provider, routes, and optionally REST endpoints and views.
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | yes | Module name (PascalCase, singular) |
fields | array | yes | Array of { name, type, default? } objects |
hasRest | boolean | no | Generate REST controller and routes |
hasViews | boolean | no | Generate admin view templates |
scaffold_cpt_module
Generate a custom post type with registration, labels, and optionally a meta box.
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | yes | Post type name (PascalCase) |
slug | string | yes | Post type slug (lowercase, hyphenated) |
supports | array | no | Supported features: title, editor, thumbnail, etc. |
hasMetaBox | boolean | no | Generate a meta box for custom fields |
scaffold_rest_module
Generate a REST API controller with route registration.
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | yes | Resource name (PascalCase, singular) |
methods | array | no | HTTP methods to scaffold: index, show, store, update, delete. Defaults to all. |
scaffold_settings_page
Generate an admin settings page with sections and fields.
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | yes | Page name / menu title |
sections | array | no | Array of { id, title, fields[] } objects |
capability | string | no | Required 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.
| Parameter | Type | Required | Description |
|---|---|---|---|
spec | object | yes | Full 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.
| Parameter | Type | Required | Description |
|---|---|---|---|
stubName | string | yes | Stub identifier (e.g. model, controller) |
namespace | string | yes | Target PHP namespace |
className | string | yes | Target class name |
extraTokens | object | no | Additional replacement tokens for the stub |
generate_provider
Generate a service provider class.
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | yes | Provider name |
namespace | string | no | Target namespace |
generate_model
Generate a model class.
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | yes | Model name |
namespace | string | no | Target namespace |
table | string | no | Custom table name |
fillable | array | no | Fillable fields |
generate_controller
Generate a controller class.
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | yes | Controller name |
namespace | string | no | Target namespace |
methods | array | no | Methods to include |
generate_middleware
Generate a middleware class.
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | yes | Middleware name |
namespace | string | no | Target namespace |
Enhancement Tools
scaffold_ajax_handler
Generate an AJAX handler with a dedicated service provider.
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | yes | Handler name |
action | string | yes | WordPress AJAX action name |
isPublic | boolean | no | Register for non-logged-in users too |
scaffold_cron_job
Generate a cron job with scheduling and a service provider.
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | yes | Job name |
schedule | string | yes | WP schedule interval (e.g. hourly, daily) |
callback | string | yes | Callback method name |
scaffold_custom_table
Generate a custom database table with a migration file.
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | yes | Table name (without prefix) |
columns | array | yes | Array of { name, type, nullable?, default? } objects |
scaffold_meta_box
Generate a meta box with field rendering and save logic.
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | yes | Meta box name |
postType | string | yes | Post type to attach to |
fields | array | yes | Array of { name, type, label } objects |
scaffold_admin_notice
Generate an admin notice with a service provider.
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | yes | Notice name |
type | string | yes | Notice type: success, warning, error, info |
message | string | yes | Notice message text |
scaffold_update_checker
Generate a plugin update checker that calls a remote API.
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | yes | Checker name |
apiUrl | string | yes | Remote update API endpoint URL |
Validation Tools
validate_conventions
Check a plugin against framework naming and structural conventions.
| Parameter | Type | Required | Description |
|---|---|---|---|
path | string | no | Plugin 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.
| Parameter | Type | Required | Description |
|---|---|---|---|
path | string | no | Plugin 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.
| Parameter | Type | Required | Description |
|---|---|---|---|
path | string | no | Plugin path. Defaults to active project |
validate_composer
Validate the plugin's composer.json for correct autoloading, dependencies, and metadata.
| Parameter | Type | Required | Description |
|---|---|---|---|
path | string | no | Plugin path. Defaults to active project |
Gutenberg Tools
gutenberg_scaffold_block(name, title, category?, attributes?)-- Scaffold a custom Gutenberg block withblock.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.
| URI | Description |
|---|---|
wpzylos://architecture/overview | High-level architecture and design philosophy |
wpzylos://architecture/boot-sequence | Step-by-step plugin boot sequence |
wpzylos://architecture/rules | Coding rules and conventions |
wpzylos://architecture/dependency-graph | Package dependency relationships |
wpzylos://scaffold/structure | Expected directory layout for generated plugins |
wpzylos://packages/registry | Complete list of available framework packages |
wpzylos://stubs/list | All registered code generation stubs |
wpzylos://guides/framework-cookbook | Recipes for common patterns |
wpzylos://guides/security-checklist | Security best practices checklist |
wpzylos://guides/testing | Testing setup and patterns |
wpzylos://docs/index | Documentation index and sitemap |
wpzylos://project/context | Current active project metadata |
wpzylos://project/providers | Registered service providers in active project |
wpzylos://project/routes | Route definitions in active project |
wpzylos://project/models | Model classes in active project |
wpzylos://project/config | Merged 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.
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | yes | Plugin name |
slug | string | yes | Plugin slug |
description | string | yes | What the plugin does |
features | array | no | List of features to include |
audit_plugin
Comprehensive plugin review: conventions, security, performance, and architecture.
| Parameter | Type | Required | Description |
|---|---|---|---|
path | string | yes | Path to the plugin |
area | string | no | Focus area: security, performance, conventions, all |
add_feature
Add a feature to an existing plugin with appropriate scaffolding.
| Parameter | Type | Required | Description |
|---|---|---|---|
feature | string | yes | Feature description |
pluginPath | string | yes | Path to target plugin |
migrate_plugin
Analyze a legacy plugin and generate a migration plan to the framework.
| Parameter | Type | Required | Description |
|---|---|---|---|
path | string | yes | Path to the legacy plugin |
explain_architecture
Get an explanation of a specific architectural concept.
| Parameter | Type | Required | Description |
|---|---|---|---|
topic | string | yes | Topic to explain |
debug_boot
Diagnose boot failures and provider registration issues.
| Parameter | Type | Required | Description |
|---|---|---|---|
path | string | yes | Path to the plugin |
optimize_performance
Analyze and suggest performance improvements.
| Parameter | Type | Required | Description |
|---|---|---|---|
path | string | yes | Path to the plugin |
generate_tests
Generate test cases for a plugin's components.
| Parameter | Type | Required | Description |
|---|---|---|---|
path | string | yes | Path to the plugin |
scope | string | no | unit, integration, or all |
refactor_module
Suggest and apply refactoring to a module.
| Parameter | Type | Required | Description |
|---|---|---|---|
path | string | yes | Path to the module |
goal | string | no | Refactoring goal |
compare_approaches
Compare two implementation approaches for a feature.
| Parameter | Type | Required | Description |
|---|---|---|---|
feature | string | yes | Feature to implement |
approach1 | string | yes | First approach |
approach2 | string | yes | Second approach |
document_plugin
Auto-generate documentation for a plugin.
| Parameter | Type | Required | Description |
|---|---|---|---|
path | string | yes | Path to the plugin |
format | string | no | Output format: markdown, phpdoc |
plan_feature
Create a detailed implementation plan for a feature before building it.
| Parameter | Type | Required | Description |
|---|---|---|---|
feature | string | yes | Feature description |
pluginPath | string | yes | Path to target plugin |
security_fix
Identify and fix a specific security issue.
| Parameter | Type | Required | Description |
|---|---|---|---|
path | string | yes | Path to the plugin |
issue | string | yes | Description of the security issue |
check_compatibility
Check a plugin for compatibility with a specific WordPress or PHP version.
| Parameter | Type | Required | Description |
|---|---|---|---|
path | string | yes | Path to the plugin |
wpVersion | string | no | Target WordPress version |
phpVersion | string | no | Target PHP version |
See Also
- Usage Guide -- Workflow walkthroughs
- Examples -- Real-world plugin builds