Temper
Menu

MCP tool reference Pro

Every tool Temper's MCP server offers, what it does, its parameters, and which ones need your permission.

On this page

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#

ToolWhat it doesParametersPermission
get_theme_infoThe 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.NoneNo
list_themesInstalled themes and working copies, with which one is active.NoneNo
select_themeMakes a theme the target of the file tools. Doesn't activate it.slug: theme folder nameNo
create_themeCreates 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_pluginsInstalled plugins and working copies, with which ones are active.NoneNo
select_pluginMakes a plugin the target of the file tools, creating its working copy on first use. Doesn't activate it.slug: plugin folder nameNo
create_pluginCreates 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; descriptionNo

Files#

ToolWhat it doesParametersPermission
list_filesFiles 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 folderNo
read_fileA file from the working copy, or the live version. Binary files can't be read as text.path; version: working (default) or liveNo
write_fileCreates or replaces a file. The content must be the whole file. Rejected if it fails the save checks.path, contentNo
edit_fileReplaces 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_allNo
delete_fileDeletes a file from the working copy. The live site keeps it until someone publishes.pathNo
rename_fileMoves a file within the working copy.from, toNo
revert_fileRestores a file to its live version, or removes it if it only exists in the working copy.pathNo
search_filesFinds 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#

ToolWhat it doesParametersPermission
validate_fileRuns the save checks without writing. Omit content to check the saved file.path; contentNo
get_changesA unified diff of every file that differs from live.path: one file onlyNo
render_previewRuns 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 blocksOnly for blocks and patterns, which run PHP
list_snapshotsVersions kept from earlier publishes, newest first, with their ids.NoneNo

Starters#

ToolWhat it doesParametersPermission
list_templatesThe starters that suit the selected project, with the fields each takes. Includes custom starters, with ids like theme:section.NoneNo
create_from_templateCreates 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#

ToolWhat it doesParametersPermission
publishMakes 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 changedYes
rollbackPuts a snapshot back live. The current live version is kept as a new snapshot.id: from list_snapshotsYes
activate_themeMakes an installed theme the live theme. Unpublished changes aren't included.slug: defaults to the selected themeYes
activate_pluginTurns an installed plugin on. A fatal error is reported instead of taking the site down.slug: defaults to the selected pluginYes
deactivate_pluginTurns an installed plugin off. Its data stays.slug: defaults to the selected pluginYes

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.

ToolWhat it doesParametersPermission
git_statusCompares the working copy with the repository: the branch head, the last commit synced, whether it's behind, and which files differ.whichNo
git_pullBrings branch changes into the working copy. Files you changed are kept and reported as conflicts, unless strategy is theirs.which; strategy: safe (default) or theirsNo
list_reposRepositories (GitHub) or projects (GitLab) the site's connection can see, with their default branch and whether it can push.query: name filter; hostNo
set_repositoryPoints 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_repoCreates 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); descriptionYes
git_commitCommits the working copy to the branch of the project's own repository.messageYes

Builds#

ToolWhat it doesParametersPermission
get_build_statusWhether the project has a build step (Tailwind, Sass, JavaScript) and whether its output is current. Builds run in the browser when someone opens Temper.NoneNo
install_php_dependenciesInstalls the packages in composer.lock into vendor/ and writes an autoloader, without Composer.NoneYes

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.