Docs PromptWire Version 1.x MCP Tools Reference

MCP Tools Reference

All 46 MCP tools available to the AI agent, with descriptions and parameters.

PromptWire ships with 46 specialised MCP tools. You never need to call these directly; just describe what you want in Cursor chat and the agent selects the right tools automatically. The example prompts below show how you'd typically invoke each one.

Site inspection

ToolDescriptionParameters
pw_health"Show me the site health check" or "Check the health of both sites"
Check ProcessWire connection, version, and page/template/field counts
site
pw_list_templates"What templates does this site have?"
List all templates with field assignments
pw_get_template"Show me the fields on the blog_post template"
Inspect a template's fields, family settings, and access rules
name
pw_inspect_template"Compare the blog_post template fields between local and production"
Like pw_get_template but each field comes back as {name, type, label}. Designed for spotting fieldgroup differences before pushing changes
name site
pw_list_fields"List all fields and show which templates use them"
List all fields with types and optional usage counts
includeUsage
pw_get_field"What are the settings for the body field?"
Get full field details: type, inputfield class, and settings
name
pw_get_page"Show me the content of the About page"
Retrieve a page by ID or path with all custom field content
idOrPath includeFiles truncate summary
pw_query_pages"Find all blog posts published in the last 30 days"
Find pages using ProcessWire selectors with full field data
selector
pw_search"Search the site for any pages mentioning 'pricing'"
Full-text search across all page content
query limit
pw_search_files"Find any template files that reference the image field"
Search PHP and template files in the site directory
query limit
pw_modules_list"Compare installed modules between local and production"
List installed modules with version, file path, and install state. Pass site: "both" to compare local and production install state in one call
classes site
pw_users_list"List all admin users on production"
List users with id, name, email, roles, and any member_* fields. Pass includeAll: true for every non-system field on the user template. Password hashes are always excluded
includeAll site
pw_resolve"Resolve these field and template names to IDs on production"
Bulk name-to-id lookup across fields, templates, pages, roles, permissions, users, or modules. Translates names into the equivalent IDs on the target site without one round trip per name
type names site
pw_export_schema"Export the entire site schema so I can review it"
Export the full site schema (templates + fields) as JSON or YAML
format

Content sync

ToolDescriptionParameters
pw_page_pull"Pull the latest blog post so I can edit it locally" or "Pull this page from production so I can re-edit it"
Pull a page into a local sync directory as editable YAML. With source: "remote", fetches a page that was edited directly in the production admin so you can re-edit and push back without touching the live admin
pageIdOrPath source
pw_page_push"Push my About page changes back to ProcessWire"
Push local YAML changes back to ProcessWire (local, remote, or both)
localPath dryRun force targets publish
pw_pages_pull"Pull all the blog posts so I can work on them offline"
Pull multiple pages by selector, parent, or template
selector limit noParent
pw_pages_push"Push all my local changes back to ProcessWire" or "Push every page under /docs/ to production"
Push all changes in a sync directory tree at once. Supports targets: "local" | "remote" | "both", with pages sent in parent-first order so newly-created parents exist before their children attach
directory dryRun force targets publish
pw_sync_status"Which pages have I changed locally?"
Check sync status of all pulled pages (clean, dirty, conflict)
directory
pw_sync_reconcile"I renamed some pages in ProcessWire — fix up the sync folders"
Fix path drift, detect orphans, and repair sync directories
directory dryRun
pw_validate_refs"Check if any page references are broken in my synced content"
Validate page references across synced content
target syncRoot

Page management

ToolDescriptionParameters
pw_page_new"Create a new FAQ page under /about/ using the basic-page template"
Scaffold a new page locally with page.yaml and page.meta.json
template parentPath pageName title
pw_page_init"Repair the meta file for the About page sync directory"
Initialise or repair page.meta.json for an existing sync directory
localPath template
pw_page_publish"Publish the new FAQ page to ProcessWire"
Publish a scaffolded page to ProcessWire (local, remote, or both)
localPath dryRun published targets
pw_pages_publish"Publish all the new doc pages I've created"
Publish all new page scaffolds in a directory at once
directory dryRun published

Schema sync

ToolDescriptionParameters
pw_schema_pull"Pull the schema so I have a local copy of all fields and templates"
Pull field and template definitions from ProcessWire into local JSON files
pw_schema_push"Push the updated schema to ProcessWire"
Push local schema files to ProcessWire (creates or updates fields and templates)
dryRun
pw_schema_diff"Has the schema changed since I last pulled it?"
Diff local schema files against the live site
pw_schema_compare"Compare our local schema against production and flag differences"
Compare schemas between two sites (e.g. local vs production)
source target
pw_list_sites"Which remote sites do I have configured?"
List configured remote sites from .pw-sync/sites/
pw_template_fields_push"Add a member_first_name field to the blog_post template on both sites. Dry-run first."
Add, remove, or reorder fields on a template's fieldgroup, and set per-fieldgroup context overrides (label, description, required, columnWidth, etc.). Includes a conflict classifier (safe / warning / danger) that flags removals of required fields, module-owned fields, and fields hardcoded in frontend templates. When called against both sites, detects cross-site fieldtype drift and refuses to proceed until it's resolved
template add remove reorder site dryRun force

File sync

ToolDescriptionParameters
pw_page_assets"Sync the blog post images and attached files to production, including MediaHub files"
Sync the on-disk asset directory site/assets/files/{pageId}/ between local and remote. Walks the directory directly rather than iterating $page->template->fieldgroup, so files placed there by modules outside the normal field flow (MediaHub, custom uploaders) are picked up. Supports inventory, download, upload, delete, and compare actions
action pageRef direction dryRun site
pw_file_sync"Sync the blog post images up to production"
Sync file and image field content between local and remote environments. Iterates the page's fieldgroup, so module-managed files are missed. pw_page_assets (above) is the preferred path for most work
localPath targets dryRun deleteRemoteOrphans

Repeater Matrix

ToolDescriptionParameters
pw_matrix_info"What content types are available in the page_builder matrix?"
Get matrix field structure including types, fields, and labels
pageIdOrPath fieldName
pw_matrix_add"Add a text block to the page builder on the About page"
Add a new item to a repeater matrix field
pageIdOrPath fieldName matrixType content dryRun

Database

ToolDescriptionParameters
pw_db_schema"Show me all the database tables" or "What columns does the pages table have on production?"
Inspect all tables or drill into one table's columns, types, keys, and indexes
table site
pw_db_query"Run a query to find all pages with status 1 on production"
Execute a read-only SELECT query. Mutations are blocked and a LIMIT is auto-injected if missing
sql limit site
pw_db_explain"Explain this query so I can see if it's using indexes"
Run EXPLAIN on a SELECT query for performance analysis
sql site
pw_db_counts"How many pages, fields, and templates does this site have in the database?"
Row counts for core ProcessWire tables and the 20 largest field data tables
site

Logs

ToolDescriptionParameters
pw_logs"What log files are available?" or "Show me the last 10 errors on production"
List available log files, or read and filter entries by level and text pattern
logName level text limit site
pw_last_error"What was the last error on production?"
Retrieve the most recent error from the error and exception logs
site

Cache

ToolDescriptionParameters
pw_clear_cache"Clear all caches" or "Clear the module cache on production"
Clear caches by target: all, modules, templates, compiled, or wire-cache
target site

Site sync

ToolDescriptionParameters
pw_site_compare"Compare my local site against production"
Compare local and remote sites across pages (by path), schema, and template/module files. Pages are matched by URL path, not ID, so comparison works across environments with different auto-increment sequences
excludeTemplates excludePages
pw_site_sync"Sync everything to production with backup and maintenance mode"
Orchestrated deployment: compare, optionally back up the target, enable maintenance mode, push schema, pages (with file/image assets), and template/module files, then disable maintenance. Dry-run by default
direction scope excludeTemplates excludePages excludeFilePatterns backup maintenance dryRun
pw_maintenance"Enable maintenance mode on production"
Toggle maintenance mode on local, remote, or both sites. Visitors see a styled 503 page; superusers and the PromptWire API bypass it
action message targets
pw_backup"Back up the remote site before I deploy"
Create, list, restore, or delete site backups. Database dumps use ProcessWire's WireDatabaseBackup; file backups zip site/templates and site/modules
action description filename excludeTables includeFiles targets

Common behaviours

Several conventions apply across all tools:

  • Dry-run by default: all write operations preview changes without applying them. Ask the agent to "apply", "do it for real", or "run without dry-run" to execute.
  • Force push: skips conflict detection when pushing. Use when you're certain your local version should overwrite the database.
  • Target selection: push and publish operations accept targets: "local" | "remote" | "both". The default depends on which environment variables you've configured.
  • Read-tool site selection: diagnostic and inspection tools accept site: "local" | "remote" | "both". With "both", the call runs in parallel against both environments and returns both results in one round trip, useful for spotting drift between local and production.

Last updated