Built-in MCP Tools

From QPR ProcessAnalyzer Wiki
Revision as of 12:51, 13 August 2026 by Ollvihe (talk | contribs)
Jump to navigation Jump to search

QPR ProcessAnalyzer ships with the followin built-in MCP tools that allow an MCP client to explore process models and run analytical queries against them. The built-in tools are always available in the MCP interface. All three tools are read-only: they only retrieve data and never modify models, data tables, or any other server-side state. In MCP terms, each tool is annotated with readOnlyHint: true and destructiveHint: false. In addition, custom MCP tools can be implemented using scripts.

It's possible to temporarily disable the built-in MCP tools using the EnabledPrimitives setting if they are undesired.

The built-in MCP tools are internally available as system projects containing system scripts. System projects and scripts are content that cannot be modified and are not shown in the user interface. The built-in MCP tools can be listed using the expression language by querying SystemScripts in Expression Designer.

QPR ProcessAnalyzer Built-in MCP Tools

QPR ProcessAnalyzer ships with three built-in MCP (Model Context Protocol) tools that allow an MCP client to explore process models and run analytical queries against them. All three tools are read-only: they only retrieve data and never modify models, data tables, or any other server-side state. In MCP terms, each tool is annotated with readOnlyHint: true and destructiveHint: false.

A typical workflow is to first call List Available Process Models to find a model of interest, then call Get Model Details to inspect its structure (data tables, columns, object types), and finally use Generic Query to compute results.

List Available Process Models

Lists all process models that are available on the server. For each model it reports basic metadata such as the model ID, name, and description, whether the model uses in-memory processing, and whether it is object-centric (OCPM/OCEL) or case-centric. This tool is read-only.

Inputs. This tool takes no input parameters (the input schema is an empty object).

Outputs. The tool returns an object with a single models property, which is an array of model objects. Each model object contains a unique id (integer), a name and description (strings), an isInMemoryModel flag that is true only when the model uses in-memory processing, and an isObjectCentric flag that is true for object-centric (OCPM/OCEL) models and false for case-centric ones. Each object also includes audit information: createdDate and modifiedDate (ISO date-time strings) together with createdBy and modifiedBy (the names of the users who created and last modified the model). Only models that pass a validity check are included in the result.

Get Model Details

Returns detailed information about a single model, identified by its ID. In addition to the basic metadata also returned by List Available Process Models, this tool exposes the model's configuration and the data tables it uses, including their columns, data types, primary keys, and foreign keys. This is the recommended way to discover the exact table and column names needed to build a query. This tool is read-only.

Inputs. The tool takes one required parameter, modelId (integer), the identifier of the model to retrieve details for.

Outputs. The tool returns an object describing the model. It contains the same identity and audit fields as a model object from List Available Process Models (id, name, description, isInMemoryModel, isObjectCentric, createdDate, createdBy, modifiedDate, and modifiedBy). In addition, it includes a configuration object holding the model's configuration (for object-centric models this includes the OcelDataSource block with the available object types), and a usedDataTables array describing the data tables used by the model.

Each data table entry includes its id, name and description, its audit fields (createdDate, createdBy, modifiedDate, modifiedBy), and its configuration. It also reports the dataSourceType (one of Local, Redshift, Snowflake, Spark, or SqlServer), the dataSourceObjectType (Table or View), and nRows, the number of rows in the underlying data source table (nullable). Each data table further contains a columns array and a foreignKeys array.

Every column reports its Name, its ProcessAnalyzer DataType (one of Any, String, Boolean, Integer, Float, DateTime, Duration, ShortString, or Variant), the corresponding DataTypeInDataSource, and a PrimaryKey flag that is true only when the column is a primary key of the data table. Each foreign key defines a TargetDatatable (the referenced data table) and a Columns list of source-to-target column mappings, each mapping a Source column name to a Target column name.

Generic Query

Runs a generic analytical query against a QPR ProcessAnalyzer model. Queries are written using the QPR ProcessAnalyzer standard query syntax and expression language, which lets you select a root dataset (such as cases, events, variations, or flows), group it into dimensions, and compute aggregated values. When the processing method is DataFrame (the default and recommended mode), the calculation is executed directly in the data source (Snowflake or SQL Server), and a tabular result with dimension and value columns is returned. The tool supports both case-centric models and object-centric (OCPM/OCEL) models. Despite its analytical power, this tool is read-only: it only reads and aggregates existing data and never modifies it.

Inputs. The tool takes a single required object parameter, queryConfiguration, which describes the query using the QPR ProcessAnalyzer standard query syntax and expression language. It identifies the model to query, the root dataset to operate on, the processing method and execution context, an optional pre-filter, and the dimensions and values that shape the output. The detailed format of this configuration follows the standard ProcessAnalyzer query syntax and is not described further here.

Outputs. The result is returned as a data frame consisting of a Columns array and a Rows array. Each entry in Columns describes one result column with a Name and a DataType (the column's value type). Each entry in Rows is a data row holding one value per column.