Skip to main content
Glama
tifa365

Berlin Open Data MCP Server

by tifa365

berlin_catalog_stats

Read-onlyIdempotent

Analyze Berlin's open data catalog to view total datasets, category distributions, common formats, and popular tags for data discovery and assessment.

Instructions

Gibt einen Ueberblick ueber den gesamten Open-Data-Katalog des Landes Berlin.

Zeigt Gesamtzahl der Datensaetze, Verteilung nach Kategorien,
haeufigste Formate und Tags.

Returns:
    Statistik-Uebersicht des Katalogs

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The implementation of the 'berlin_catalog_stats' tool, which queries the CKAN catalog and summarizes statistics.
    async def berlin_catalog_stats() -> str:
        """Gibt einen Ueberblick ueber den gesamten Open-Data-Katalog des Landes Berlin.
    
        Zeigt Gesamtzahl der Datensaetze, Verteilung nach Kategorien,
        haeufigste Formate und Tags.
    
        Returns:
            Statistik-Uebersicht des Katalogs
        """
        try:
            result = await ckan_request(
                "package_search",
                {
                    "q": "*:*",
                    "rows": 0,
                    "facet.field": '["groups", "res_format", "tags"]',
                    "facet.limit": "15",
                },
            )
            total = result["count"]
            facets = result.get("search_facets", result.get("facets", {}))
    
            lines = [
                "## Open Data Katalog – Land Berlin",
                f"**Gesamtzahl Datensaetze**: {total}\n",
                f"**Portal**: {PORTAL_URL}",
                "**Lizenzen**: CC0, CC-BY, Datenlizenz Deutschland (Zero/Namensnennung), GeoNutzV u.a.\n",
            ]
    
            # Groups
            if "groups" in facets:
                lines.append("### Kategorien")
                groups = facets["groups"]
                if isinstance(groups, dict):
                    items = groups.get("items", [])
                else:
                    items = groups if isinstance(groups, list) else []
                for item in sorted(items, key=lambda x: x.get("count", 0), reverse=True):
                    lines.append(f"- **{item.get('display_name', item.get('name', '?'))}**: {item.get('count', 0)}")
  • The registration of the 'berlin_catalog_stats' tool using the mcp.tool decorator.
    @mcp.tool(
        name="berlin_catalog_stats",
        annotations={
            "title": "Katalog-Statistiken",
            "readOnlyHint": True,
            "destructiveHint": False,
            "idempotentHint": True,
            "openWorldHint": True,
        },
    )
Behavior4/5

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

The description adds valuable context beyond annotations: it specifies what statistical information is returned (total datasets, category distribution, formats, tags). Annotations already declare readOnlyHint=true, openWorldHint=true, idempotentHint=true, and destructiveHint=false, so the agent knows it's a safe, cacheable read operation. The description doesn't contradict annotations and provides useful output details.

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?

The description is appropriately concise with three sentences (German overview, specific metrics, return statement). Each sentence adds value: the first establishes scope, the second lists specific statistics, the third clarifies the return. The bilingual nature (German/English) is slightly inefficient but not wasteful.

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?

Given the tool has 0 parameters, rich annotations (readOnly, openWorld, idempotent, destructive hints), and an output schema exists, the description provides adequate context. It explains what statistical overview is returned, which complements the structured data. For a simple statistical retrieval tool, this is reasonably complete, though usage guidance is missing.

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?

With 0 parameters and 100% schema description coverage, the baseline would be 4. The description appropriately doesn't discuss parameters since none exist. It focuses instead on what the tool returns, which is appropriate given the parameterless nature.

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

Purpose4/5

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

The description clearly states the tool's purpose: 'Gibt einen Ueberblick ueber den gesamten Open-Data-Katalog des Landes Berlin' (provides an overview of Berlin's open data catalog). It specifies what information is returned (total datasets, category distribution, common formats and tags). However, it doesn't explicitly differentiate from siblings like 'berlin_analyze_datasets' or 'berlin_list_categories' beyond the statistical focus.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention sibling tools like 'berlin_analyze_datasets' (which might provide deeper analysis) or 'berlin_list_categories' (which might list categories without statistics). There's no indication of prerequisites, timing, or context for choosing this statistical overview tool.

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

Install Server

Other 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/tifa365/berlin-opendata-mcp'

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