Skip to main content
Glama
il-opendata-mcp

il-opendata-mcp

by Shtibel1

Count datastore records

count_records

Counts exact records in a data.gov.il datastore resource matching a search or filters without downloading rows, and optionally breaks counts down by one field.

Instructions

Exact number of records in a data.gov.il datastore resource that match optional q/filters, without downloading rows (datastore_search with limit 0). Optional group_by counts records per value of one field (up to 25 values, e.g. manufacturers or roles from list_field_values) and returns each count, its share of the total and the remainder ("other").

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "resource_id": "<resource_id>"
    },
    "name": "count_records"
  }
}

Input Schema

NameRequiredDescriptionDefault
qNoFull-text search across the datastore
filtersNoExact-match field filters. A list means "any of these", e.g. { "tozeret_nm": ["טויוטה יפן", "מאזדה יפן"], "shnat_yitzur": 2026 }
group_byNoOptional breakdown, e.g. { "field": "tozeret_nm", "values": ["טויוטה יפן", "קיה קוריאה"] }
resource_idYesCKAN resource UUID with datastore_active=true

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.6.0

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations supplied, the description carries the disclosure burden and does so: it explains the underlying call pattern (limit 0), that no rows are transferred, the 25-value cap on group_by, and what the response contains (per-value counts, share of total, and an 'other' remainder). It omits permission/auth requirements and failure behavior, so it is strong but not complete.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, front-loaded with the core purpose and then the optional grouping mode; nearly every clause carries information. It is dense with stacked parentheticals, which slightly taxes readability but does not waste space.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 4-parameter tool with a nested group_by object, no annotations, and no output schema, the description covers purpose, the read-only/no-download nature, grouping limits, and return shape. Remaining gaps are edge-case behavior such as invalid field names or results truncation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3; the description still adds meaning by characterizing q/filters as optional matching criteria and explaining that group_by breaks down one field with a bounded value set and produces share-of-total plus 'other' output semantics beyond the schema's structural definition.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource: exact count of records in a data.gov.il datastore resource matching optional q/filters. The parenthetical '(datastore_search with limit 0)' and 'without downloading rows' separate it cleanly from search_records, and the group_by clause describes an additional distinct capability.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Implies the selection condition well ('without downloading rows' → use this instead of fetching records), and routes to list_field_values for obtaining valid group_by values. It stops short of explicitly naming search_records as the alternative when actual rows are needed, so it is clear context rather than full when/when-not guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.