Skip to main content
Glama

wp_get_auth_status

Check if your WordPress site is properly authenticated to manage content, users, and settings through the MCP WordPress Server.

Instructions

Gets the current authentication status for a configured 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

  • Executes the wp_get_auth_status tool: checks if the WordPress client is authenticated, fetches current user if yes, formats a status message with site URL, method, auth status, and user info.
    public async handleGetAuthStatus(
      client: WordPressClient,
      params: Record<string, unknown>,
    ): Promise<Record<string, unknown>> {
      try {
        const isAuthenticated = client.isAuthenticated;
        const config = client.config;
        let content =
          `**Authentication Status for ${config.baseUrl}**\n\n` +
          `**Authenticated:** ${isAuthenticated ? "✅ Yes" : "❌ No"}\n` +
          `**Method:** ${config.auth.method}\n`;
    
        if (isAuthenticated) {
          const user = await client.getCurrentUser();
          content += `**User:** ${user.name} (@${user.slug})\n`;
        } else {
          content += "**Status:** Not connected. Use 'wp_test_auth' to connect and verify credentials.";
        }
    
        return { content };
      } catch (_error) {
        throw new Error(`Failed to get auth status: ${getErrorMessage(_error)}`);
      }
    }
  • Registers the wp_get_auth_status tool within AuthTools.getTools(), defining its name, description, empty parameters schema, and binding to the handleGetAuthStatus handler.
    {
      name: "wp_get_auth_status",
      description: "Gets the current authentication status for a configured WordPress site.",
      parameters: [],
      handler: this.handleGetAuthStatus.bind(this),
    },
Behavior2/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. While it indicates this is a read operation ('Gets'), it doesn't specify what information the authentication status includes, whether it requires specific permissions, what happens when authentication fails, or what the response format looks like. For a tool that checks system state with zero annotation coverage, this leaves significant behavioral questions unanswered.

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 immediately communicates the tool's purpose without unnecessary words. It's appropriately sized for a simple status-checking 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 status-checking tool with one well-documented parameter and no output schema, the description is minimally adequate. However, without annotations or output schema, it should ideally provide more context about what 'authentication status' includes and what the response looks like. The description meets basic requirements but leaves room for improvement given the lack of structured behavioral information.

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 description coverage is 100%, with the single parameter 'site' already well-documented in the schema. The description doesn't add any additional parameter information beyond what's in the schema. With high schema coverage and only one parameter, the baseline score of 3 is appropriate - the schema does the heavy lifting for parameter documentation.

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 ('Gets') and the resource ('current authentication status for a configured WordPress site'), making the purpose immediately understandable. However, it doesn't explicitly differentiate this from sibling tools like 'wp_test_auth' or 'wp_switch_auth_method', which also relate to authentication functionality.

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 context ('for a configured WordPress site'), but doesn't provide explicit guidance on when to use this tool versus alternatives like 'wp_test_auth' or 'wp_switch_auth_method'. There's no mention of prerequisites, typical use cases, or when this tool would be preferred over other authentication-related tools.

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