Get Case Views
pega.get_case_viewsRetrieve metadata for a specific case view by providing case and view identifiers, enabling access to structured case information for integration or display purposes.
Instructions
Use this tool to retrieve metadata for a specific case view. Required inputs: caseId, viewId. Optional input: originChannel. Returns: { ok: true, data: { view: } } on success. Standard failure format: { ok: false, error: { code, message, suggestion? } }.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| caseId | Yes | Unique case identifier/handle. | |
| viewId | Yes | View identifier/name to retrieve for the case. | |
| originChannel | No | Optional channel hint, for example Web or Mobile. |
Implementation Reference
- src/tools/getCaseViews.ts:16-26 (handler)The execution handler for the pega.get_case_views tool, which uses the pegaClient to fetch case views while applying an access guard.
execute: async ({ pegaClient }, input) => { return withCaseAccessGuard(pegaClient, input, async () => { const view = await pegaClient.getCaseView(input.caseId, input.viewId, { originChannel: input.originChannel }); return { view }; }); } - src/tools/getCaseViews.ts:5-27 (registration)The full definition of the pega.get_case_views tool including name, schema, and handler.
export const getCaseViewsToolDefinition = defineTool({ name: "pega.get_case_views", title: "Get Case Views", description: [ "Use this tool to retrieve metadata for a specific case view.", "Required inputs: caseId, viewId.", "Optional input: originChannel.", "Returns: { ok: true, data: { view: <upstream payload> } } on success." ].join(" "), inputSchema: getCaseViewsSchema, invalidInputMessage: "caseId and viewId are required", execute: async ({ pegaClient }, input) => { return withCaseAccessGuard(pegaClient, input, async () => { const view = await pegaClient.getCaseView(input.caseId, input.viewId, { originChannel: input.originChannel }); return { view }; }); } });