MCP tool reference Pro
Every tool Temper's MCP server offers, what it does, its parameters, and which ones need your permission.
Every tool below is available to an AI assistant connected with a key from Settings › AI tools (MCP), while your Temper Pro licence is active. Tools marked Yes under Permission also need Let AI tools run code, publish and commit turned on. See Permissions.
The file tools work on the selected project, a theme or a plugin. Paths are relative to the project folder, like parts/header.html or functions.php. Parameters in bold are required.
Projects#
| Tool | What it does | Parameters | Permission |
|---|---|---|---|
get_theme_info | The selected project's name, slug, kind (theme or plugin), whether it's a block theme, its parent, whether it's installed and active, the WordPress version, whether ACF is active, the number of unpublished changes, can_publish, the preview URL and the editor URL. Also the linked repositories, build status and PHP dependencies. Call this first. | None | No |
list_themes | Installed themes and working copies, with which one is active. | None | No |
select_theme | Makes a theme the target of the file tools. Doesn't activate it. | slug: theme folder name | No |
create_theme | Creates a theme as a working copy and selects it. Nothing is installed until someone publishes. | type: blank, child or copy; name; description; parent (for child); source (for copy); background, text, accent (hex colors, for blank) | No |
list_plugins | Installed plugins and working copies, with which ones are active. | None | No |
select_plugin | Makes a plugin the target of the file tools, creating its working copy on first use. Doesn't activate it. | slug: plugin folder name | No |
create_plugin | Creates a plugin as a working copy and selects it. blank loads files from /inc; blocks adds a dynamic block registered from /blocks; elementor adds a widget registered from /widgets; bricks adds an element registered from /elements. | type: blank, blocks, elementor or bricks; name; widget (first widget or element's name, default Hero or Card); slug; description | No |
Files#
| Tool | What it does | Parameters | Permission |
|---|---|---|---|
list_files | Files in the working copy with their status against live: A added, M modified, D deleted, empty for unchanged, and their size. | prefix: only files under this folder | No |
read_file | A file from the working copy, or the live version. Binary files can't be read as text. | path; version: working (default) or live | No |
write_file | Creates or replaces a file. The content must be the whole file. Rejected if it fails the save checks. | path, content | No |
edit_file | Replaces an exact string. old_string must appear exactly once unless replace_all is true. Rejected if the result fails the save checks. | path, old_string, new_string; replace_all | No |
delete_file | Deletes a file from the working copy. The live site keeps it until someone publishes. | path | No |
rename_file | Moves a file within the working copy. | from, to | No |
revert_file | Restores a file to its live version, or removes it if it only exists in the working copy. | path | No |
search_files | Finds text across the working copy and returns each match's path, line and text. Skips vendor, node_modules and dist unless asked. | query; regex (PCRE, no delimiters); case_sensitive (default false); path (folder or prefix); include_ignored; max_results (default 60, at most 200) | No |
Checking work#
| Tool | What it does | Parameters | Permission |
|---|---|---|---|
validate_file | Runs the save checks without writing. Omit content to check the saved file. | path; content | No |
get_changes | A unified diff of every file that differs from live. | path: one file only | No |
render_preview | Runs a block, pattern, template part or HTML template from the working copy and returns the HTML it produces (markup only, no styles, up to 8,000 characters). Blocks render with their block.json defaults unless you pass attributes. | path: a file in blocks/, patterns/, parts/ or templates/; attributes: for blocks | Only for blocks and patterns, which run PHP |
list_snapshots | Versions kept from earlier publishes, newest first, with their ids. | None | No |
Starters#
| Tool | What it does | Parameters | Permission |
|---|---|---|---|
list_templates | The starters that suit the selected project, with the fields each takes. Includes custom starters, with ids like theme:section. | None | No |
create_from_template | Creates a starter's files and wires them up (the loader in functions.php or the main plugin file, theme.json entries). From a theme, a block, widget, element or post type goes where you put the last one, or where it's recommended. | template_id, like block or acf-block; values: field values by name, like {"title": "Court finder"} | No |
Publishing#
| Tool | What it does | Parameters | Permission |
|---|---|---|---|
publish | Makes the working copy live. The replaced version is kept as a snapshot. The same checks as publishing in Temper apply, including the health check and the build. | message: what changed | Yes |
rollback | Puts a snapshot back live. The current live version is kept as a new snapshot. | id: from list_snapshots | Yes |
activate_theme | Makes an installed theme the live theme. Unpublished changes aren't included. | slug: defaults to the selected theme | Yes |
activate_plugin | Turns an installed plugin on. A fatal error is reported instead of taking the site down. | slug: defaults to the selected plugin | Yes |
deactivate_plugin | Turns an installed plugin off. Its data stays. | slug: defaults to the selected plugin | Yes |
Git#
list_repos, set_repository and create_repo take a host: github (the default) or gitlab. git_status, git_pull and git_commit use whichever host the project's repository is on. which is mine (the default), the repository commits go to, or source, the pull-only repository the project came from. See Link a repository.
| Tool | What it does | Parameters | Permission |
|---|---|---|---|
git_status | Compares the working copy with the repository: the branch head, the last commit synced, whether it's behind, and which files differ. | which | No |
git_pull | Brings branch changes into the working copy. Files you changed are kept and reported as conflicts, unless strategy is theirs. | which; strategy: safe (default) or theirs | No |
list_repos | Repositories (GitHub) or projects (GitLab) the site's connection can see, with their default branch and whether it can push. | query: name filter; host | No |
set_repository | Points the project at a repository. Send an empty repo to disconnect one. | which; host; repo (owner/name, GitLab group/name or group/subgroup/name, or an address); branch (default main); path (folder inside the repository) | Yes |
create_repo | Creates a repository on GitHub or a project on GitLab, private unless you say otherwise. Connect it with set_repository. | name (or owner/name); host; owner; private (default true); description | Yes |
git_commit | Commits the working copy to the branch of the project's own repository. | message | Yes |
Builds#
| Tool | What it does | Parameters | Permission |
|---|---|---|---|
get_build_status | Whether the project has a build step (Tailwind, Sass, JavaScript) and whether its output is current. Builds run in the browser when someone opens Temper. | None | No |
install_php_dependencies | Installs the packages in composer.lock into vendor/ and writes an autoloader, without Composer. | None | Yes |
Errors#
A tool that fails returns its message as text with isError set, so the assistant can read it and try again. A failed save check lists each problem as "Line n: message". A publish blocked by errors lists each file and line.