talonic_invoke_agent_tool
Run ONE named data tool directly and get its exact output (e.g. query_data for a read-only SQL SELECT over the extracted data, describe_data for the queryable field list, get_document_markdown to read a document's text).
How an agent uses it
- Read-only for every credential: the platform runs each caller of this route, API key or OAuth session alike, as its least-privilege viewer role, which grants only the read-only data tools (capability
data.read). Tools that write are never invocable here, however you connected, so this tool reads and never changes workspace data. - Target API: Talonic data tools — https://talonic.com/docs/api (POST /v1/agent/tools/{name}/invoke; input schemas from talonic_list_agent_tools).
- Use it when: talonic_list_agent_tools showed a tool with can_invoke: true that does what you need. Pass exactly the
argsits input_schema declares. - Not for: answering a question about the documents (talonic_ask returns one cited answer). Use this only for a query the user asked for, or when talonic_ask could not answer.
- Arguments:
name(tool name),args(object matching the tool's input_schema), optionaldocument_ids(hard scope for scope-aware tools). - Returns: { tool, result (the tool's parsed output), citations?, artifacts?, cards? }. Denied capabilities come back as an error naming the capability required; the platform re-checks every call.
Availability
Listed in every Talonic MCP session, local or hosted. Not listed in ChatGPT; there, ask the question with talonic_ask instead.
Behaviour and cost
- Reads only. It never changes workspace data.
- Cost: no credits.
Parameters
| Parameter | Type | Description |
|---|---|---|
| name * | string | Tool name from talonic_list_agent_tools, e.g. `query_data`. |
| args | object | Arguments matching the tool's input_schema. |
| document_ids | string[] | Restrict to these document ids (hard filter, enforced server-side). |
Example
Tool input
{ "name": "query_data", "args": { "sql": "SELECT field_key, count(*) FROM cells GROUP BY 1 ORDER BY 2 DESC LIMIT 5" } }Tool response
{
"tool": "query_data",
"result": { "rows": [{ "field_key": "invoice_number", "count": 412 }], "row_count": 1 }
}Errors
A failed call comes back as a tool error with the HTTP status and a message that says what to change. Troubleshooting lists the common ones.
Frequently asked questions
Does invoking a tool cost credits?+
No. The tools you can call here only read data and use no credits; the route has its own rate limit instead.