Built-in MCP Tools: Difference between revisions

From QPR ProcessAnalyzer Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 5: Line 5:
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 [[Navigation_Menu#Expression_Designer|Expression Designer]].
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 [[Navigation_Menu#Expression_Designer|Expression Designer]].


== Overview ==
= 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.


{| class="wikitable"
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.
! Tool !! Purpose !! Read-only
List Available Process Models
-
Get Model Details
-
Generic Query
}
 
 
A typical workflow is: 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 ==
== 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.


Lists all process models that are available on the server. For each model it reports the model ID, name, description, whether the model uses in-memory or DataFrame-based processing, and whether it is an object-centric (OCPM/OCEL) or case-centric model. This tool is read-only.
'''Inputs.''' This tool takes no input parameters (the input schema is an empty object).
 
=== 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 has the following fields:
 
{| class="wikitable"
! Field !! Type !! Description
id
-
name
-
description
-
isInMemoryModel
-
isObjectCentric
-
createdDate
-
createdBy
-
modifiedDate
-
modifiedBy
}


 
'''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.
Only models that pass a validity check are included in the result.


== Get Model Details ==
== 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.


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 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.


=== Inputs ===
'''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.


{| class="wikitable"
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.
! Parameter !! Type !! Required !! Description
modelId
}


 
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.
=== Outputs ===
 
The tool returns an object describing the model. It contains the same identity fields as a model object from '''List Available Process Models''' (id, name, description, isInMemoryModel, isObjectCentric, createdDate, createdBy, modifiedDate, modifiedBy), plus:
 
{| class="wikitable"
! Field !! Type !! Description
configuration
-
usedDataTables
}
 
 
Each entry in usedDataTables describes one data table:
 
{| class="wikitable"
! Field !! Type !! Description
id
-
name
-
description
-
createdDate / createdBy
-
modifiedDate / modifiedBy
-
configuration
-
dataSourceType
-
dataSourceObjectType
-
nRows
-
columns
-
foreignKeys
}
 
 
Each column entry contains:
 
{| class="wikitable"
! Field !! Type !! Description
Name
-
DataType
-
DataTypeInDataSource
-
PrimaryKey
}
 
 
Each foreign key entry contains a TargetDatatable (the referenced data table) and a Columns array of source-to-target column mappings, where each mapping has a Source column name and a Target column name.


== Generic Query ==
== 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.


Runs a generic analytical query against a QPR ProcessAnalyzer model using the QPR expression language. When the processing method is DataFrame (the default and recommended mode), the calculation is executed directly in the data source (Snowflake or SQL Server) using SqlDataFrames, 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.
'''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.
 
=== Inputs ===
 
The tool takes a single required object parameter, queryConfiguration, which describes the query. Its most important properties are:
 
{| class="wikitable"
! Property !! Type !! Required !! Description
Root
-
ProcessingMethod
-
ModelId
-
ContextType
-
Filter
}
 
 
Additional configuration properties (such as Dimensions, Values, Ordering, MaximumRowCount, and IncludeAllSourceDataColumns) shape and limit the output. Dimensions group rows and Values define the aggregated or selected columns.
 
=== Outputs ===
 
The result is returned as a data frame with the following structure:
 
{| class="wikitable"
! Field !! Type !! Description
Columns
-
Rows
}
 
 
=== Notes ===


For object-centric (OCEL) models queried with ContextType: "Model", the Filter must include a Perspective that selects the object type treated as the "case".
'''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.
Because column names are model-specific and case-sensitive, it is good practice to first run '''Get Model Details''', or a query with IncludeAllSourceDataColumns: true and MaximumRowCount: 1, to discover the actual column names before building expressions.

Revision as of 12:51, 13 August 2026

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.