Skip to main content

The tool-call log

To answer a question, the agent calls tools. Each tool reads a context stream or computes a figure. The provenance panel under an answer counts the calls that failed and the calls that were refused. The panel does not say why.

The app writes one log line for each call that failed or was refused. The line names the tool, the context stream, the reason and the turn. Use this page to find those lines and send them to whoever supports your installation.

What a line looks like​

Each line is one JSON object on its own line. The app container writes it to standard output when the call ends:

{"event": "tool_call", "component": "prism-app", "outcome": "refused",
"reason": "below_evidence_floor", "tool": "calculate",
"backend": "Semantic Query", "runner_ok": true, "call": 8,
"duration_ms": 214, "turn_id": "9f2c41d0b7e84a51a0c3e6f1d2b5a7c8",
"conversation_id": "5b1e9c2a-7d4f-4e38-9a61-0c2f8d3b4e17",
"at": "2026-11-10T16:04:12.318+00:00"}
{"event": "tool_call", "component": "prism-app", "outcome": "failed",
"reason": "ORA-00904", "tool": "query", "backend": "Semantic Query",
"runner_ok": true, "call": 7, "stream_label": "Resource plan",
"duration_ms": 30112,
"turn_id": "9f2c41d0b7e84a51a0c3e6f1d2b5a7c8",
"conversation_id": "5b1e9c2a-7d4f-4e38-9a61-0c2f8d3b4e17",
"at": "2026-11-10T16:04:09.902+00:00"}

A call that answered writes no line. A call that was still running when the turn ended writes no line.

The fields​

FieldWhenWhat it is
eventalwaystool_call
componentalwaysprism-app
outcomealwaysfailed, refused, or partly_refused. These are the words the provenance panel counts. partly_refused is a call that asked about several people or figures, where some of them were refused
reasonalwayswhy. See the reasons
entry_reasonsa call about several people or figuresthe distinct reasons of the parts that were refused or failed
toolalwaysthe tool the agent called. unrecognised when Prism does not hold that tool in its list of tools. The list is empty for a short time after the app starts. A server that was down when the app built the list is missing from it until a retry, a minute or more later
backendalwaysthe MCP server the tool belongs to, as the provenance panel names it. unattributed when the app had not yet listed that server's tools
runner_okalwaysfalse when the agent runner reported the call itself as failed. true when the call returned and its answer was an error or a refusal
callalwaysthe call's number in the turn. It is the number the provenance panel shows
streamwhen the semantic query server's answer names itthe context stream's name, as registered
datasetwhen the semantic query server's answer names itthe dataset of that stream
stream_labelwhen that answer names no stream but names a labelthe context stream's label, as its manifest sets it. A failed read names its stream this way
duration_mswhen the runner timed ithow long the call took
turn_idalwaysthe answer. It finds the question, the person and the full record in app_events
conversation_idwhen the conversation has startedthe conversation the turn belongs to
atalwayswhen the line was written, in UTC

The stream and dataset come from the semantic query server's answer, never from what the agent asked for. A call refused because it named no known stream carries neither. The field is stream, not source, because Splunk gives every event a source field of its own: the log file's path.

The reasons​

  1. A refusal or outage code. A server that refuses a call sends a code, for example below_evidence_floor or crosswalk_unavailable. The line carries that code. A refusal is often by design. The minimum group size is one example.
  2. A database code. For example ORA-00904, ORA-00942, ORA-01017, or snowflake_ and a Snowflake code. Your database team can read these. A code that starts with postgres_ comes from Prism's own Postgres. It carries the SQLSTATE, for example postgres_42501 for a missing privilege or postgres_42P01 for a missing table. A refused connection carries its code too. For example, postgres_28P01 is a wrong password and snowflake_390186 is a role the Snowflake user was not granted.
  3. A fixed name. The semantic query server sends one of these when it read no database code of a known shape. See the fixed names.
  4. http_ and a 4xx or 5xx status. For example http_403. The source's API answered with that status.
  5. timed_out. The source did not answer within the time limit.
  6. An error type from a fixed list. For example UndefinedTableError or ReadTimeout.
  7. unclassified. The error named none of the above. The error's own text is not on the line. Send the line with its turn_id. Your support contact can then ask for that turn's record. One failure that logs unclassified is a call the agent runner ended with an error that names no type. Then runner_ok is false.

The fixed names​

NameWhat failed
warehouse_unavailablePrism could not reach the warehouse, or could not open a session on it, and read no code
warehouse_no_objectThe warehouse has no view for the dataset, or the read-only role cannot see it
warehouse_privilegeThe view exists, and the read-only role may not read it
warehouse_authThe warehouse refused the credential
warehouse_no_columnA column the statement names is not in the view
warehouse_syntaxThe warehouse could not parse the statement
warehouse_answer_unreadPrism could not read the warehouse's answer in full
warehouse_refusedThe warehouse refused the statement and gave no code
postgres_unreachablePrism could not reach its own Postgres, and Postgres sent no SQLSTATE
postgres_errorPrism's own Postgres driver failed and gave no SQLSTATE

A name that starts with warehouse_ appears only when Prism read no code of a known shape from the warehouse. When Prism read one, the line carries the code instead. A known shape is ORA-, DPY-, DPI- or TNS- and four or five digits, or a Snowflake code of six digits.

What is never in a line​

The line never carries an error's text, because an error message can quote a value. It never carries a credential, a token or a password. It never carries the call's arguments. It never carries a row, a figure, or the size of a group that a floor refused. It never carries the question, or who asked it. The turn_id finds those in app_events (Finding an answer again).

Find the lines​

Search your log collector for "event": "tool_call". If your collector reads JSON fields, search for event=tool_call.

In Splunk, this search lists the lines of the last day, one row per call:

"tool_call" "prism-app" earliest=-24h
| spath
| search event=tool_call
| table _time outcome reason tool backend stream stream_label dataset call turn_id conversation_id

This search counts the reasons, which shows what fails most often:

"tool_call" "prism-app" earliest=-7d
| spath
| search event=tool_call
| fillnull value="-" stream stream_label
| stats count by outcome reason tool stream stream_label
| sort - count

To read the calls of one answer, search for its turn_id:

"tool_call" "9f2c41d0b7e84a51a0c3e6f1d2b5a7c8"

If your collector puts the container's line inside another field, spath needs that field's name, for example spath input=log.

Without a log collector, read the app pod's log:

kubectl logs -n <namespace> -l app.kubernetes.io/component=app -c app --since=24h \
| grep '"event": "tool_call"'

Send the lines​

Send the lines as they are. They carry no question, no answer and no data from your sources. Add what the reader saw, if you know it. The turn_id lets your support contact ask you for the right record, if they need it.