Skip to main content
Hand the work on a report to Qobra’s report agent, the agent the web app calls the Analyst. Each call sends one instruction and returns the agent’s turn: an 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 an instruction 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. Relay answer to the user.
  • awaiting_user: the agent asks pending_question. The client shows it to the user, then sends their reply as the next instruction with the same conversation_id.
  • running: the turn is still going. Each call waits about 45 seconds, and a turn can take several minutes. Call get_report_agent_turn with the conversation_id to 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:write scope. See Scopes.
Each user can start at most 10 agent turns per minute, across 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

string
required
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.
string
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.
string
Conversation to continue: the id an earlier ask_report_agent returned. Omit it only to start a new conversation.
string
Id of a sandbox from list_sandboxes, to create this in instead of the live environment. Omit it to create in live, the company’s real data. Never a name, never the live id.

Response

Body

string
‘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.
string
The conversation of this turn. Pass it back on every follow-up.
string
The agent’s reply, to relay to the user. Set when status is ‘answered’.
object
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’.
object
The report the conversation works on, as list_reports lists it: the one you named or the one the agent created. Null until it has created one, or once it is deleted.