Working with documents
These tools let the LLM retrieve information from the documents attached to the agent. Unlike other pre-defined tools, you do not add them in the Tools tab — each is added automatically based on the selected Document mode (see Documents).
For each tool, the Tool schema table describes the tool as it is exposed to the LLM. To customize the tools, use the doc_tools advanced configuration parameter, described in Customizing the document tools.
Note: A tool is also added when any individual document is assigned its mode via the documents_mode advanced configuration parameter (see Per-document mode). When documents are assigned to different modes, each tool operates only on the documents assigned to it and rejects the others.
doc_search
Lets the LLM search the attached documents for extracts relevant to a question (agentic RAG). Added automatically when the Document mode is set to Semantic search (agentic, via doc_search tool).
Tool schema
Parameters the tool exposes to the LLM.
| Parameter | Type | Description |
|---|---|---|
question
|
string | The question to find relevant document extracts for. |
document_name
|
string | (Advanced mode only) Name of the document to search in. |
doc_get
Lets the LLM request the content of a specific document or, in advanced mode, a specific section of it. Added automatically when the Document mode is set to Full content (agentic, via doc_get tool).
Tool schema
Parameters the tool exposes to the LLM.
| Parameter | Type | Description |
|---|---|---|
document_name
|
string | Name of the document to get the content of. |
section_name
|
string | (Advanced mode only) Name of the section to get, instead of the full document content. |
doc_toc
Lets the LLM retrieve the table of contents (section names) of a specific document, so that it can then request a specific section via doc_get. Added automatically, alongside doc_get, when the Document mode is set to Full content (agentic, via doc_get tool) and the doc_get mode is set to Advanced (LLM must specify the section).
Tool schema
Parameters the tool exposes to the LLM.
| Parameter | Type | Description |
|---|---|---|
document_name
|
string | Name of the document to get the table of contents for. |
Customizing the document tools
Because the document tools are added automatically, you customize them via the doc_tools advanced configuration parameter rather than in the Tools tab. Each tool (doc_search, doc_get, doc_toc) accepts the following settings:
| Parameter | Description |
|---|---|
name
|
Custom tool name. If empty, the default name is used. |
description
|
Custom tool description. If empty, the default description is used. |
redact_response
|
Redact the tool's response from the message history. |
Overriding the name and description can improve the reliability of tool calling for a specific agent's prompt. For example, for an agent that searches student records:
{
"doc_tools": {
"doc_search": {
"name": "search_student_records",
"description": "Search student records for enrollment status, grades and contact details."
}
}
}
For details, see Documents.