Invantive MCP Server offers the following tools to an AI client such as Anthropic Claude. Every tool only reads: no tool changes data, and no tool accepts an SQL statement. - `describe_entities`: lists the entities that can be read from the database, with their name, label, type, data container, description, key field and the order of magnitude of their number of rows. - `read_records`: reads rows from one entity, with a select, filter, sort and number of rows in the notation of the OData version 4 query interface. - `analyze_records`: runs the same read as `read_records` and returns how it was executed instead of the rows. Available from release 28.0. See below. - `current_cloud_user`: returns the profile of the signed-in user and of the organisation of that user, as held in Invantive Cloud. ## Analysing a Read `analyze_records` takes the arguments of `read_records`: `entity`, which is required, and `select`, `filter`, `orderby` and `first`. The read is translated into the same `select` statement, executed under the same authorisation and recorded in the same way. Its rows are read and counted, but not returned. The answer holds: - `sqlStatement`: the `select` statement that was executed. - `rowsReturned` and `rowsRead`: the rows the statement returned and the rows it read from all tables. - `counters`: what the statement counted, summed over all steps, such as `PairsEvaluated` or `RowsSorted`; only the counters which are not zero. - `steps`: one object per step of the execution, such as the read of a table, a join or a sort, with the same members as a line of the `/steps` file of [[Invantive Data Hub/Command Line Options|Invantive Data Hub]]: the kind and description of the step, the rows in and out, the duration, processor time and allocation including the steps below, the same figures without the steps below as [[Invantive UniversalSQL/Grammar/Statement Types/Explain Statement (explainStatement)|explain analyze]] measures them, how a join matched its rows, the number of rows a table declares, and the counters of the step itself. The members of a step are written as on that line, starting with a capital, such as `ExclusiveCpuMs`. An AI client calls it when a read is slow or reads more rows than it returns, for instance to see whether a filter was handed to the data container, which join algorithm was chosen, or which step allocated the memory. Measuring every step costs a reading of the processor time per row per step, which only this tool pays. The following arguments analyse the read of the five largest open invoices of an entity, with the same arguments `read_records` would take: ```json { "entity": "SalesInvoices" , "select": "InvoiceNumber,AmountDC" , "filter": "Status eq 20" , "orderby": [ "AmountDC desc" ] , "first": 5 } ```