Skip to main content
Glama
DelineaMCP

DelineaMCP

Official
by DelineaXPM

Run SQL Report

run_report

Execute 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

NameRequiredDescriptionDefault
max_rowsNo
sql_queryYes
report_nameNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.0.0

TDQS

A4.6/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Goes well past the annotations: it discloses the three-call lifecycle (POST /api/v1/reports, POST /reports/execute, DELETE /reports/{id}) and that the report is temporary and deleted after execution — which explains why readOnlyHint is false despite the SELECT-only query. It also states that the configured account's report permissions apply and documents the return keys including 'truncated' and the error path.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the one-line purpose, then structured into Parameters and Returns sections, which suits a tool with non-trivial SQL grammar. Some content is overhead for an agent, notably the two raw endpoint paths and the external documentation URL, though the endpoint sequence does double as behavioral disclosure.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description supplies the return shape (columns, rows, total_rows, truncated, or error on failure), the SQL dialect limits, the row cap, and the prerequisite reference tool — everything needed to invoke and interpret a call correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description carries the full burden and largely does: it enumerates the disallowed SQL constructs (no IF, WHILE, BEGIN...END, TRY/CATCH, PRINT, temp tables, database-qualified names) and documents max_rows default 200 capped at 5000. report_name is covered only as 'Optional name for the temporary report', leaving naming rules or length limits unstated.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Run a read-only SQL report on Secret Server and return its rows') and immediately scopes it against the sibling reference tool by ordering 'Call list_example_reports first'. An agent can distinguish it from list_example_reports and the search_* siblings without opening any schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives a clear prerequisite ('Call list_example_reports first... to build sql_query from') and a concrete usage constraint ('Add aggregation or a WHERE clause rather than raising this' for max_rows). What is missing is an explicit statement of when to prefer this tool over data-access siblings such as search_secrets or platform_reports; the guidance is strong on how to use it, thinner on when not to.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.