Skip to main content
Glama
marco-looy

Pega DX MCP Server

by marco-looy

recalculate_case_action_fields

Recalculate calculated fields and when conditions for a case action form based on current user input and state, with optional content merging.

Instructions

Recalculate calculated fields & whens for the current case action form. If no eTag is provided, automatically fetches the latest eTag from the case action for seamless operation. Executes field calculations and when conditions based on current form state and user input. Supports recalculating specific fields and when conditions, merging content updates, and applying page instructions during the calculation process. The API validates case and action IDs, processes calculation requests, and returns updated field values and states.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
caseIDYesCase ID. Example: "MYORG-APP-WORK C-1001". Complete identifier including spaces."ON6E5R-DIYRecipe-Work-RecipeCollection R-1008". a complete case identifier including spaces and special characters.
actionIDYesAction ID for case/stage action (Example: "pyUpdateCaseDetails", "pyApproval"). CRITICAL: Action IDs are CASE-SENSITIVE and have no spaces even if display names do ("Edit details" → "pyUpdateCaseDetails"). Use get_case to find correct ID from availableActions array - use "ID" field not "name" field.
eTagNoOptional. Auto-fetched if omitted. For faster execution, use eTag from previous response.
calculationsYesRequired object containing fields and when conditions to recalculate. Must contain at least one of fields or whens arrays.
contentNoOptional map of scalar properties and embedded page properties to be merged into the case during the recalculation process. Field values provided here will be available for use in calculations. Only fields that are present in the case action's view can be effectively utilized in calculations.
pageInstructionsNoOptional list of page-related operations for embedded pages, page lists, or page groups. Required for setting embedded page references.
originChannelNoOptional origin channel identifier for this service request. Indicates the source of the request for tracking and audit purposes. Examples: "Web", "Mobile", "WebChat". Default value is "Web" if not specified.
sessionCredentialsNoOptional session-specific credentials. If not provided, uses environment variables. Supports two authentication modes: (1) OAuth mode - provide baseUrl, clientId, and clientSecret, or (2) Token mode - provide baseUrl and accessToken.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed11 schema fields changedv1.0.0
    • changedInput schema / properties / actionID / description
      Previous value: -"Name of the case action - ID of the flow action rule. This corresponds to the Flow Action rule configured in the Pega application where field calculations are defined. Example: \"pyUpdateCaseDetails\", \"CompleteReview\", \"Approve\"."New value: +"Action ID for case/stage action (Example: \"pyUpdateCaseDetails\", \"pyApproval\"). CRITICAL: Action IDs are CASE-SENSITIVE and have no spaces even if display names do (\"Edit details\" → \"pyUpdateCaseDetails\"). Use get_case to find correct ID from availableActions array - use \"ID\" field not \"name\" field."
    • changedInput schema / properties / calculations / properties / fields / items / properties / name / description
      Previous value: -"Name of the field to recalculate. Must be a valid property reference within the case action view."New value: +"Name of the field to recalculate. a valid property reference within the case action view."
    • changedInput schema / properties / calculations / properties / whens / items / properties / name / description
      Previous value: -"Name of the when condition to recalculate. Must be a valid when rule reference accessible within the case action context."New value: +"Name of the when condition to recalculate. a valid when rule reference accessible within the case action context."
    • changedInput schema / properties / caseID / description
      Previous value: -"Full case handle (case ID) to perform field recalculation on. Format: {OrgID}-{AppName}-{CaseType} {CaseNumber}. Example: \"ON6E5R-DIYRecipe-Work-RecipeCollection R-1008\". Must be a complete case identifier including spaces and special characters."New value: +"Case ID. Example: \"MYORG-APP-WORK C-1001\". Complete identifier including spaces.\"ON6E5R-DIYRecipe-Work-RecipeCollection R-1008\". a complete case identifier including spaces and special characters."
    • changedInput schema / properties / eTag / description
      Previous value: -"Required eTag unique value representing the most recent save date time (pxSaveDateTime) of the case. This must be equal to the eTag header from the response of the most recent case update request, or from a get_case_action request for this case action. Used for optimistic locking to prevent concurrent modification conflicts."New value: +"Optional. Auto-fetched if omitted. For faster execution, use eTag from previous response."
    • changedInput schema / properties / pageInstructions / description
      Previous value: -"Optional list of page-related operations to be performed on embedded pages, page lists, or page group properties before recalculation. These operations allow manipulation of complex data structures that may affect calculation results. Each instruction specifies the operation type and target page structure."New value: +"Optional list of page-related operations for embedded pages, page lists, or page groups. Required for setting embedded page references."
    • addedInput schema / properties / pageInstructions / items / description
      Added value: +"Page operation for embedded pages. Use REPLACE instruction to set embedded page references with full object including pzInsKey. Example: {\"instruction\": \"REPLACE\", \"target\": \"PageName\", \"content\": {\"Property\": \"value\", \"pyID\": \"ID-123\", \"pzInsKey\": \"CLASS-NAME ID-123\"}}"
    • addedInput schema / properties / pageInstructions / items / properties
      Added value: +{
      +  "content": {
      +    "description": "Content to set on the embedded page (required for UPDATE and REPLACE)",
      +    "type": "object"
      +  },
      +  "instruction": {
      +    "description": "Page instruction type. UPDATE (add fields to page), REPLACE (replace entire page), DELETE (remove page), APPEND (add item to page list), INSERT (insert item in page list), MOVE (reorder page list items)",
      +    "enum": [
      +      "UPDATE",
      +      "REPLACE",
      +      "DELETE",
      +      "APPEND",
      +      "INSERT",
      +      "MOVE"
      +    ],
      +    "type": "string"
      +  },
      +  "target": {
      +    "description": "Target embedded page name",
      +    "type": "string"
      +  }
      +}
    • addedInput schema / properties / pageInstructions / items / required
      Added value: +[
      +  "instruction",
      +  "target"
      +]
    • addedInput schema / properties / sessionCredentials
      Added value: +{
      +  "description": "Optional session-specific credentials. If not provided, uses environment variables. Supports two authentication modes: (1) OAuth mode - provide baseUrl, clientId, and clientSecret, or (2) Token mode - provide baseUrl and accessToken.",
      +  "properties": {
      +    "accessToken": {
      +      "description": "Direct access token (required for token mode)",
      +      "type": "string"
      +    },
      +    "apiVersion": {
      +      "default": "v2",
      +      "description": "API version (optional, defaults to v2)",
      +      "type": "string"
      +    },
      +    "baseUrl": {
      +      "description": "Pega base URL (required if providing credentials)",
      +      "type": "string"
      +    },
      +    "clientId": {
      +      "description": "OAuth2 client ID (required for OAuth mode)",
      +      "type": "string"
      +    },
      +    "clientSecret": {
      +      "description": "OAuth2 client secret (required for OAuth mode)",
      +      "type": "string"
      +    },
      +    "sessionId": {
      +      "description": "Optional session ID. If not provided, a new session will be created.",
      +      "type": "string"
      +    },
      +    "tokenExpiry": {
      +      "description": "Token expiry in seconds from now (optional for token mode)",
      +      "type": "number"
      +    }
      +  },
      +  "type": "object"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "caseID",
      -  "actionID",
      -  "eTag",
      -  "calculations"
      -]New value: +[
      +  "caseID",
      +  "actionID",
      +  "calculations"
      +]
  2. First observed

TDQS

A4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden. It discloses validation of IDs, processing of calculations, merging content, and page instructions. It does not contradict annotations. However, it omits potential side effects like persistence or locking, but overall provides good behavioral context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is somewhat lengthy but each sentence contributes value. It is well-structured with the main purpose front-loaded. Minor verbosity but overall efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema is provided, and the description only vaguely mentions returning updated field values/states. For a complex tool with nested parameters, more detail on return structure would improve completeness. Sibling tools further highlight this gap.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, but the description adds meaningful context beyond the schema. It explains the purpose of each parameter (e.g., pageInstructions for embedded pages with examples), enhancing understanding for agents.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool recalculates calculated fields and whens for the current case action form, specifying a specific verb ('recalculate') and resource ('case action fields'). It distinguishes from siblings like recalculate_assignment_fields by focusing on case action context.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explains the process and auto-fetching behavior but does not explicitly state when to use this tool over alternatives or provide exclusions. Implicitly it's for recalculating after user input, but lacks clear guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/marco-looy/pega-dx-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server