Skip to main content
Glama

Search Cases

searchCases

Search cases in a queue with rich filters (multi-status, date ranges, label-based filters, and field-value filters over a typed queue's json_data). Use this when the simple query-string filters on GET /v2/queues/:queue_id/cases aren't enough. Each json_data entry is {path, operator, value} where path is a declared scalar in JSONPath dotted form ($.invoice.amount); entries are ANDed, so two comparisons on one path express a range. A path the queue's Case schema does not declare is rejected rather than ignored, as is a value that does not match the field's declared type. The contains operator is case-sensitive (unlike the free-text search parameter). Set count_only=true to skip Case row selection, enrichment, and transformation. The normal response shape is returned with cases: [] and the matching total.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
offsetNo
searchNo
filtersNo
sort_byNocreated_at
queue_idYesThe queue's unique identifier
count_onlyNoSkip Case row selection, enrichment, and transformation. The normal response shape contains an empty cases array and the matching total.
sort_orderNodesc

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / filters / properties / awaiting_my_approval
      Added value: +{
      +  "type": "boolean"
      +}
  2. Changed3 schema fields changed
    • addedInput schema / properties / filters / properties / created_at_to
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / filters / properties / json_data
      Added value: +{
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "operator": {
      +        "enum": [
      +          "equals",
      +          "notEquals",
      +          "in",
      +          "notIn",
      +          "gt",
      +          "gte",
      +          "lt",
      +          "lte",
      +          "contains",
      +          "isSet",
      +          "isNotSet"
      +        ],
      +        "type": "string"
      +      },
      +      "path": {
      +        "pattern": "^\\$(\\.[A-Za-z_][A-Za-z0-9_]{0,63})+$",
      +        "type": "string"
      +      },
      +      "value": {
      +        "anyOf": [
      +          {
      +            "anyOf": [
      +              {
      +                "type": "string"
      +              },
      +              {
      +                "type": "number"
      +              },
      +              {
      +                "type": "boolean"
      +              }
      +            ]
      +          },
      +          {
      +            "items": {
      +              "anyOf": [
      +                {
      +                  "type": "string"
      +                },
      +                {
      +                  "type": "number"
      +                },
      +                {
      +                  "type": "boolean"
      +                }
      +              ]
      +            },
      +            "maxItems": 100,
      +            "minItems": 1,
      +            "type": "array"
      +          }
      +        ]
      +      }
      +    },
      +    "required": [
      +      "path",
      +      "operator"
      +    ],
      +    "type": "object"
      +  },
      +  "maxItems": 12,
      +  "type": "array"
      +}
    • addedInput schema / properties / filters / properties / updated_at_to
      Added value: +{
      +  "type": "string"
      +}
  3. Changed1 schema field changed
    • addedInput schema / properties / filters / properties / issue_severity
      Added value: +{
      +  "items": {
      +    "enum": [
      +      "critical",
      +      "medium"
      +    ],
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
  4. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Adds substantial behavior beyond the annotations: entries are ANDed, undeclared paths and type-mismatched values are rejected rather than ignored, the contains operator is case-sensitive unlike free-text search, and count_only short-circuits row selection/enrichment. Note the annotations declare readOnlyHint=false and idempotentHint=false, which sits awkwardly with a pure search, but the description itself makes no misleading behavioral claim.

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?

Front-loaded with purpose and the when-to-use condition before detail, and most sentences carry non-obvious information. However, the two sentences on count_only restate the schema's parameter description almost verbatim, which is wasted space.

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?

For an 8-parameter search tool with no output schema, it covers the hardest parts (json_data grammar, validation failures, count_only return shape) and notes the normal response shape. It leaves the label-filter object shape, enum meanings, and pagination/sort behavior undocumented.

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?

With schema coverage at only 25% and a nested filters object, the description carries real weight: it explains the {path, operator, value} tuple, the JSONPath dotted form ('$.invoice.amount'), ANDing semantics, and the rejection rule for undeclared paths. It still says nothing about labels, status, sort, limit or offset semantics, so it does not fully close the coverage gap.

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?

States a specific verb and resource ('Search cases in a queue') and enumerates the filter families it supports (multi-status, date ranges, labels, field-value filters over json_data), which distinguishes it from plain case listing.

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

Usage Guidelines4/5

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

Explicitly says to use this 'when the simple query-string filters on GET /v2/queues/:queue_id/cases aren't enough', giving a clear selection condition against the simpler listing path. It does not explicitly name the sibling tool (listCases) nor state any when-not/exclusion conditions, so it stops short of a 5.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources