What it does
get_answer reads the result of a question you started with ask_lexomat. By default ask_lexomat does not wait — it files the question and hands back a handle — so this is the tool that turns that handle into an answer.
Call it with the session_id and message_id ask_lexomat returned. While status is working, wait poll_after_s seconds and call again. When status turns completed, the reply carries the grounded Slovak answer and its citations, framed exactly as a waited ask_lexomat call would have returned them. failed and cancelled are final — there is nothing further to poll for.
Like every tool in this connector, it is read-only, covers Slovak law only, and its output is informational, not legal advice.
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
session_id | string | Yes | The session ask_lexomat returned. |
message_id | integer | Yes | The message_id ask_lexomat returned (the same value the web API calls chat_id). |
The four states
status | Meaning | Poll again? |
|---|---|---|
working | The research pipeline is still running. progress (0–100) and progress_message say roughly where it is. | Yes, after poll_after_s seconds. |
completed | Finished. answer and citations are populated. | No. |
failed | The turn did not produce an answer. error carries a user-safe reason. | No. |
cancelled | The turn was stopped — see Cancel answer. | No. |
poll_after_s is null on every terminal state, so a client that polls "while poll_after_s is set" stops on its own.
Returns
While working:
{
"session_id": "…",
"message_id": 4242,
"status": "working",
"progress": 45,
"progress_message": "…",
"poll_after_s": 10,
"jurisdiction": "SK",
"disclaimer": "...",
"citations": []
}
Once completed:
{
"session_id": "…",
"message_id": 4242,
"status": "completed",
"jurisdiction": "SK",
"disclaimer": "...",
"answer": "...",
"citations": [
{
"url": "...",
"title": "...",
"source_type": "..."
}
]
}
answer and citations are populated only on completed; error only on failed.
Example
ask_lexomat returns {"session_id": "…", "message_id": 4242, "poll_after_s": 10}. The calling AI waits ten seconds and calls get_answer("…", 4242), gets working at 30 %, waits again, and on the third call reads completed — at which point it presents the answer and the Zdroje: block as given.
Notes
- Consumes no quota. The research was gated and debited when
ask_lexomatstarted it; reading its outcome is not a second question, so polling every ten seconds costs you nothing — see Usage limits. - You can only read your own turns. An unknown handle and someone else's handle are refused with the same generic message, so ids cannot be probed.
- A completed answer read here is indistinguishable from one returned by
ask_lexomatwithwait: true— same jurisdiction prefix, same citation block. - If the research finished without grounded support,
answercarries the Slovak "no supported answer found" message rather than a guess.