Skip to main content
Glama
aviveldan

Datagov Israel MCP

by aviveldan

datastore_search

Search Israeli government datasets by resource ID to find specific records, filter results, and retrieve structured data from Data.gov.il.

Instructions

Search a datastore resource.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
resource_idYes
qNo
distinctNo
plainNo
limitNo
offsetNo
fieldsNo
sortNo
include_totalNo
records_formatNoobjects

Implementation Reference

  • server.py:105-105 (registration)
    Registers the datastore_search function as an MCP tool using the @mcp.tool() decorator.
    @mcp.tool()
  • The handler function that implements the datastore_search tool logic: constructs query parameters from inputs and performs HTTP GET to the backend datastore_search endpoint, returning the JSON response.
    async def datastore_search(ctx: Context, resource_id: str, q: str = "",
                               distinct: bool = False, plain: bool = True,
                               limit: int = 100, offset: int = 0, fields: str = "",
                               sort: str = "", include_total: bool = True,
                               records_format: str = "objects"):
        """Search a datastore resource."""
        await ctx.info(f"Searching datastore for resource: {resource_id}")
        params = {
            "resource_id": resource_id,
            "q": q,
            "distinct": distinct,
            "plain": plain,
            "limit": limit,
            "offset": offset,
            "fields": fields,
            "sort": sort,
            "include_total": include_total,
            "records_format": records_format
        }
        response = requests.get(f"{BASE_URL}/action/datastore_search", params=params)
        response.raise_for_status()
        return response.json()
  • Input schema defined by function signature type hints and default values, plus docstring description for the datastore_search tool.
    async def datastore_search(ctx: Context, resource_id: str, q: str = "",
                               distinct: bool = False, plain: bool = True,
                               limit: int = 100, offset: int = 0, fields: str = "",
                               sort: str = "", include_total: bool = True,
                               records_format: str = "objects"):

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/aviveldan/datagov-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server