package_search
Search for datasets on Israel's Data.gov.il using query terms and filters to find relevant government data packages.
Instructions
Find packages (datasets) matching query terms.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| q | No | ||
| fq | No | ||
| sort | No | ||
| rows | No | ||
| start | No | ||
| include_private | No |
Implementation Reference
- server.py:39-56 (handler)The package_search tool implementation. Registered with @mcp.tool() decorator. Defines input schema via function parameters with type hints and defaults. Handler logic constructs query parameters and performs HTTP GET request to the Data.gov.il CKAN API's package_search endpoint, returning the JSON response.@mcp.tool() async def package_search(ctx: Context, q: str = "", fq: str = "", sort: str = "", rows: int = 20, start: int = 0, include_private: bool = False): """Find packages (datasets) matching query terms.""" await ctx.info("Searching for packages...") params = { "q": q, "fq": fq, "sort": sort, "rows": rows, "start": start, "include_private": include_private } response = requests.get(f"{BASE_URL}/action/package_search", params=params) response.raise_for_status() return response.json()
- server.py:40-42 (schema)Input schema inferred from function signature: q (str), fq (str), sort (str), rows (int=20), start (int=0), include_private (bool=False).async def package_search(ctx: Context, q: str = "", fq: str = "", sort: str = "", rows: int = 20, start: int = 0, include_private: bool = False):