Skip to main content
Glama

wordpress_publish

Publish a page to WordPress asynchronously. Preserves original URL with Web Resurrect plugin and automatically pushes URL mappings.

Instructions

Publish a page to WordPress. Async operation, returns a job_id. Free (no credit cost). When using the Web Resurrect plugin, the original URL is preserved (e.g. /chaussures/basket-rouge.html serves the post directly at that URL, no redirect). URL mappings are pushed automatically.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
page_idYesPage UUID to publish
wordpress_domainYesTarget WordPress domain
category_idNoWordPress category ID
author_idNoWordPress author ID
post_typeNoWordPress post type (default: post)
statusNoPublish status (default: draft)
use_rewritten_contentNoUse rewritten content if available (default: true)
remove_linksNoRemove links from content (default: false)

Implementation Reference

  • src/tools.ts:590-611 (registration)
    MCP tool registration for 'wordpress_publish' with Zod schema and handler defined via server.tool()
    server.tool(
      "wordpress_publish",
      "Publish a page to WordPress. Async — returns a job_id. Free (no credit cost). In plugin mode the original URL is preserved (no redirect) and the URL mapping is pushed automatically.",
      {
        page_id: z.string().uuid().describe("Page UUID to publish"),
        wordpress_domain: z.string().describe("Target WordPress domain"),
        category_id: z.number().int().optional().describe("WordPress category ID (overrides mapping)"),
        author_id: z.number().int().optional().describe("WordPress author ID (overrides mapping)"),
        post_type: z.enum(["post", "page"]).optional().describe("WordPress post type (default: post)"),
        status: z.enum(["draft", "publish"]).optional().describe("Publish status (default: draft)"),
        use_rewritten_content: z
          .boolean()
          .optional()
          .describe("Use rewritten content if available (default: true)"),
        remove_links: z.boolean().optional().describe("Remove links from content (default: false)"),
      },
      { title: "Publish to WordPress", openWorldHint: true },
      withErrors(async (args) => {
        const res = await client.wordpressPublish(args);
        return json(res.data);
      })
    );
  • Zod input schema for wordpress_publish: page_id (UUID), wordpress_domain (string), optional category_id, author_id, post_type, status, use_rewritten_content, remove_links
    {
      page_id: z.string().uuid().describe("Page UUID to publish"),
      wordpress_domain: z.string().describe("Target WordPress domain"),
      category_id: z.number().int().optional().describe("WordPress category ID (overrides mapping)"),
      author_id: z.number().int().optional().describe("WordPress author ID (overrides mapping)"),
      post_type: z.enum(["post", "page"]).optional().describe("WordPress post type (default: post)"),
      status: z.enum(["draft", "publish"]).optional().describe("Publish status (default: draft)"),
      use_rewritten_content: z
        .boolean()
        .optional()
        .describe("Use rewritten content if available (default: true)"),
      remove_links: z.boolean().optional().describe("Remove links from content (default: false)"),
  • Handler function that calls client.wordpressPublish(args) and returns JSON result, wrapped with error handling
    withErrors(async (args) => {
      const res = await client.wordpressPublish(args);
      return json(res.data);
    })
  • HTTP client method wordpressPublish — sends POST request to /api/v1/wordpress/publish with all opts, returns AsyncJobResponse
    async wordpressPublish(opts: {
      page_id: string;
      wordpress_domain: string;
      category_id?: number;
      author_id?: number;
      post_type?: string;
      status?: string;
      use_rewritten_content?: boolean;
      remove_links?: boolean;
    }): Promise<ApiResponse<AsyncJobResponse>> {
      return this.request("POST", "/api/v1/wordpress/publish", opts as Record<string, unknown>);
    }
  • AsyncJobResponse interface used as the return type for wordpressPublish: job_id, status, page_id, credits_used
    export interface AsyncJobResponse {
      job_id: string;
      status: string;
      page_id?: string;
      credits_used?: number;
    }
Behavior4/5

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

No annotations were provided, so the description discloses key behaviors: async operation (returns job_id), zero credit cost, and Web Resurrect plugin specifics (URL preservation, auto-push). This is transparent but could mention potential errors or side effects.

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 concise with four sentences covering key aspects: purpose, async nature, cost, plugin behavior, and URL mapping. No unnecessary information.

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 complexity (8 params, no output schema), the description covers most essential context (async, free, plugin integration). It lacks explanation of return value structure beyond job_id, but that is typical for pattern. Prerequisites like WordPress configuration are assumed via sibling tools.

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?

All parameters are described in the input schema (100% coverage), so the description adds little semantic value beyond the schema. It does not elaborate on parameter usage or constraints.

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

Purpose5/5

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

The description clearly states 'Publish a page to WordPress', which is a specific verb-resource combination. It distinguishes from sibling tools like wordpress_publish_bulk (bulk publishing) and configuration tools.

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

Usage Guidelines4/5

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

The description notes it's async and free, providing context. However, it doesn't explicitly compare to wordpress_publish_bulk or other alternatives, leaving the agent to infer when to use this single-page publish over others.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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/web-resurrect/mcp'

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