Docsbook
← Back to catalog
automationpro_plusrequires Docsbook MCP

docs-translate-webhook

Bypass Docsbook's built-in AI translator and delegate translation work to a custom external service over webhooks. Switches the workspace to external translation mode, registers a translation.requested webhook, and scaffolds a handler function the user deploys with their own translation logic. Requires PRO+ plan.

Install & use this skill

Pick your AI client — install this single skill and call it.

1. Install
npx skills add Docsbook-io/docs-skills --skill docs-translate-webhook -a claude-code
2. Use
/docs-translate-webhook

Invoke as a slash command in chat.

Or: runtime discovery via Docsbook MCP

Already connected to the Docsbook MCP server? Skip install — ask your agent to load this skill on demand.

@docsbook find_skill "docs-translate-webhook"

docs-translate-webhook — Wire an external translation pipeline via webhook

Workflow#

  1. Verify MCP transport — call list_workspaces as a connectivity probe. If it fails, print the MCP connection command and exit gracefully.
  2. Validate plan and inputs — read the workspace plan via get_workspace. If the plan is below PRO+, stop and print an upgrade prompt. Validate that the webhook URL is https:// (reject http:// and non-URLs). Confirm the runtime flavor (vercel or express; default vercel).
  3. Switch translation mode — call set_translation_mode with mode: external. This stops Docsbook's built-in translator and causes it to emit translation.requested events instead.
  4. Register the webhook — generate a fresh HMAC secret and call register_webhook_translation_requested with the provided URL. Capture the callback_url from the response for use in the handler. Surface the HMAC secret to the user once.
  5. Scaffold the handler — produce a handler file for the selected runtime that verifies the HMAC signature, invokes the user's translation logic (as a TODO placeholder), and POSTs results back to the callback URL.
  6. Write the handler file — place it at the configured output path (default api/docsbook-translate.ts for Vercel, src/routes/docsbook-translate.ts for Express). Create parent directories if needed. Overwrite if the file already exists.
  7. Report — print the webhook URL, HMAC secret, handler path, and the next steps the user must complete before the pipeline goes live.

Guardrails#

MCP Tools#

Tool Purpose
list_workspaces Probe MCP transport liveness
get_workspace Read workspace plan and settings
set_translation_mode Switch mode to external
register_webhook_translation_requested Register the outbound webhook and obtain callback URL

Acceptance Criteria#

View source on GitHub →Browse full catalog repo →
Keywords
translatewebhookexternalcustompipelinetmsi18n
MCP tools used
list_workspacesget_workspaceset_translation_moderegister_webhook_translation_requested