# MCP tool: events_pl

Zmiany obserwowanych działek i obszarów

## Description (verbatim)

Odczytaj zdarzenia z datami dla obszarów obserwowanych na koncie.

## Cost and binding

`x-request-cost`: 0 requests per call.

REST binding: [GET /v1/events/pl](../operations/events_pl.md).

## Inputs

Dokładnie jeden z parametrów q, id, point (lat i lng razem liczą się jako point). Wszystkie punkty odczytu API i wszystkie narzędzia obsługują te trzy warianty.

| Field | Required | Schema / constraints | Description |
| --- | --- | --- | --- |
| `as_of` | no | `{"$anchor": "p", "format": "date", "type": "string"}` | not specified in the source contract |
| `bbox` | no | `{"$anchor": "c", "items": {"$ref": "#q"}, "maxItems": 4, "minItems": 4, "prefixItems": [{"$ref": "#q", "maximum": 24.5, "minimum": 14}, {"$ref": "#q", "maximum": 55, "minimum": 49}, {"$ref": "#q", "maximum": 24.5, "minimum": 14}, {"$ref": "#q", "maximum": 55, "minimum": 49}], "type": "array"}` | not specified in the source contract |
| `cursor` | no | `{"$anchor": "b", "pattern": "^[0-9]{1,18}$", "type": "string"}` | not specified in the source contract |
| `id` | no | `{"$anchor": "s", "maxLength": 100, "pattern": "^\\s*[0-9]{6}[._][0-9]\\.[0-9]{1,4}\\.[0-9A-Za-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u024F_./ -]{0,63}[0-9A-Za-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u024F_./-]\\s*$", "type": "string"}` | not specified in the source contract |
| `kinds` | no | `{"$anchor": "j", "items": {"$ref": "#W"}, "maxItems": 7, "type": "array", "uniqueItems": true}` | not specified in the source contract |
| `limit` | no | `{"$anchor": "E", "maximum": 1000, "minimum": 1, "type": "integer"}` | not specified in the source contract |
| `since` | no | `{"$anchor": "p", "format": "date", "type": "string"}` | not specified in the source contract |

```json
{
  "inputSchema": {
    "$ref": "#/$defs/ah"
  }
}
```

## Structured results

Tools return `structuredContent (JSON)` using canonical definitions in `envelope.json`.

MCP tools share the published REST operations, evidence and billing contracts. Catalog-local definitions describe their structured input and output.

```json
{
  "$ref": "#m",
  "properties": {
    "meta": {
      "properties": {
        "operation": {
          "const": "events_pl"
        }
      }
    },
    "result": {
      "anyOf": [
        {
          "$ref": "#a",
          "additionalProperties": false,
          "minProperties": 2,
          "properties": {
            "events": {
              "$ref": "#c",
              "items": {
                "$ref": "#a",
                "additionalProperties": false,
                "allOf": [
                  {
                    "if": {
                      "$ref": "#/$defs/aT"
                    },
                    "then": {
                      "properties": {
                        "occurred_on": {
                          "type": "null"
                        }
                      },
                      "required": [
                        "presence"
                      ]
                    }
                  },
                  {
                    "if": {
                      "required": [
                        "presence"
                      ]
                    },
                    "then": {
                      "$ref": "#/$defs/aT"
                    }
                  }
                ],
                "if": {
                  "properties": {
                    "parcel_ids": {
                      "maxItems": 0
                    }
                  }
                },
                "patternProperties": {
                  "^(as_of|occurred_on)$(?!\\s)": {
                    "$ref": "#g"
                  },
                  "^(detect|register_observ)ed_on$(?!\\s)": {
                    "$ref": "#p"
                  }
                },
                "properties": {
                  "area_ids": {
                    "$ref": "#j",
                    "items": {
                      "$ref": "#b",
                      "pattern": "^[0-9]{1,19}$"
                    },
                    "maxItems": 10000
                  },
                  "gmina": {
                    "$ref": "#C"
                  },
                  "id": {
                    "$ref": "#f"
                  },
                  "kind": {
                    "$ref": "#W"
                  },
                  "parcel_ids": {
                    "$ref": "#/$defs/ax"
                  },
                  "presence": {
                    "$ref": "#a",
                    "additionalProperties": false,
                    "minProperties": 5,
                    "patternProperties": {
                      "^(fir|la)st_seen$(?!\\s)": {
                        "$ref": "#p"
                      }
                    },
                    "properties": {
                      "disclaimer": {
                        "$ref": "#d",
                        "maxLength": 2000
                      },
                      "portal": {
                        "enum": [
                          "otodom",
                          "olx",
                          "gratka"
                        ]
                      },
                      "url": {
                        "$ref": "#b",
                        "format": "uri",
                        "maxLength": 2048
                      }
                    }
                  },
                  "source": {
                    "$ref": "#u"
                  }
                },
                "required": [
                  "id",
                  "kind",
                  "parcel_ids",
                  "occurred_on",
                  "detected_on",
                  "source",
                  "as_of"
                ],
                "then": {
                  "required": [
                    "gmina"
                  ]
                }
              },
              "maxItems": 1000
            },
            "page": {
              "$ref": "#X"
            }
          }
        },
        {
          "type": "null"
        }
      ]
    }
  }
}
```

Shared catalog-local `$defs` are published once in [MCP catalogue](../mcp.md). See [Envelope](../envelope.md) and the bound operation for responses.

## Server instructions (verbatim)

Podawaj źródło, datę i zakres danych. Nie zapewniaj o bezpieczeństwie, braku zagrożeń przy brakujących danych ani o prawie do zabudowy. Rozróżniaj plan ogólny i MPZP oraz ich stan prawny. Kandydatów wybiera użytkownik. Bez danych tożsamości i KW. Wiersze RCN: konto płatne, poza okresem próbnym i testowym, LANDFEED_RCN_ROWS=on.

## Annotations

```json
{
  "readOnlyHint": true
}
```

## Coverage states

Cztery stany zakresu danych dla jednej kategorii w danym miejscu. covered: źródło obejmuje to miejsce i zawiera rekord; value zawiera ten rekord. covered_no_data: źródło obejmuje to miejsce, lecz nie zawiera rekordu; value ma określoną dla danej kategorii pustą wartość (false, 0, [], none), nigdy null; jest to potwierdzony brak rekordu, za który naliczana jest opłata. not_covered: źródło nie obejmuje miejsca albo państwo nie publikuje tych danych w postaci do odczytu maszynowego; value=null, agent nie może wyciągać wniosków, a opłata jest zwracana, gdy zapytanie dotyczy tych danych. not_computed: posiadamy źródło, lecz nie obliczyliśmy jeszcze wyniku dla tego miejsca, np. trwa ładowanie zbioru; value=null, opłata jest zwracana. Każdy stan zawiera uwagę napisaną prostym językiem.

States: `covered` | `covered_no_data` | `not_covered` | `not_computed`.

`LayerAnswer` required fields: `layer`, `coverage`, `value`, `note`, `source`, `as_of`, `layer_version`.

## Billing rule

Koszt żądania. charged: liczba naliczonych wywołań po zwrotach. refunded: liczba wywołań naliczonych, a następnie zwróconych. rule: zastosowana reguła. Płatne są odpowiedzi, potwierdzone braki rekordów (covered_no_data) i niejednoznaczne listy kandydatów. Bezpłatne są błędne dane wejściowe (400), brak uwierzytelnienia (401), odpowiedzi bez zmiany danych (304) i operacje bezpłatne. Zwrot obejmuje pozostałe 4xx, każde 5xx, status not_covered oraz odpowiedź dotyczącą jednej kategorii ze stanem not_covered lub not_computed. W operacjach zbiorczych liczby dotyczą poszczególnych elementów.

Rule values: `charged` | `free_operation` | `free_invalid_input` | `free_unauthorized` | `free_not_modified` | `free_idempotency_replay` | `refunded_client_error` | `refunded_server_error` | `refunded_not_covered` | `refunded_not_computed` | `batch_mixed` | `free_record_reuse`.

## curl example of the REST binding

```sh
curl --silent --show-error --request GET "https://api.landfeed.pl/v1/events/pl" --get \
  -H "X-Api-Key: ${LANDFEED_API_KEY}" \
  --data-urlencode 'id=141803_2.0001.12/3'
```

MCP transport invocation: not specified in the source contract.
