Skip to main content
Glama

wp_preview_link

Read-only

Get a short-lived tokenized PREVIEW URL for a page — WORKS FOR DRAFTS. Use it to see or screenshot unpublished work before publishing: mint the link, then pass preview_url to render_screenshot. Renders through a real WordPress head/footer, so theme CSS, the Elementor kit, per-post Elementor CSS, and custom-code snippets all load — same as the published page, just noindexed (needs Connector >= 0.9.9 for that; an older connector still renders the page but with NO CSS at all — if a preview screenshot looks totally unstyled, that's why, ask the user to update the plugin). Link expires (default 10 min). Requires Connector >= 0.7.6 minimum (on 'connector_update_required', ask the user to update the plugin).

Input Schema

NameRequiredDescriptionDefault
ttlNoLink lifetime in seconds (60-3600, default 600; with share=true 60-604800, default 259200 = 3 days)
shareNotrue = ALSO return share_url, a client-safe link on the site's own domain (<site>/preview/<token>/ — no wp-json, no vendor name, no query string) that lives up to 7 days. Use this whenever a human other than the user will open the link. Connector >= 0.9.17.
post_idYesPage/post ID to preview (drafts allowed)
site_idYesThe WordPress site ID

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only cover the read-only/idempotency profile; the description adds substantial behavior: expiry defaults, noindex emission, real head/footer rendering, CSS/Elementor kit loading, and graded connector-version requirements with failure symptoms and remediation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loads the purpose and the render_screenshot handoff, then layers caveats. Dense with parenthetical version details, but each clause (expiry, noindex, CSS failure mode) carries actionable information.

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

Completeness5/5

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

With no output schema, the description still tells the agent what it gets back (preview_url, and share_url when share=true), how long it lasts, and what the rendered result will look like — nothing essential is missing for correct invocation.

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 coverage is 100%, so both ttl and share are already documented in the schema. The description's 'default 10 min' and share-for-humans framing mostly restate what the schema says, so the baseline 3 applies.

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?

States a specific verb and resource ('Get a short-lived tokenized PREVIEW URL for a page') and immediately adds the scope differentiator 'WORKS FOR DRAFTS', which distinguishes it from published-page reads like wp_get_page.

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

Usage Guidelines5/5

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

Explicitly states when to use it ('to see or screenshot unpublished work before publishing') and routes to the sibling: 'mint the link, then pass preview_url to render_screenshot'. It even gives a when-not/mitigation path for old connectors.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources