Skip to main content
Glama

wp_update_site_settings

Modify WordPress site settings including title, description, and timezone through the MCP WordPress Server to customize site configuration.

Instructions

Updates one or more general settings for a WordPress site.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
siteNoThe ID of the WordPress site to target (from mcp-wordpress.config.json). Required if multiple sites are configured.
titleNoThe title of the site.
descriptionNoThe tagline or description of the site.
timezoneNoA city in the same timezone, e.g., 'America/New_York'.

Implementation Reference

  • The MCP tool handler function that receives parameters, calls WordPressClient.updateSiteSettings, and returns a formatted success message or throws an error.
    public async handleUpdateSiteSettings(client: WordPressClient, params: Record<string, unknown>): Promise<unknown> {
      try {
        const updatedSettings = await client.updateSiteSettings(params);
        return `✅ Site settings updated successfully. New title: ${updatedSettings.title}`;
      } catch (_error) {
        throw new Error(`Failed to update site settings: ${getErrorMessage(_error)}`);
      }
    }
  • Tool registration object within SiteTools.getTools() array, defining name, description, input parameters schema, and handler binding.
    {
      name: "wp_update_site_settings",
      description: "Updates one or more general settings for a WordPress site.",
      parameters: [
        {
          name: "title",
          type: "string",
          description: "The title of the site.",
        },
        {
          name: "description",
          type: "string",
          description: "The tagline or description of the site.",
        },
        {
          name: "timezone",
          type: "string",
          description: "A city in the same timezone, e.g., 'America/New_York'.",
        },
      ],
      handler: this.handleUpdateSiteSettings.bind(this),
    },
  • Dynamic registration of all tool classes (including SiteTools) by instantiating them, calling getTools(), and registering each tool with the MCP server.
    Object.values(Tools).forEach((ToolClass) => {
      let toolInstance: { getTools(): unknown[] };
    
      // Cache and Performance tools need the clients map
      if (ToolClass.name === "CacheTools" || ToolClass.name === "PerformanceTools") {
        toolInstance = new ToolClass(this.wordpressClients);
      } else {
        toolInstance = new (ToolClass as new () => { getTools(): unknown[] })();
      }
    
      const tools = toolInstance.getTools();
    
      tools.forEach((tool: unknown) => {
        this.registerTool(tool as ToolDefinition);
      });
    });
  • TypeScript interface defining the structured input parameters for the wp_update_site_settings tool.
    export interface UpdateSiteSettingsParams extends BaseToolParams {
      readonly title?: string;
      readonly description?: string;
      readonly url?: string;
      readonly email?: string;
      readonly timezone?: string;
      readonly date_format?: string;
      readonly time_format?: string;
      readonly start_of_week?: number;
      readonly language?: string;
      readonly use_smilies?: boolean;
      readonly default_category?: CategoryId;
      readonly default_post_format?: string;
      readonly posts_per_page?: number;
      readonly default_ping_status?: PingStatus;
      readonly default_comment_status?: CommentStatus;
    }
  • Core helper function in SiteOperations that performs the actual POST request to the WordPress REST API /settings endpoint to update site settings.
    async updateSiteSettings(settings: Partial<WordPressSiteSettings>): Promise<WordPressSiteSettings> {
      return this.client.post<WordPressSiteSettings>("settings", settings);
    }
Behavior2/5

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

No annotations are provided, so the description carries full burden for behavioral disclosure. It states 'Updates' which implies a write/mutation operation, but doesn't cover critical aspects like required permissions, whether changes are reversible, error handling, or side effects. For a mutation tool with zero annotation coverage, this leaves significant gaps in understanding how the tool behaves.

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 a single, clear sentence that directly states the tool's purpose without any fluff or redundancy. It's front-loaded with the core action and target, making it highly efficient. Every word earns its place, achieving optimal conciseness for this context.

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

Completeness2/5

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

Given that this is a mutation tool with no annotations and no output schema, the description is incomplete. It doesn't address behavioral traits like permissions or side effects, usage guidelines relative to siblings, or what the tool returns. For a tool that modifies site settings, more context is needed to ensure safe and effective use by an agent.

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?

Schema description coverage is 100%, so the schema fully documents all four parameters (site, title, description, timezone). The description adds no additional parameter semantics beyond what's in the schema—it doesn't explain relationships between parameters, default behaviors, or constraints. This meets the baseline of 3 since the schema does the heavy lifting, but the description doesn't enhance parameter understanding.

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

Purpose4/5

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

The description clearly states the action ('Updates') and the target ('general settings for a WordPress site'), making the purpose immediately understandable. It distinguishes itself from siblings like wp_update_category or wp_update_user by specifying 'general settings' rather than specific content types. However, it doesn't explicitly contrast with wp_get_site_settings (the read counterpart), which slightly limits differentiation.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention wp_get_site_settings for reading settings, prerequisites like authentication, or constraints such as which settings can be updated. Without this context, an agent must infer usage from the tool name alone, which is insufficient for optimal selection.

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/docdyhr/mcp-wordpress'

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