Skip to main content
Glama
gaupoit

WordPress MCP Server

by gaupoit

wp_get_plugins

Retrieve installed WordPress plugins with their status, version, and details to manage site functionality and troubleshoot issues.

Instructions

Get installed plugins from WordPress. Requires authentication.

Args:
    status: Filter by status - 'active', 'inactive', or 'all'. Default is 'all'.

Returns:
    List of plugins with name, plugin slug, status, version, and description.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
statusNoall

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The MCP tool handler for wp_get_plugins. Decorated with @mcp.tool() for registration. Delegates to WordPressClient.get_plugins().
    @mcp.tool()
    def wp_get_plugins(status: str = "all") -> list[dict]:
        """Get installed plugins from WordPress. Requires authentication.
    
        Args:
            status: Filter by status - 'active', 'inactive', or 'all'. Default is 'all'.
    
        Returns:
            List of plugins with name, plugin slug, status, version, and description.
        """
        client = get_client()
        return client.get_plugins(status=status)
  • Core implementation of plugin fetching in WordPressClient using WP REST API /plugins endpoint, formats response with name, plugin slug, status, version, description.
    def get_plugins(self, status: str = "all") -> list[dict]:
        """Get installed plugins (requires authentication)."""
        params = {}
        if status != "all":
            params["status"] = status
    
        plugins = self._get("plugins", params, require_auth=True)
    
        return [
            {
                "name": p["name"],
                "plugin": p["plugin"],
                "status": p["status"],
                "version": p.get("version", "unknown"),
                "description": p.get("description", {}).get("raw", "")[:100],
            }
            for p in plugins
        ]
  • The @mcp.tool() decorator registers the wp_get_plugins function as an MCP tool.
    @mcp.tool()
  • Helper function to get or initialize the shared WordPressClient instance used by all tools.
    def get_client() -> WordPressClient:
        """Get or create the WordPress client."""
        global _client
        if _client is None:
            config = load_config()
            _client = WordPressClient(config)
        return _client
  • Generic _get method used by get_plugins to query the /plugins endpoint.
    def _get(
        self, endpoint: str, params: dict | None = None, require_auth: bool = False
    ) -> Any:
        """Make a GET request to the WordPress API."""
        url = f"{self.config.api_base}/{endpoint}"
        headers = self._get_headers(require_auth)
    
        response = self._client.get(url, headers=headers, params=params)
        response.raise_for_status()
        return response.json()
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It adds valuable context: it specifies authentication requirements and describes the return format (list of plugins with specific fields). This goes beyond the input schema, covering aspects like data structure and access control, though it doesn't mention rate limits or error handling.

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 appropriately sized and front-loaded: the first sentence states the purpose, followed by authentication note, and then structured sections for Args and Returns. Every sentence adds value without redundancy, making it efficient and easy to parse.

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

Completeness4/5

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

Given the tool's low complexity (1 parameter, no nested objects) and the presence of an output schema (which handles return values), the description is largely complete. It covers purpose, authentication, parameter details, and return format. However, it could improve by mentioning potential errors or linking to sibling tools for broader context.

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

Parameters5/5

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

The description adds significant meaning beyond the input schema, which has 0% schema description coverage. It explains the 'status' parameter's purpose ('Filter by status'), valid values ('active', 'inactive', or 'all'), and default ('all'). This fully compensates for the schema's lack of documentation, providing clear semantics for the single parameter.

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 tool's purpose: 'Get installed plugins from WordPress.' It specifies the verb ('Get') and resource ('installed plugins'), and distinguishes it from sibling tools like wp_get_posts or wp_get_media by focusing on plugins. However, it doesn't explicitly contrast with all siblings, such as wp_site_info, which might also provide plugin-related data.

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

Usage Guidelines3/5

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

The description implies usage by stating 'Requires authentication,' which suggests a prerequisite context. It doesn't provide explicit guidance on when to use this tool versus alternatives like wp_site_info or other wp_get_* tools, nor does it specify exclusions or detailed scenarios. The usage is implied but not fully articulated.

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

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