answer, a pending_question for the user, or running. The agent
builds, changes or explains a report, and applies its changes as it makes
them, as in the web app.
Use it when the user wants a report built or changed from a description in
their own words (“show the attainment per rep by quarter”), or wants a report
explained. Use it also for what
create_report cannot do, such as
adding metrics, filters, a pivot table or a chart.
Start and continue a conversation
Start with aninstruction on a report_id from
list_reports or
create_report. Omit report_id to have the agent create the report itself.
sandbox_id only picks where a report the agent creates lands: a report_id
or a conversation_id names its own environment.
Every later call of the same work passes back the conversation_id, a retry
included. Without it, Qobra starts a new conversation and the agent loses what
was said. One turn runs at a time per conversation: while one is running,
Qobra refuses the call until
get_report_agent_turn has
waited for it.
Read the result
status says where the turn stands:
answered: the turn is over. Relayanswerto the user.awaiting_user: the agent askspending_question. The client shows it to the user, then sends their reply as the nextinstructionwith the sameconversation_id.running: the turn is still going. Each call waits about 45 seconds, and a turn can take several minutes. Callget_report_agent_turnwith theconversation_idto keep waiting.
report is the report the conversation works on, as list_reports lists it,
with the link to open it. A turn that ends on an error is raised as a tool
error that names the conversation, so the client can send the instruction
again in it.
What the agent may do
What the agent may do follows the user’s rights on the report, as in the web app:- With write access on every report: create a report, and change its metrics, columns, filters, pivot table, chart, sharing and dashboards.
- With write access on this report only: its columns, sorts, pivot table and chart.
- Otherwise, it only explains the report.
Availability
The tool is open to every company with the MCP enabled. Qobra hides it at discovery unless:- The company has reporting, AI is switched on and the Analyst is switched on in the AI settings.
- The caller can read a report, as in the web app.
- The connection was granted the
mcp:writescope. See Scopes.
ask_report_agent and
ask_compensation_agent.
Past that, the call starts nothing and says how many seconds to wait before
calling again in the same conversation.
When the company’s AI budget is spent, or Qobra’s AI agents are at capacity,
the call is refused and starts nothing. The error says which, so the client can
tell the user to wait for Qobra to restore access or to try again shortly.
Parameters
Body
Body
What to ask or tell the agent, in the user’s words (‘show the attainment per
rep by quarter’), or the user’s answer to a question it waits on.
Id of the report to work on, from list_reports or create_report. Omit it to
have the agent create the report itself; with a conversation_id, omit it or
pass that conversation’s report.
Conversation to continue: the id an earlier ask_report_agent returned. Omit
it only to start a new conversation.
Response
Body
Body
‘answered’: the reply is in
answer. ‘awaiting_user’: the agent asks
pending_question; show it to the user, then send their reply as the next
ask_report_agent instruction of this conversation. ‘running’: the turn is
still going; call get_report_agent_turn with this conversation_id. One of:
answered, awaiting_user, running.The question the agent waits on, with its options (multi_select: several may
be picked; the user may also answer freely). Set when status is
‘awaiting_user’.