get_latest_documents
Fetch documents from an OpenSearch index sorted by timestamp descending. Optionally restrict results to only those within the last specified hours.
Instructions
Return newest documents sorted by a date field, optionally restricted by lookback hours.
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": {
"profile": "<profile>",
"region": "<region>",
"domain": "<domain>",
"index": "<index>"
},
"name": "get_latest_documents"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| size | No | ||
| index | Yes | ||
| domain | Yes | ||
| region | Yes | ||
| profile | Yes | ||
| source_fields | No | ||
| lookback_hours | No | ||
| timestamp_field | No | @timestamp |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||