{
  "before": {
    "name": "preview_search",
    "description": "Preview a local catalog query without making a network request.",
    "inputSchema": {
      "type": "object",
      "properties": {
        "query": {
          "type": "string",
          "minLength": 1
        },
        "limit": {
          "type": "integer",
          "minimum": 1,
          "maximum": 20
        }
      },
      "required": [
        "query"
      ],
      "additionalProperties": false
    },
    "annotations": {
      "readOnlyHint": true
    }
  },
  "after": {
    "name": "preview_search",
    "description": "Preview a local catalog query without making a network request.",
    "inputSchema": {
      "type": "object",
      "properties": {
        "query": {
          "type": "string",
          "minLength": 3
        },
        "limit": {
          "type": "integer",
          "minimum": 1,
          "maximum": 50
        }
      },
      "required": [
        "query"
      ],
      "additionalProperties": false
    },
    "annotations": {
      "readOnlyHint": true
    }
  },
  "cases": [
    {
      "name": "Old short query",
      "input": {
        "query": "UK",
        "limit": 10
      },
      "expect": "accept"
    },
    {
      "name": "Normal query",
      "input": {
        "query": "camera",
        "limit": 20
      },
      "expect": "accept"
    },
    {
      "name": "Expanded page size",
      "input": {
        "query": "camera",
        "limit": 50
      },
      "expect": "reject"
    },
    {
      "name": "Beyond the new limit",
      "input": {
        "query": "camera",
        "limit": 51
      },
      "expect": "reject"
    },
    {
      "name": "Missing query",
      "input": {
        "limit": 10
      },
      "expect": "reject"
    },
    {
      "name": "Undeclared sort",
      "input": {
        "query": "camera",
        "sort": "new"
      },
      "expect": "reject"
    }
  ]
}