Run SQL Report
run_reportExecute read-only SQL queries against Secret Server and return report rows via the REST reports API; call list_example_reports first to build valid SELECT statements.
Instructions
Run a read-only SQL report on Secret Server and return its rows.
Call list_example_reports first: it is the reference for this tool
and lists the Secret Server database tables, columns, special fields and
tested example queries to build sql_query from. The query runs through
the Secret Server REST API reports endpoints (POST /api/v1/reports,
POST /api/v1/reports/execute, then DELETE /api/v1/reports/{id};
see https://docs.delinea.com/online-help/secret-server/api-scripting/rest-api/index.htm),
as a temporary report that is deleted after it runs. Secret Server only
executes SELECT statements and applies the configured account's
report permissions.
Parameters
sql_query:
The SQL query to run. Secret Server only accepts a single read-only
SELECT statement as custom report SQL (no IF, WHILE, BEGIN ... END,
TRY/CATCH, PRINT, temporary tables or database-qualified names); call
list_example_reports for the rules, table list and sample queries.
report_name:
Optional name for the temporary report.
max_rows:
Maximum rows to return (default 200, capped at 5000). Add
aggregation or a WHERE clause rather than raising this.
Returns
dict
columns, rows, total_rows and truncated, or an
error key on failure.
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": {
"sql_query": "<sql_query>"
},
"name": "run_report"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| max_rows | No | ||
| sql_query | Yes | ||
| report_name | No |