We are pleased to announce that we have recently rolled out several enhancements to the MCP server to improve the quality, accuracy and performance of agentic queries. These enhancements make natural-language querying through an LLM even more powerful and efficient than ever.
In particular:
- We’ve enabled querying metadata for statistical variables without overloading your LLM or agent with all the data at once. This allows the agent to first reason about data and its fit for the use case before retrieving all the data itself. Data can later be attributed properly in the results.
- We’ve improved querying for sub-national or “contained-in place” statistics by dedicating standalone tools for this use case.
- We’ve packaged a set of agentic skills as server resources. The skills provide “playbooks” for efficiently calling MCP tools. They ensure that any agent can benefit from detailed guidance on querying Data Commons.
You don’t have to do anything to take advantage of these updates; just fire up your usual agent to query the Data Commons MCP server.
Below are more details about the updates. If you have a custom instructions file for your agent, be sure to update it with this information.
New MCP tools
In addition to the original tools, we’ve added 4 new tools:
get_metadata: This tool provides detailed metadata about indicators in Data Commons, including the sources, date ranges of available data, and measurement method details. It answers queries such as:- “What are the sources of data you have about health in Egypt?”
- “How far back does your population data for Canada go?”
search_child_indicators: This allows for better searchability of indicators for contained-in places. It provides answers to queries such as:- “What census data do you have for the U.S. states?”
- “Do you have GDP data for Eastern European countries?”
get_child_observations: This provides more accurate results for observations about contained-in places. It provides answers to queries such as:- “Compare the life expectancy between different countries in South America.”
- “Rank-order the GDP for all countries in Eastern Europe.”
get_multi_entity_observations: This allows queries for observations involving directional relationships between entities (places), such as:- “What are the current rice exports from Sri Lanka to Australia?”
- “To which African countries has China provided the most financial aid?”
The original get_observations and search_indicators tools now only handle queries for single, specific places, e.g. “France”. For queries involving contained-in places, e.g. “all countries in South America”, the new get_child_observations and search_child_indicators are used instead.
New MCP skills
In addition to the new tools, we are now including skills to provide more guidance on Data Commons. The skills provide conceptual and functional overviews of Data Commons and recipes for sequencing tool calls, filtering and qualifying places, and handling responses.
We’ve refactored the original server instructions into 3 skills that provide much deeper guidance to agents for specific, common statistical research use cases, namely:
- Specific instructions for handling single-place observations and processing the results of
get_observationstool calls. - Specific instructions for handling contained-in place observations and processing the results of get_child_observations tool calls.
- Specific instructions for getting observations for places that have directional relationships with each other, and processing the results of
get_multi_entity_observationstool calls.
If you’re curious about the details, you can take a look at the packages/datacommons-mcp/datacommons_mcp/instructions/agent_api directory in the Data Commons agent-toolkit Github repo.