Skip to main content
Glama

wp_get_site_settings

Retrieve general WordPress site settings to configure and manage your website's core parameters and operational preferences.

Instructions

Retrieves the 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.

Implementation Reference

  • The core handler function for the wp_get_site_settings tool. It retrieves general WordPress site settings using the WordPressClient, computes additional information like current timezone-aware time and start of week day, and formats everything into a comprehensive Markdown report with sections for basic info, localization, date/time formats, content settings, and discussion settings.
    public async handleGetSiteSettings(client: WordPressClient, _params: Record<string, unknown>): Promise<unknown> {
      try {
        const settings = await client.getSiteSettings();
        const siteUrl = client.getSiteUrl();
    
        // Enhanced site settings with comprehensive details
        const weekDays = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"];
        const startOfWeek = settings.start_of_week !== undefined ? weekDays[settings.start_of_week] : "Not set";
    
        // Get additional site information
        const currentTime = new Date().toLocaleString("en-US", {
          timeZone: settings.timezone || "UTC",
          weekday: "long",
          year: "numeric",
          month: "long",
          day: "numeric",
          hour: "2-digit",
          minute: "2-digit",
          second: "2-digit",
          timeZoneName: "short",
        });
    
        let content = `**🌐 Site Settings for ${siteUrl}**\n\n`;
    
        content += `**📋 Basic Information:**\n`;
        content += `- **Title:** ${settings.title || "Not set"}\n`;
        content += `- **Description:** ${settings.description || "Not set"}\n`;
        content += `- **URL:** ${settings.url || siteUrl}\n`;
        content += `- **Admin Email:** ${settings.email || "Not set"}\n\n`;
    
        content += `**🌍 Localization:**\n`;
        content += `- **Language:** ${settings.language || "English (US)"}\n`;
        content += `- **Timezone:** ${settings.timezone || "UTC"}\n`;
        content += `- **Current Time:** ${currentTime}\n\n`;
    
        content += `**📅 Date & Time Format:**\n`;
        content += `- **Date Format:** ${settings.date_format || "Not set"}\n`;
        content += `- **Time Format:** ${settings.time_format || "Not set"}\n`;
        content += `- **Start of Week:** ${startOfWeek}\n\n`;
    
        content += `**📝 Content Settings:**\n`;
        content += `- **Posts per Page:** ${settings.posts_per_page || "Not set"}\n`;
        content += `- **Default Category:** ${settings.default_category || "Not set"}\n`;
        content += `- **Default Post Format:** ${settings.default_post_format || "Standard"}\n\n`;
    
        content += `**💬 Discussion Settings:**\n`;
        content += `- **Default Comment Status:** ${settings.default_comment_status || "Not set"}\n`;
        content += `- **Default Ping Status:** ${settings.default_ping_status || "Not set"}\n`;
        content += `- **Use Smilies:** ${settings.use_smilies ? "Yes" : "No"}\n\n`;
    
        content += `**📊 Retrieved:** ${new Date().toLocaleString()}`;
    
        return content;
      } catch (_error) {
        throw new Error(`Failed to get site settings: ${getErrorMessage(_error)}`);
      }
    }
  • Registration of the wp_get_site_settings tool within the SiteTools.getTools() method, including name, description, empty parameters schema (no inputs required), and binding to the handler method.
    {
      name: "wp_get_site_settings",
      description: "Retrieves the general settings for a WordPress site.",
      parameters: [],
      handler: this.handleGetSiteSettings.bind(this),
    },
  • Schema definition for the tool: no input parameters required.
    parameters: [],
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states this is a retrieval operation but doesn't mention authentication requirements, rate limits, error conditions, or what format the settings are returned in. For a read operation with zero annotation coverage, this leaves significant behavioral gaps.

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, efficient sentence that gets straight to the point with no wasted words. It's appropriately sized for a simple retrieval tool and front-loads the essential information.

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

Completeness3/5

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

For a simple read operation with one optional parameter and no output schema, the description is minimally adequate. However, with no annotations and no output schema, it should ideally provide more context about what 'general settings' includes and the return format. The description meets basic requirements but leaves the agent guessing about the output structure.

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 description adds no parameter information beyond what's already in the schema (which has 100% coverage). The schema fully documents the single optional 'site' parameter with its purpose and requirement condition. The description doesn't provide additional context about parameter usage or semantics.

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 verb ('Retrieves') and resource ('general settings for a WordPress site'), making the purpose immediately understandable. It doesn't explicitly differentiate from sibling tools like wp_update_site_settings, but the verb 'retrieves' vs 'updates' provides implicit distinction.

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. There's no mention of when this tool is appropriate versus other settings-related tools or what prerequisites might be needed. The agent must infer usage from the tool name alone.

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