The Pricefx MCP Server can detect tools declared in a partition and make them available to its clients. A partition tool is essentially a Groovy function that can be invoked with parameters.
Configuration
The MCP Server reads tool declarations from the Advanced Configuration Options on the partition. For a tool to be detected and used by the MCP Server, it must be described by a JSON object that meets the following requirements:
-
The option name must be prefixed with
MCP_tool_, for exampleMCP_tool_models_list. Try to use the same value in the JSONnamefield. -
The JSON must follow the MCP tool structure:
JSON{ "name": "models_list", // Tool's name "title": "Models: List", // Tool's readable name "description": "Lists models filtered by model class", // What the tool does "formulaName": "MCP_Commons", // Groovy logic containing the code "elementName": "Models", // Element containing the function "functionName": "list", // Function to call "inputSchema": { // Parameters of the function "properties": { "modelClassUN": { "type": "string", "description": "Model class unique name" } } }, "outputSchema": { // Description of the expected result from the call "properties": { "models": { "type": "array", "items": { "type": "object" }, "description": "Model metadata objects" } } } }
If a tool has an invalid JSON declaration, the MCP Server will log a parser failure and not expose this tool to MCP clients. You can check these failures directly in the MCP Server logs to identify issues with the JSON schema.
Input and Output Schema Type Definitions
The MCP Server supports nested properties within the inputSchema and outputSchema. This allows you to define complex data structures for your Groovy tools. The formats used to define property types are currently limited to the following subset of JSON Schema:
This limitation will be removed from the MCP Server CD2 Iteration 2.
|
Type |
Format |
|---|---|
|
string |
JSON
|
|
integer |
JSON
|
|
number |
JSON
|
|
boolean |
JSON
|
|
object |
JSON
|
|
date |
JSON
|
|
datetime |
JSON
|
|
array<T> |
JSON
|
|
map<string, T> |
JSON
|
Examples
|
Type |
Format |
|---|---|
|
array<number> |
JSON
|
|
array<date> |
JSON
|
|
map<string, boolean> |
JSON
|
|
map<string, datetime> |
JSON
|
|
map<string, map< string, integer>> |
JSON
|
Example inputSchema
"inputSchema": {
"properties": {
"orderBy": {
"type": "object",
"description": "Optional ordering options for the result list.",
"optional": true,
"properties": {
"orderField": {
"type": "string",
"enum": ["createDate", "lastUpdateDate", "dueDate", "completedDate"]
},
"orderType": {
"type": "string",
"enum": ["ASC", "DESC"]
}
},
"required": ["orderField", "orderType"]
}
}
}
Example outputSchema
"outputSchema": {
"properties": {
"actionItems": {
"type": "array",
"description": "List of agent actions.",
"items": {
"type": "object",
"description": "The agent action (action item).",
"properties": {
"assignedTo": {
"type": "integer",
"description": "The id of the user the action is assigned to."
},
"assignedToName": {
"type": "string",
"description": "The login name of the user the action is assigned to."
},
"createDate": {
"type": "string",
"description": "The timestamp of the action's creation date."
},
"createdBy": {
"type": "integer",
"description": "The id of the user the action was created by."
},
"createdByName": {
"type": "string",
"description": "The login name of the user the action was created by."
},
"deep_link": {
"type": "string",
"description": "Link to the action (URL)."
},
"description": {
"type": "string",
"description": "The action's description."
},
"dueDate": {
"type": "string",
"description": "The timestamp of the action's due date."
},
"id": {
"type": "integer",
"description": "The action's id."
},
"impact_score": {
"type": "object"
},
"lastUpdateBy": {
"type": "integer",
"description": "The id of the user the action was last updated by."
},
"lastUpdateByName": {
"type": "string",
"description": "The login name of the user the action was last updated by."
},
"lastUpdateDate": {
"type": "string",
"description": "The timestamp of the action's last update date."
},
"parent": {
"type": "string",
"description": "The action's parent, string following the pattern of '<code>originatorTypedId</code>, <code>originatorLabel</code>'."
},
"parentTabName": {
"type": "string",
"description": "The action parent's tab name."
},
"parentTypedId": {
"type": "string",
"description": "The action parent's typed id."
},
"pfxAcc_AG_revenueImpact": {
"type": "string",
"description": "The revenue impact."
},
"pfxAcc_AG_revenueImpactMeasureName": {
"type": "string",
"description": "The revenue impact measure name."
},
"pfxAcc_AG_targetImpact": {
"type": "number",
"description": "The action's target impact."
},
"pfxAcc_AG_targetImpact_MeasureName": {
"type": "string",
"description": "The action's target impact's name."
},
"status": {
"type": "string",
"description": "The action's status."
},
"summary": {
"type": "string",
"description": "The action's summary."
},
"uniqueName": {
"type": "string",
"description": "The action item's unique name."
},
"version": {
"type": "number",
"description": "The action's version."
}
}
}
}
}
}
Input or output parameters with unknown types are ignored by the MCP Server.