DevelopersChanges data

update_knowledge_chapter

API reference — one of six tools an AI assistant can call on an Avrosh account.

What it does

Rewrite one existing chapter: its title, its body, or both. The body is REPLACED, never appended to - read the chapter with list_knowledge first and send the complete new text, not just the sentence you want to add. Returns what the text was before, so you can tell the human exactly what changed.

This is the exact text the model reads before deciding to call.

Parameters

business_idstringrequired

The id returned by list_businesses.

chapter_idstringrequired

From list_knowledge.

titlestringoptional

New heading. Omit to keep the current one.

bodystringoptional

The COMPLETE new body text. Omit to keep the current one.

Request

curl -X POST https://us.avrosh.com/mcp \
  -H "Authorization: Bearer $AVROSH_KEY" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"update_knowledge_chapter","arguments":{"business_id":"926135ac-487d-4367-8bad-25397d0d4b87","chapter_id":"3f9a…","body":"Mon-Sat 09:00-20:00, closed Sunday. Ramadan: 10:00-17:00."}}}'

Response

The result arrives as an MCP content block; the JSON below is what the text field parses to.

{
  "chapter": {
    "id": "3f9a…",
    "title": "Opening hours"
  },
  "previous": {
    "title": "Opening hours",
    "text": "Mon-Sat 09:00-18:00, closed Sunday."
  }
}

Authentication

Every request carries Authorization: Bearer avk_…. Create a key in the Avrosh dashboard under Docs; it is shown once, because only its hash is stored.

One key reaches every business on the account that made it, and no others. There are no scopes to configure and nothing to switch on — a connected assistant receives the whole toolset. What bounds it is whose account the key belongs to, which is enforced in the database rather than by a permission anybody sets.

curl https://us.avrosh.com/mcp \
  -H "Authorization: Bearer $AVROSH_KEY"