Partition Tools Declaration

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 example MCP_tool_models_list. Try to use the same value in the JSON name field.

  • 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"
          }
        }
      }
    }
    

Tools with invalid JSON declarations are ignored by the MCP Server.

Input and Output Schema Type Definitions

The formats used to define property types in inputSchema and outputSchema are currently limited to the following subset of JSON Schema:

Type

Format

string

JSON
"type": "string"

integer

JSON
"type": "integer"

number

JSON
"type": "number"

boolean

JSON
"type": "boolean"

object

JSON
"type": "object"

date

JSON
"type": "string",
"format": "date"

datetime

JSON
"type": "string",
"format": "date-time"

array<T>

JSON
"type": "array",
"items": {
  [T Format]
}

map<string, T>

JSON
"type": "object",
"additionalProperties": {
  [T Format]
}

Examples

Type

Format

array<number>

JSON
"type": "array",
"items": {
  "type": "number"
}

array<date>

JSON
"type": "array",
"items": {
  "type": "string",
  "format": "date"
}

map<string, boolean>

JSON
"type": "object",
"additionalProperties": {
  "type": "boolean"
}

map<string, datetime>

JSON
"type": "object",
"additionalProperties": {
  "type": "string",
  "format": "date-time"
}

map<string, map< string, integer>>

JSON
"type": "object",
"additionalProperties": {
  "type": "object",
  "additionalProperties": {
    "type": "integer"
  }
}

Input or output parameters with unknown types are ignored by the MCP Server.