Skip to main content
Glama

wp_get_application_passwords

Retrieve application passwords for a WordPress user to manage API access and security permissions. Lists all assigned passwords for user authentication.

Instructions

Lists application passwords for a specific user.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
siteNoThe ID of the WordPress site to target (from mcp-wordpress.config.json). Required if multiple sites are configured.
user_idYesThe ID of the user to get application passwords for.

Implementation Reference

  • Registration of the wp_get_application_passwords tool including schema (parameters) in SiteTools.getTools()
    {
      name: "wp_get_application_passwords",
      description: "Lists application passwords for a specific user.",
      parameters: [
        {
          name: "user_id",
          type: "number",
          required: true,
          description: "The ID of the user to get application passwords for.",
        },
      ],
      handler: this.handleGetApplicationPasswords.bind(this),
    },
  • Handler function that executes the tool: extracts user_id, calls client.getApplicationPasswords, formats and returns the list of application passwords.
    public async handleGetApplicationPasswords(
      client: WordPressClient,
      params: Record<string, unknown>,
    ): Promise<unknown> {
      try {
        const { user_id } = params as { user_id: number };
        const passwords = await client.getApplicationPasswords(user_id);
        if (passwords.length === 0) {
          return `No application passwords found for user ID ${user_id}.`;
        }
        const content =
          `Found ${passwords.length} application passwords for user ID ${user_id}:\n\n` +
          passwords
            .map(
              (p: WordPressApplicationPassword) =>
                `- **${p.name}** (UUID: ${p.uuid})\n  Created: ${new Date(p.created).toLocaleDateString()}`,
            )
            .join("\n");
        return content;
      } catch (_error) {
        throw new Error(`Failed to get application passwords: ${getErrorMessage(_error)}`);
      }
    }
  • Supporting method in SiteOperations that makes the actual REST API GET request to retrieve application passwords for the user.
    async getApplicationPasswords(userId: number | "me" = "me"): Promise<WordPressApplicationPassword[]> {
      return this.client.get<WordPressApplicationPassword[]>(`users/${userId}/application-passwords`);
    }
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 it's a list operation, implying read-only behavior, but doesn't specify permissions required (e.g., admin access), rate limits, pagination, error conditions, or output format. For a tool accessing sensitive data like passwords, this lack of detail is a significant gap in transparency.

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 with zero wasted words. It's front-loaded with the core action ('Lists application passwords') and specifies the target ('for a specific user'). No extraneous information or redundancy is present, making it highly efficient.

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 the tool's complexity (accessing sensitive user data), lack of annotations, and no output schema, the description is insufficiently complete. It doesn't cover behavioral aspects like authentication needs, data sensitivity, error handling, or return format. For a tool with no structured safety or output guidance, the description should provide more context to ensure safe and effective use.

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%, with both parameters (site and user_id) well-documented in the schema. The description adds no additional parameter semantics beyond what's in the schema (e.g., no examples, format details, or constraints). According to guidelines, with high schema coverage, the baseline is 3 even without param info in the description.

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 with a specific verb ('Lists') and resource ('application passwords for a specific user'). It distinguishes from sibling tools like wp_create_application_password and wp_delete_application_password by focusing on retrieval rather than creation or deletion. However, it doesn't explicitly differentiate from other list tools like wp_list_users or wp_list_posts, which slightly limits sibling 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 prerequisites (e.g., user must exist), exclusions (e.g., cannot list passwords for non-existent users), or comparisons to other tools (e.g., wp_get_user for general user info vs. this for passwords). This leaves the agent without contextual usage cues.

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