Для AI-агентов: markdown этой страницы — /docs/mcp-kb.mdиндекс документации — /llms.txt
MCP: kb
Обновлено
Определения инструментов. Обновляйте tools/list после изменения прав. required_scopes: ALL.
create_knowledge
Add a knowledge-base entry to a board (`kb_type`: manager or coach) with a title + content (≤4000 chars — one item; split longer material into several items) and optional tags. ASYNC: the entry is stored and QUEUED for graph indexing — it returns immediately with status `indexing` (poll get_knowledge until `indexed`). If the status becomes `awaiting_subscription`, stop polling: indexing is postponed until the business has an active AI plan and tokens — tell the owner a plan is needed; after the payment the entry is indexed by itself. Returns the created entry with its assigned `id`. Optional `prepared_step_ids`: ordered chain step ids whose ready-made messages are attached to this entry — the business's AI agent reads their text when this entry answers a customer and may send them into the chat, complete with media and buttons; the entry itself stays text. A step works in one of two modes: a standalone message (the step is active, its content is live, it has no delay) is sent as that one message; a chain entry step (`is_entry_point: true`) sends its start message and starts the whole chain. Create the step with create_chain_step first; do not park prepared messages in a switched-off service chain (`is_active: false`) — a switched-off step is never sent.
Scopes (ALL): ["kb:write"]. Risk: "write".
delete_knowledge
Soft-delete an operator-authored knowledge-base entry by board (`kb_type`) and tenant-scoped `id`. Idempotent.
Scopes (ALL): ["kb:write"]. Risk: "destructive".
get_knowledge
Read one knowledge-base entry by its board (`kb_type`) + `id`. Use this to poll the async index `status` after creating an entry: `indexing` → `indexed` (or `failed`). `awaiting_subscription` is not a failure and will not change by waiting: indexing is postponed until the business has an active AI plan and tokens — stop polling and tell the owner that a plan (or a token top-up) is needed; after the payment the entry is indexed by itself. Errors NOT_FOUND if the entry does not exist for your tenant.
Scopes (ALL): ["kb:read"]. Risk: "read".
list_knowledge
List the tenant knowledge-base entries across both boards (manager = the AI sales/support agent; coach = the AI coach). Returns each entry with its `kb_type`, `id` (the id you pass to get, together with `kb_type`), title, `is_active` / `is_public`, index `status` (pending/indexing/indexed/failed/awaiting_subscription) and indexing summary. `awaiting_subscription` = indexing is postponed until the business has an active AI plan and tokens; it starts by itself after the payment. 0-cost read.
Scopes (ALL): ["kb:read"]. Risk: "read".
update_knowledge
Update an operator-authored knowledge-base entry by board (`kb_type`) and tenant-scoped `id`. Send only fields you intend to change. `is_active: false` switches the entry off (the AI agent stops using it, it leaves the graph); `is_active: true` switches it back on and re-indexes it. `is_public: false` keeps it reachable only through its own link. A changed `content` is re-indexed; status `awaiting_subscription` after that means the re-indexing waits for an active AI plan and tokens (stop polling, tell the owner; it runs by itself after the payment). Optional `prepared_step_ids`: ordered chain step ids whose ready-made messages are attached to this entry — the business's AI agent reads their text when this entry answers a customer and may send them into the chat, complete with media and buttons; the entry itself stays text. A standalone step (active, live content, no delay) is sent as one message; a chain entry step starts the whole chain. `[]` detaches them all.
Scopes (ALL): ["kb:write"]. Risk: "write".