manus_website_publish
Deploy a website checkpoint to production asynchronously. Use with status polling to confirm publish completion or failure.
Instructions
Deploy the latest checkpoint of a website. Async — poll manus_website_status until publish_status becomes 'published' or 'failed', or use manus_website_publish_and_wait for an all-in-one call.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| task_id | No | ||
| website_id | No | ||
| visibility | No |
Implementation Reference
- manus_mcp/tools/website.py:56-73 (handler)Handler function for the 'manus_website_publish' tool. It takes a WebsitePublishRequest (containing optional task_id, website_id, and visibility), calls POST /v2/website.publish via ctx.client.call, and returns a WebsitePublishResponse. This is an async operation — the tool description advises polling with manus_website_status or using the composite manus_website_publish_and_wait.
@manus_tool( name="manus_website_publish", description=( "Deploy the latest checkpoint of a website. Async — poll manus_website_status until " "publish_status becomes 'published' or 'failed', or use manus_website_publish_and_wait " "for an all-in-one call." ), input_schema=WebsitePublishRequest, output_schema=WebsitePublishResponse, ) async def website_publish(req: WebsitePublishRequest, ctx: ToolCtx) -> WebsitePublishResponse: return await ctx.client.call( "POST", "/v2/website.publish", json_body=req, response_model=WebsitePublishResponse, rate_limit_key="website.publish", ) - manus_mcp/schemas/website.py:60-67 (schema)Input and output schemas for the 'manus_website_publish' tool. WebsitePublishRequest inherits from _WebsiteTarget (exactly one of task_id or website_id required) and adds an optional visibility field. WebsitePublishResponse extends ResponseEnvelope with website_id and version_id.
class WebsitePublishRequest(_WebsiteTarget): visibility: WebsiteVisibility | None = None class WebsitePublishResponse(ResponseEnvelope): website_id: str version_id: str - manus_mcp/schemas/website.py:16-26 (schema)Base helper model enforcing that exactly one of task_id or website_id is provided. Used by WebsitePublishRequest and other website schemas.
class _WebsiteTarget(ManusModel): """Helper: exactly one of task_id / website_id must be provided.""" task_id: str | None = None website_id: str | None = None @model_validator(mode="after") def _one_of(self) -> _WebsiteTarget: if (self.task_id is None) == (self.website_id is None): raise ValueError("Exactly one of task_id or website_id must be provided") return self - manus_mcp/tools/website.py:56-69 (registration)The @manus_tool decorator registers 'manus_website_publish' in the global registry (_REGISTRY dict in registry.py). The decorator creates a ToolDef with name, description, input_schema, output_schema, and the handler function.
@manus_tool( name="manus_website_publish", description=( "Deploy the latest checkpoint of a website. Async — poll manus_website_status until " "publish_status becomes 'published' or 'failed', or use manus_website_publish_and_wait " "for an all-in-one call." ), input_schema=WebsitePublishRequest, output_schema=WebsitePublishResponse, ) async def website_publish(req: WebsitePublishRequest, ctx: ToolCtx) -> WebsitePublishResponse: return await ctx.client.call( "POST", "/v2/website.publish", - manus_mcp/tools/registry.py:42-80 (helper)The decorator function that registers tools. When @manus_tool(name='manus_website_publish', ...) is applied to website_publish, this function creates a ToolDef entry in _REGISTRY with the tool's metadata and handler.
def manus_tool( *, name: str, description: str, input_schema: type[TIn], output_schema: type[TOut], rate_limit_key: str | None = None, ) -> Callable[ [Callable[[TIn, ToolCtx], Awaitable[TOut]]], Callable[[TIn, ToolCtx], Awaitable[TOut]] ]: """Decorator registering `handler` as a tool with the given metadata.""" def wrap( handler: Callable[[TIn, ToolCtx], Awaitable[TOut]], ) -> Callable[[TIn, ToolCtx], Awaitable[TOut]]: if name in _REGISTRY: raise RuntimeError(f"Duplicate tool name: {name}") _REGISTRY[name] = ToolDef( name=name, description=description, input_schema=input_schema, output_schema=output_schema, handler=handler, rate_limit_key=rate_limit_key, ) return handler return wrap def all_tools() -> list[ToolDef[Any, Any]]: """Return a stable-ordered copy of every registered tool.""" return sorted(_REGISTRY.values(), key=lambda t: t.name) def clear_registry() -> None: """Test helper.""" _REGISTRY.clear()