<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.onqpr.com/pa/index.php?action=history&amp;feed=atom&amp;title=Create_MCP_Tools</id>
	<title>Create MCP Tools - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.onqpr.com/pa/index.php?action=history&amp;feed=atom&amp;title=Create_MCP_Tools"/>
	<link rel="alternate" type="text/html" href="https://wiki.onqpr.com/pa/index.php?title=Create_MCP_Tools&amp;action=history"/>
	<updated>2026-04-28T13:46:06Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.1</generator>
	<entry>
		<id>https://wiki.onqpr.com/pa/index.php?title=Create_MCP_Tools&amp;diff=28215&amp;oldid=prev</id>
		<title>Ollvihe at 08:49, 28 April 2026</title>
		<link rel="alternate" type="text/html" href="https://wiki.onqpr.com/pa/index.php?title=Create_MCP_Tools&amp;diff=28215&amp;oldid=prev"/>
		<updated>2026-04-28T08:49:29Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 08:49, 28 April 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l10&quot;&gt;Line 10:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 10:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Switch to the &amp;#039;&amp;#039;&amp;#039;Description&amp;#039;&amp;#039;&amp;#039; tab and provide a description. The description is added to the context of the client.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Switch to the &amp;#039;&amp;#039;&amp;#039;Description&amp;#039;&amp;#039;&amp;#039; tab and provide a description. The description is added to the context of the client.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;=&lt;/del&gt;== MCP Tool &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Configuration =&lt;/del&gt;==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== MCP Tool &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Settings &lt;/ins&gt;==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Every script can define its own &amp;#039;&amp;#039;&amp;#039;McpTool&amp;#039;&amp;#039;&amp;#039; configuration as JSON. Supported values are same as [https://modelcontextprotocol.io/specification/2025-11-25/server/tools#tool here], except for the &amp;#039;&amp;#039;&amp;#039;name&amp;#039;&amp;#039;&amp;#039; which is always generated automatically and can&amp;#039;t be overridden. Defining the McpTool configuration will override any default configurations generated for scripts automatically by QPR ProcessAnalyzer. For example, specifying the value for &amp;quot;title&amp;quot; here will override the default functionality of using script&amp;#039;s name as title of the tool.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Every script can define its own &amp;#039;&amp;#039;&amp;#039;McpTool&amp;#039;&amp;#039;&amp;#039; configuration as JSON. Supported values are same as [https://modelcontextprotocol.io/specification/2025-11-25/server/tools#tool here], except for the &amp;#039;&amp;#039;&amp;#039;name&amp;#039;&amp;#039;&amp;#039; which is always generated automatically and can&amp;#039;t be overridden. Defining the McpTool configuration will override any default configurations generated for scripts automatically by QPR ProcessAnalyzer. For example, specifying the value for &amp;quot;title&amp;quot; here will override the default functionality of using script&amp;#039;s name as title of the tool.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;br&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;br&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l111&quot;&gt;Line 111:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 111:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Testing MCP tools &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;in &lt;/del&gt;QPR ProcessAnalyzer ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Testing MCP tools &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;using &lt;/ins&gt;QPR ProcessAnalyzer ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;When developing MCP tools, it might be useful try test them in QPR ProcessAnalyzer before publishing as MCP tools. Scripts (used as MCP tools) can be called in the [[Navigation_Menu#Expression_Designer|Expression Designer]]. The following example expression calls a script with some parameters and shows the return value as json:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;When developing MCP tools, it might be useful try test them in QPR ProcessAnalyzer before publishing as MCP tools. Scripts (used as MCP tools) can be called in the [[Navigation_Menu#Expression_Designer|Expression Designer]]. The following example expression calls a script with some parameters and shows the return value as json:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;syntaxhighlight lang=&amp;quot;typescript&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;syntaxhighlight lang=&amp;quot;typescript&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Ollvihe</name></author>
	</entry>
	<entry>
		<id>https://wiki.onqpr.com/pa/index.php?title=Create_MCP_Tools&amp;diff=28211&amp;oldid=prev</id>
		<title>Ollvihe: Created page with &quot;== Creating MCP Tools == MCP tools are implemented using scripts written in QPR ProcessAnalyzer expression language. A script will be added as the MCP tool when the &#039;&#039;&#039;MCP tool&#039;&#039;&#039; checkbox is enabled in the Script Properties. Only system administrator users can enable the MCP tool checkbox. Also, scripts that are MCP tools, only system administrators can modify them because any changes to the MCP interface is re...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.onqpr.com/pa/index.php?title=Create_MCP_Tools&amp;diff=28211&amp;oldid=prev"/>
		<updated>2026-04-28T08:46:14Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;== Creating MCP Tools == MCP tools are implemented using &lt;a href=&quot;/pa/index.php/Managing_Scripts&quot; title=&quot;Managing Scripts&quot;&gt;scripts&lt;/a&gt; written in QPR ProcessAnalyzer expression language. A script will be added as the MCP tool when the &amp;#039;&amp;#039;&amp;#039;MCP tool&amp;#039;&amp;#039;&amp;#039; checkbox is enabled in the &lt;a href=&quot;/pa/index.php/Managing_Scripts#Script_Properties&quot; title=&quot;Managing Scripts&quot;&gt;Script Properties&lt;/a&gt;. Only system administrator users can enable the MCP tool checkbox. Also, scripts that are MCP tools, only system administrators can modify them because any changes to the MCP interface is re...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Creating MCP Tools ==&lt;br /&gt;
MCP tools are implemented using [[Managing_Scripts|scripts]] written in QPR ProcessAnalyzer expression language. A script will be added as the MCP tool when the &amp;#039;&amp;#039;&amp;#039;MCP tool&amp;#039;&amp;#039;&amp;#039; checkbox is enabled in the [[Managing_Scripts#Script_Properties|Script Properties]]. Only system administrator users can enable the MCP tool checkbox. Also, scripts that are MCP tools, only system administrators can modify them because any changes to the MCP interface is restricted to system administrators for security reasons.&lt;br /&gt;
&lt;br /&gt;
To enable a script as an MCP Tool:&lt;br /&gt;
# Log in to QPR ProcessAnalyzer as a System Administrator.&lt;br /&gt;
# Open or create the script.&lt;br /&gt;
# For the script to be used as an MCP tool, give it a name. This name is then used as the MCP tool name. It is important to ensure that every script intended for MCP use has a non-empty, valid name, as clients may fail to discover tools with invalid names.&lt;br /&gt;
# Open the properties of the script.&lt;br /&gt;
# Switch to the &amp;#039;&amp;#039;&amp;#039;MCP&amp;#039;&amp;#039;&amp;#039; tab and select the &amp;#039;&amp;#039;&amp;#039;MCP tool&amp;#039;&amp;#039;&amp;#039; checkbox.&lt;br /&gt;
# Switch to the &amp;#039;&amp;#039;&amp;#039;Description&amp;#039;&amp;#039;&amp;#039; tab and provide a description. The description is added to the context of the client.&lt;br /&gt;
&lt;br /&gt;
=== MCP Tool Configuration ===&lt;br /&gt;
Every script can define its own &amp;#039;&amp;#039;&amp;#039;McpTool&amp;#039;&amp;#039;&amp;#039; configuration as JSON. Supported values are same as [https://modelcontextprotocol.io/specification/2025-11-25/server/tools#tool here], except for the &amp;#039;&amp;#039;&amp;#039;name&amp;#039;&amp;#039;&amp;#039; which is always generated automatically and can&amp;#039;t be overridden. Defining the McpTool configuration will override any default configurations generated for scripts automatically by QPR ProcessAnalyzer. For example, specifying the value for &amp;quot;title&amp;quot; here will override the default functionality of using script&amp;#039;s name as title of the tool.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Example&amp;#039;&amp;#039;&amp;#039;: The following JSON configures the MCP tool with a customized title and description, as well as some additional [https://github.com/modelcontextprotocol/csharp-sdk/blob/main/src/ModelContextProtocol.Core/Protocol/ToolAnnotations.cs MCP tool annotations]:&amp;lt;syntaxhighlight lang=&amp;quot;json&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;title&amp;quot;: &amp;quot;Example MCP tool title&amp;quot;,&lt;br /&gt;
    &amp;quot;description&amp;quot;: &amp;quot;Example MCP tool description&amp;quot;,&lt;br /&gt;
    &amp;quot;annotations&amp;quot;: {&lt;br /&gt;
        &amp;quot;destructiveHint&amp;quot;: true,&lt;br /&gt;
        &amp;quot;idempotentHint&amp;quot;: true,&lt;br /&gt;
        &amp;quot;openWorldHint&amp;quot;: true,&lt;br /&gt;
        &amp;quot;readOnlyHint&amp;quot;: false&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Defining Input Parameters ===&lt;br /&gt;
MCP tool input parameters are defined using a JSON schema following the [https://modelcontextprotocol.io/specification/2025-11-25/basic#json-schema-usage Model Context Protocol&amp;#039;s JSON Schema]. Each supported input parameter is listed under &amp;#039;&amp;#039;&amp;#039;properties&amp;#039;&amp;#039;&amp;#039;. By default, script don&amp;#039;t enforce any schema.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Example&amp;#039;&amp;#039;&amp;#039;: The following schema defines a script with five different types of parameters:&amp;lt;syntaxhighlight lang=&amp;quot;json&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;type&amp;quot;: &amp;quot;object&amp;quot;,&lt;br /&gt;
  &amp;quot;properties&amp;quot;: {&lt;br /&gt;
    &amp;quot;stringParameter&amp;quot;: {&lt;br /&gt;
      &amp;quot;type&amp;quot;: &amp;quot;string&amp;quot;,&lt;br /&gt;
      &amp;quot;description&amp;quot;: &amp;quot;String parameter&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
	&amp;quot;numberParameter&amp;quot;: {&lt;br /&gt;
	  &amp;quot;type&amp;quot;: &amp;quot;number&amp;quot;,&lt;br /&gt;
	  &amp;quot;description&amp;quot;: &amp;quot;Number parameter&amp;quot;&lt;br /&gt;
	},&lt;br /&gt;
	&amp;quot;booleanParameter&amp;quot;: {&lt;br /&gt;
	  &amp;quot;type&amp;quot;: &amp;quot;boolean&amp;quot;,&lt;br /&gt;
	  &amp;quot;description&amp;quot;: &amp;quot;Boolean parameter&amp;quot;&lt;br /&gt;
	},&lt;br /&gt;
	&amp;quot;arrayParameter&amp;quot;: {&lt;br /&gt;
	  &amp;quot;type&amp;quot;: &amp;quot;array&amp;quot;,&lt;br /&gt;
	  &amp;quot;description&amp;quot;: &amp;quot;Array parameter&amp;quot;,&lt;br /&gt;
	  &amp;quot;nullable&amp;quot;: true,&lt;br /&gt;
	  &amp;quot;items&amp;quot;: {&lt;br /&gt;
		  &amp;quot;type&amp;quot;: &amp;quot;integer&amp;quot;&lt;br /&gt;
	  }&lt;br /&gt;
	},&lt;br /&gt;
	&amp;quot;objectParameter&amp;quot;: {&lt;br /&gt;
	  &amp;quot;type&amp;quot;: &amp;quot;object&amp;quot;,&lt;br /&gt;
	  &amp;quot;description&amp;quot;: &amp;quot;Object parameter&amp;quot;,&lt;br /&gt;
	  &amp;quot;properties&amp;quot;: {&lt;br /&gt;
	    &amp;quot;inner&amp;quot;: {&amp;quot;type&amp;quot;: &amp;quot;string&amp;quot;}&lt;br /&gt;
	  }&lt;br /&gt;
	}&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
After this, the tool can be called, for example, with the following set of parameters:&amp;lt;syntaxhighlight lang=&amp;quot;json&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;stringParameter&amp;quot;: &amp;quot;hello&amp;quot;,&lt;br /&gt;
  &amp;quot;numberParameter&amp;quot;: 123.456,&lt;br /&gt;
  &amp;quot;booleanParameter&amp;quot;: true,&lt;br /&gt;
  &amp;quot;arrayParameter&amp;quot;: [ 1, 2, 3 ],&lt;br /&gt;
  &amp;quot;objectParameter&amp;quot;: { &amp;quot;inner&amp;quot;: &amp;quot;test&amp;quot; }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Defining Structured Tool Output ===&lt;br /&gt;
Structured tool output is described using a JSON schema following the [https://modelcontextprotocol.io/specification/2025-11-25/basic#json-schema-usage Model Context Protocol&amp;#039;s JSON Schema]. By default, scripts don&amp;#039;t enforce any schema and the result is considered to be just text.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Example&amp;#039;&amp;#039;&amp;#039;: The following example configures the script&amp;#039;s return value to contain an object having the &amp;quot;models&amp;quot; property with information about each model:&amp;lt;syntaxhighlight lang=&amp;quot;json&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;type&amp;quot;: &amp;quot;object&amp;quot;,&lt;br /&gt;
  &amp;quot;properties&amp;quot;: {&lt;br /&gt;
    &amp;quot;string&amp;quot;: {&lt;br /&gt;
      &amp;quot;type&amp;quot;: &amp;quot;string&amp;quot;,&lt;br /&gt;
      &amp;quot;description&amp;quot;: &amp;quot;String value&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;number&amp;quot;: {&lt;br /&gt;
      &amp;quot;type&amp;quot;: &amp;quot;number&amp;quot;,&lt;br /&gt;
      &amp;quot;description&amp;quot;: &amp;quot;Number value&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;boolean&amp;quot;: {&lt;br /&gt;
      &amp;quot;type&amp;quot;: &amp;quot;boolean&amp;quot;,&lt;br /&gt;
      &amp;quot;description&amp;quot;: &amp;quot;Boolean value&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;array&amp;quot;: {&lt;br /&gt;
      &amp;quot;type&amp;quot;: &amp;quot;array&amp;quot;,&lt;br /&gt;
      &amp;quot;description&amp;quot;: &amp;quot;Array value&amp;quot;,&lt;br /&gt;
      &amp;quot;nullable&amp;quot;: true,&lt;br /&gt;
      &amp;quot;items&amp;quot;: {&lt;br /&gt;
        &amp;quot;type&amp;quot;: &amp;quot;integer&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;object&amp;quot;: {&lt;br /&gt;
      &amp;quot;type&amp;quot;: &amp;quot;object&amp;quot;,&lt;br /&gt;
      &amp;quot;description&amp;quot;: &amp;quot;Object value&amp;quot;,&lt;br /&gt;
      &amp;quot;properties&amp;quot;: {&lt;br /&gt;
        &amp;quot;inner&amp;quot;: {&amp;quot;type&amp;quot;: &amp;quot;string&amp;quot;}&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Testing MCP tools in QPR ProcessAnalyzer ==&lt;br /&gt;
When developing MCP tools, it might be useful try test them in QPR ProcessAnalyzer before publishing as MCP tools. Scripts (used as MCP tools) can be called in the [[Navigation_Menu#Expression_Designer|Expression Designer]]. The following example expression calls a script with some parameters and shows the return value as json:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;typescript&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
let returnValue = ScriptById(1).Run(#{&lt;br /&gt;
  &amp;quot;stringParameter&amp;quot;: &amp;quot;hello&amp;quot;,&lt;br /&gt;
  &amp;quot;numberParameter&amp;quot;: 123.456,&lt;br /&gt;
  &amp;quot;booleanParameter&amp;quot;: true,&lt;br /&gt;
  &amp;quot;arrayParameter&amp;quot;: [1, 2, 3]&lt;br /&gt;
  &amp;quot;objectParameter&amp;quot;: {&lt;br /&gt;
    &amp;quot;inner&amp;quot;: &amp;quot;test&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
});&lt;br /&gt;
return ToJson(returnValue);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Now, if script having id 1 has the following script source code:&amp;lt;syntaxhighlight lang=&amp;quot;typescript&amp;quot;&amp;gt;&lt;br /&gt;
#{&lt;br /&gt;
  &amp;quot;string&amp;quot;: stringParameter,&lt;br /&gt;
  &amp;quot;number&amp;quot;: numberParameter,&lt;br /&gt;
  &amp;quot;boolean&amp;quot;: booleanParameter,&lt;br /&gt;
  &amp;quot;array&amp;quot;: arrayParameter,&lt;br /&gt;
  &amp;quot;object&amp;quot;: objectParameter&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
and is configured as specified in the previous chapter, the result of expression will be the following valid JSON object as string:&amp;lt;syntaxhighlight lang=&amp;quot;json&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;string&amp;quot;: &amp;quot;hello&amp;quot;,&lt;br /&gt;
  &amp;quot;number&amp;quot;: 123.456,&lt;br /&gt;
  &amp;quot;boolean&amp;quot;: true,&lt;br /&gt;
  &amp;quot;array&amp;quot;: [1,2,3],&lt;br /&gt;
  &amp;quot;object&amp;quot;: {&amp;quot;inner&amp;quot;: &amp;quot;text&amp;quot;}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Ollvihe</name></author>
	</entry>
</feed>