Skip to main content
Glama

Install a theme

wp_install_theme
Destructive

Installs a WordPress.org theme by slug without activating it, returning the installed slug and reported version. Use when you need the theme files present but want activation handled separately.

Instructions

Download and install a theme from the WordPress.org directory by its slug; the theme is not activated. Returns installed, stylesheet (the slug) and the version WordPress.org reported. Needs install_themes; refused when DISALLOW_FILE_MODS is set. No undo point is recorded. A theme whose folder exists already is not replaced; the answer is WordPress's error. Themes from a ZIP are installed with wp_install_theme_zip, and switching to a theme is wp_activate_theme.

Input Schema

NameRequiredDescriptionDefault
slugYesTheme slug from its wordpress.org address, e.g. "twentytwentyfive". Lower-cased; characters other than a-z, 0-9, "-" and "_" are dropped.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv4.10.0

TDQS

A4.7/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The annotations already flag this as destructive, non-idempotent, non-read-only, and open-world, and the description adds meaningful context beyond them: no undo point is recorded, existing folders are not replaced, the result is an error, and specific WordPress capabilities can block the call. It also describes return fields, which helps the agent understand the outcome.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is dense but front-loaded: it leads with the action and non-activation behavior, then covers return data, permissions, failure conditions, and alternatives. Every sentence provides actionable information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Although there is no output schema, the description lists the key return fields and explains constraints, failure behavior, and alternative tools. For a one-parameter mutation tool, this provides everything needed to call it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema already documents the slug format and normalization rules at 100% coverage. The description reinforces that the slug comes from WordPress.org and mentions the returned stylesheet, but it does not add substantial parameter semantics beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource: download and install a theme from the WordPress.org directory by slug. It immediately clarifies that activation does not happen, and it distinguishes this from ZIP installation and theme activation by naming the relevant sibling tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It explicitly names alternatives: use wp_install_theme_zip for ZIP themes and wp_activate_theme to switch themes. It also states prerequisites and refusal conditions, including install_themes and DISALLOW_FILE_MODS.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools