Skip to main content
Glama

wp_init_config

Detect your WordPress environment and write a wp-cli configuration file. First call probes Docker, Pantheon, or SSH; second call writes config with user-supplied missing values.

Instructions

Create the server's configuration file (/.serena/wp-cli.conf) for a WordPress project. Call it FIRST when no config exists yet. Two phases: (1) DETECT — call with no arguments (write=false); it probes the environment (running Docker containers, the WordPress path inside them, and any authenticated Pantheon Terminus site) and returns what it found plus a missing list of values it could NOT determine. Ask the user for those, then (2) WRITE — call again with write=true and a complete site object to save the config. It refuses to overwrite an existing config unless overwrite=true.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
siteNoRequired when write=true. Fields: name (section id), LOCAL_CONTAINER (docker container with WP-CLI), LOCAL_PATH (WordPress path inside it). Optional: LOCAL_WORKDIR, LOCAL_URL, and for production EITHER TERMINUS_SITE(+TERMINUS_ENV) OR REMOTE_SSH (not both; omit both for local-only).
writeNofalse (default) = detect and report; true = write the config from `site`.
overwriteNoAllow replacing an existing wp-cli.conf. Default false.
prod_guardNoBlock destructive/production writes without confirm=true. Default true.
default_siteNoDEFAULT_SITE value; defaults to the site name.
Behavior4/5

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

With no annotations, the description fully discloses the behavioral traits: the detection vs. write phases, refusal to overwrite without flag, and environmental probing. It does not contradict any annotations.

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

Conciseness4/5

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

The description is well-structured and front-loaded with key info. It is comprehensive but not overly verbose, though it could be slightly more concise in detailing the phases.

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?

Given the complexity (5 parameters, nested objects, no output schema or annotations), the description provides complete guidance on the two-phase workflow, parameter dependencies, and safety guards.

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

Parameters4/5

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

Schema coverage is 100%, so baseline is 3. The description adds significant context beyond the schema, especially for the nested 'site' object (field constraints and conditions like local-only vs. production).

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 uses specific verbs ('Create', 'Call it FIRST') and clearly identifies the resource (configuration file for a WordPress project). It distinguishes itself from sibling tools like 'wp_cli' or 'wp_create_post' by focusing on initialization.

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

Usage Guidelines4/5

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

The description explicitly states when to use the tool ('Call it FIRST when no config exists') and describes the two-phase process. While it doesn't explicitly list alternatives, the context is clear.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/EarthmanWeb/mcp-wp-cli-terminus'

If you have feedback or need assistance with the MCP directory API, please join our Discord server