Ask a Foundry ontology
helix_foundry_askAnswer a question about a business from its Foundry ontology, with every claim citing the entities, facts, rows or document quotes it read: use it, in plain language, for questions about the user's customers, accounts, people, deals, documents or anything else their connected data holds. Waits up to 25 seconds; until the question is done, call helix_foundry_get_question. Each question counts against the workspace's hourly limit and monthly budget.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"ontology_id": "<ontology_id>",
"question": "<question>",
"client_token": "<client_token>"
},
"name": "helix_foundry_ask"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| focus | No | The entity the question is about. | |
| load_id | No | Load to ask; the ontology's current load when empty. | |
| question | Yes | The question, in plain language. | |
| valid_at | No | Answer as of this day, YYYY-MM-DD, not after today (UTC); empty for now. Entities are read as they were then and documents dated after it are left out; reads that can only show the load as it is now (queries, searches for entities) are refused, never answered as of now instead. A follow-up takes its thread's day; anyone who reads the load through grants can't ask as of a day. | |
| thread_id | No | A question's thread_id, to continue that conversation; empty starts a new one. | |
| ontology_id | Yes | Foundry ontology identifier. | |
| client_token | Yes | A unique string of at most 64 characters. The same token returns the same question instead of asking again, so a retry is safe. | |
| workspace_id | No | Helix workspace identifier. May be empty when the caller has only one workspace (a service key always does). | |
| use_case_run_id | No | An open run of a use case (helix_foundry_start_use_case_run) to record this call under; empty for none. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| done | Yes | ||
| error | No | ||
| result | No | Untrusted answer: the ontology agent's AskResult, set once answered or cannot_answer. An integer past 2^53 comes as a string of its digits, which JSON numbers would round. Its queries come without their outputs: to see the rows one of the answer's visuals shows, read its query (queries[].query) again with helix_foundry_read_graph, as a query read on the question's load_id. | |
| status | Yes | ||
| load_id | Yes | ||
| attempts | Yes | ||
| question | Yes | ||
| valid_at | No | ||
| thread_id | Yes | ||
| created_at | Yes | ||
| usd_micros | Yes | ||
| finished_at | No | ||
| content_trust | No |