These tools are called by AI chatbots through the Model Context Protocol (MCP), not directly by users. The chatbot interprets your natural language requests and calls the appropriate tools to fulfill them.
Tool categories
The tools are organized into three categories:Datasets
Tools for working with static data files:- search_datasets - Search for datasets by keywords
- get_dataset_info - Get detailed metadata about a dataset
- list_dataset_resources - List all files in a dataset
- get_resource_info - Get detailed information about a file
- query_resource_data - Query tabular data from CSV/XLSX files
- download_and_parse_resource - Download and parse files directly
Dataservices
Tools for working with external third-party APIs registered in the data.gouv.fr catalog:- search_dataservices - Search for APIs by keywords
- get_dataservice_info - Get detailed metadata about an API
- get_dataservice_openapi_spec - Fetch and summarize the OpenAPI specification
Metrics
Tools for accessing usage statistics:- get_metrics - Get visit and download statistics for datasets and resources
Common workflows
Exploring datasets
The typical workflow for finding and analyzing dataset data:- Search - Use
search_datasetsto find datasets matching your keywords - Explore - Use
list_dataset_resourcesto see available files in a dataset - Preview - Use
query_resource_data(for CSV/XLSX) ordownload_and_parse_resource(for JSON/JSONL) to preview the data structure - Analyze - Query or download the full data as needed
Working with APIs
The typical workflow for discovering and using external APIs:- Search - Use
search_dataservicesto find APIs matching your keywords - Get details - Use
get_dataservice_infoto get metadata and documentation URLs - Understand the API - Use
get_dataservice_openapi_specto see available endpoints and parameters - Call the API - Use the
base_api_urland endpoint information from the spec
Search query tips
Bothsearch_datasets and search_dataservices use AND logic for multi-word queries:
- Use short, specific keywords for best results
- Generic words like “données”, “fichier”, “csv” are automatically filtered out
- If a query returns no results, try removing generic terms or using more specific keywords
Data access strategies
The MCP server provides two ways to access tabular data:Tabular API (query_resource_data)
- Best for: CSV and XLSX files, exploratory analysis, filtered queries
- Advantages: Fast, no download required, supports filtering and sorting
- Limitations: CSV files ≤ 100 MB, XLSX files ≤ 12.5 MB, maximum 200 rows per request
Direct download (download_and_parse_resource)
- Best for: JSON/JSONL files, large datasets, full data analysis
- Advantages: Supports more formats (CSV, CSV.GZ, JSON, JSONL), handles larger files
- Limitations: Downloads the entire file, slower for quick previews
Environment considerations
The server can connect to either:- Production:
https://www.data.gouv.fr(default) - Demo:
https://demo.data.gouv.fr(setDATAGOUV_API_ENV=demo)