Submit Case Action
pega.submit_case_actionExecute actions on existing Pega cases by specifying case ID and action, with optional payloads and attachments for case management.
Instructions
Use this tool to execute an action on an existing case. Required inputs: caseId, action. Optional inputs: content, pageInstructions, attachments, eTag, viewType, pageName, originChannel. Returns: { ok: true, data: } on success. Standard failure format: { ok: false, error: { code, message, suggestion? } }.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| caseId | Yes | Unique case identifier/handle. | |
| action | Yes | Action identifier/name to execute. | |
| eTag | No | Optional optimistic-lock value sent as If-Match header. | |
| content | No | Optional action payload sent to the upstream endpoint. | |
| pageInstructions | No | Optional page instructions forwarded upstream. | |
| attachments | No | Optional action attachment operations. | |
| viewType | No | Optional response shape hint forwarded as query parameter. | |
| pageName | No | Optional page name query parameter used with viewType. | |
| originChannel | No | Optional channel hint, for example Web or Mobile. |
Implementation Reference
- src/client/pegaClient.ts:184-194 (handler)The actual implementation of the tool logic, located in the PegaClient class within the client module.
async submitCaseAction(input: { caseId: string; action: string; content?: Record<string, unknown>; pageInstructions?: unknown[]; attachments?: unknown[]; eTag?: string; viewType?: string; pageName?: string; originChannel?: string; }): Promise<CaseActionResult> { - src/tools/submitCaseAction.ts:5-19 (registration)Registration of the tool "pega.submit_case_action" using the framework's defineTool utility.
export const submitCaseActionToolDefinition = defineTool({ name: "pega.submit_case_action", title: "Submit Case Action", description: [ "Use this tool to execute an action on an existing case.", "Required inputs: caseId, action.", "Optional inputs: content, pageInstructions, attachments, eTag, viewType, pageName, originChannel.", "Returns: { ok: true, data: <action result> } on success." ].join(" "), inputSchema: submitCaseActionSchema, invalidInputMessage: "caseId and action are required", execute: async ({ pegaClient }, input) => { return withCaseAccessGuard(pegaClient, input, async () => pegaClient.submitCaseAction(input)); } });