resource_search
Locate and filter specific resources in the Datagov Israel MCP by querying field values, ordering results, and setting pagination for precise data retrieval.
Instructions
Find resources based on their field values.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| offset | No | ||
| order_by | No | ||
| query | No |
Implementation Reference
- server.py:89-102 (handler)The handler function for the 'resource_search' tool. It is decorated with @mcp.tool() for registration and implements the logic to search for resources via the Data.gov.il API using the provided query, order_by, offset, and limit parameters.@mcp.tool() async def resource_search(ctx: Context, query: str = "", order_by: str = "", offset: int = 0, limit: int = 100): """Find resources based on their field values.""" await ctx.info("Searching for resources...") params = { "query": query, "order_by": order_by, "offset": offset, "limit": limit } response = requests.get(f"{BASE_URL}/action/resource_search", params=params) response.raise_for_status() return response.json()