Skip to main content
Glama
aviveldan

Datagov Israel MCP

by aviveldan

datastore_search

Search and retrieve data from specified resources in the Datagov Israel MCP datastore, with options to filter, sort, and limit results for precise queries.

Instructions

Search a datastore resource.

Input Schema

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

Implementation Reference

  • The handler function for the 'datastore_search' tool, decorated with @mcp.tool() for registration. It searches a datastore resource on Data.gov.il by making an API request with the provided parameters and returns the JSON response. The function signature defines the input schema.
    @mcp.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"): """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()
  • server.py:105-105 (registration)
    Registration of the datastore_search tool via the FastMCP @mcp.tool() decorator.
    @mcp.tool()
  • Input schema defined by function parameters with types and defaults, and docstring description.
    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"):

Other Tools

Related Tools

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