Skip to main content
Glama

Get Case Views

pega.get_case_views

Retrieve 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

TableJSON Schema
NameRequiredDescriptionDefault
caseIdYesUnique case identifier/handle.
viewIdYesView identifier/name to retrieve for the case.
originChannelNoOptional channel hint, for example Web or Mobile.

Implementation Reference

  • 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
        };
      });
    }
  • 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
          };
        });
      }
    });
Behavior4/5

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

With no annotations provided, the description carries the burden of disclosing behavior. It effectively documents the exact JSON response structure for both success and failure cases, compensating for the missing output schema. However, it doesn't mention idempotency, caching, or rate limiting characteristics.

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 structured logically with purpose first, then inputs, then outputs. It is appropriately concise with no redundant sentences, though the input listing is somewhat mechanical and could be integrated more fluidly.

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

Completeness4/5

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

Given the lack of output schema and annotations, the description adequately completes the documentation by manually specifying the return payload structure and error format. For a simple three-parameter retrieval tool, this provides sufficient context for invocation.

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

Parameters3/5

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

Schema description coverage is 100%, documenting all three parameters including originChannel's channel hint semantics. The description merely lists the parameter names and their required/optional status without adding syntax details, usage examples, or semantic context beyond what the schema provides.

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

Purpose4/5

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

The description clearly states the tool retrieves 'metadata for a specific case view' using specific verbs and resources. While it doesn't explicitly name sibling tools to differentiate from 'get_case' or 'get_case_actions', the target resource (view metadata) is distinct enough to avoid confusion.

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

Usage Guidelines2/5

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

The description lists required and optional inputs but provides no guidance on when to use this tool versus siblings like 'pega.get_case' or 'pega.get_case_actions'. There are no prerequisites, conditions, or exclusion criteria mentioned.

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

Install Server

Other Tools

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/amirmcs/Pega-MCP'

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