概览

Set chat hooks

MCPset_chat_hooks
WRITE$0.00001 / call
Features

Set pre-, post-, and streaming webhook URLs for the AI chatbot. Pass empty string to clear an individual hook.

Input4
Authorizationheaderrequired
Your API key, for the REST call. Sent from your browser straight to the API — never to Docsbook, never stored.
workspace_idstringrequired
Numeric workspace id — OR the project as the user names it: 'owner/repo', the repo name alone, the site's display name, its docs URL or custom domain. Text is resolved server-side; an ambiguous name returns the candidates instead of guessing, so pass what the user said rather than calling list_workspaces first.
pre_urlstring
Pre-LLM hook URL — receives {question, session_id, workspace_id}, may return {block, reason} or {inject_context}
post_urlstring
Post-LLM hook URL — fire-and-forget POST with {question, answer, tool_calls, latency_ms}
streaming_urlstring
Streaming events webhook URL — fire-and-forget SSE-style events
Output5
statusstring
workspace_idnumber
ai_chat_pre_hook_urlstring
null
ai_chat_post_hook_urlstring
null
ai_chat_streaming_webhook_urlstring
null
Limitations
  • REQUIRES the PRO plan or above.
Example input
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "set_chat_hooks",
    "arguments": {
      "workspace_id": "<workspace_id>"
    }
  }
}
Example output
{
  "status": "<status>",
  "workspace_id": 0,
  "ai_chat_pre_hook_url": "<ai_chat_pre_hook_url>",
  "ai_chat_post_hook_url": "<ai_chat_post_hook_url>",
  "ai_chat_streaming_webhook_url": "<ai_chat_streaming_webhook_url>"
}

更新于

此页面对您有帮助吗?