trace_content
Read Oracle trace files to inspect the first or last lines or filter by text such as ORA- errors or SQL IDs; treat output as sensitive.
Instructions
Read a trace file through V$DIAG_TRACE_FILE_CONTENTS: the last (default) or first lines, optionally only lines containing a text (e.g. ORA-, a sql_id). Use the file name from trace_files or alert_log. Trace files can contain SQL text and data values — handle the output as sensitive.
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": {
"file": "<file>"
},
"name": "trace_content"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | Trace file name, e.g. FREE_ora_1234.trc (a path is reduced to its file name) | |
| lines | No | Number of lines (default 200) | |
| context | No | With contains: lines of context before and after each match, like grep -C (default 0) | |
| contains | No | Case-insensitive substring filter on the line (applied before head/tail) | |
| position | No | Return the last or first lines (default tail) |