smartchat

save_learned_answer

Adds a question and the answer the AI should give. With role 'rule' (default) it changes the AI replies; with 'note' it is only stored, and the same pair twice only confirms the first one. Returns the answer.

Tool namesave_learned_answer
Permissionai:settings
readOnlyHintfalse
destructiveHintfalse
idempotentHinttrue
openWorldHintfalse
REST callPOST /v1/learned-answers, PATCH /v1/learned-answers/{answer_id}

#What it does

  • Changes data in your account. It does not send messages to contacts.
  • Safe to repeat with the same idempotency_key.

#Input

The tool takes one flat object. Path, query and body fields of the REST call are merged into it.

Create learned answer (POST /v1/learned-answers)

NameTypeRequiredDescription
questionstringyesThe question or a typical wording of it. length 1 to 2000
answerstringyesThe answer the AI should give. length 1 to 4000
rolestringno'rule' changes the AI replies. 'note' is only stored. one of: rule, note; default "rule"

Update learned answer (PATCH /v1/learned-answers/{answer_id})

NameTypeRequiredDescription
answer_idstringyesLearned answer ID.
questionstringnoNew question pattern. length 1 to 2000
answerstringnoNew answer. This also confirms the answer. length 1 to 4000
rolestringno'rule' makes the answer change AI replies; 'note' only stores it. one of: rule, note
disabledbooleannoTrue switches the answer off; false switches it on again.
confirmbooleannoTrue confirms the content as still correct (resets its age).

Arguments added by the MCP server (see Special arguments)

NameTypeRequiredDescription
idempotency_keystringnoOptional. Unique key, for example a UUID. Same key and arguments within 24 hours: first result. Without a key only an identical call within 1 minute counts as a repeat. up to 255 characters

#Result

The result has the same content as the REST answer. Lists have at most 50 items per page (default 20); use cursor for the next page.

Errors come back as a tool result with isError: true. The error codes are the ones in Errors.