Skip to main content
Glama
tifa365

Berlin Open Data MCP Server

by tifa365

berlin_get_dataset

Read-onlyIdempotent

Retrieve complete metadata and downloadable resources for Berlin open data datasets, including titles, descriptions, formats, and access URLs.

Instructions

Ruft vollstaendige Metadaten und Ressourcen eines Datensatzes ab.

Gibt Titel, Beschreibung, Autor, Lizenz, alle verfuegbaren
Dateiformate und Download-URLs zurueck.

Returns:
    Detaillierte Markdown-Ansicht des Datensatzes mit allen Ressourcen

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The implementation of the `berlin_get_dataset` tool handler.
    async def berlin_get_dataset(params: GetDatasetInput) -> str:
        """Ruft vollstaendige Metadaten und Ressourcen eines Datensatzes ab.
    
        Gibt Titel, Beschreibung, Autor, Lizenz, alle verfuegbaren
        Dateiformate und Download-URLs zurueck.
    
        Returns:
            Detaillierte Markdown-Ansicht des Datensatzes mit allen Ressourcen
        """
        try:
            result = await ckan_request("package_show", {"id": params.dataset_id})
    
            lines = [format_dataset_summary(result), "\n#### Ressourcen / Downloads\n"]
            for res in result.get("resources", []):
                lines.append(format_resource_info(res))
    
            # Extra metadata
            extras = {e["key"]: e["value"] for e in result.get("extras", [])}
            if extras:
                lines.append("\n#### Zusaetzliche Metadaten")
                for k, v in extras.items():
                    if not k.startswith("harvest"):
                        lines.append(f"- **{k}**: {v}")
    
            return "\n".join(lines)
  • The registration of the `berlin_get_dataset` tool via @mcp.tool.
    @mcp.tool(
        name="berlin_get_dataset",
        annotations={
            "title": "Datensatz-Details abrufen",
            "readOnlyHint": True,
            "destructiveHint": False,
            "idempotentHint": True,
            "openWorldHint": True,
        },
    )
  • The input schema (GetDatasetInput) for the `berlin_get_dataset` tool.
    class GetDatasetInput(BaseModel):
        """Input fuer Datensatz-Details."""
    
        model_config = ConfigDict(str_strip_whitespace=True, extra="forbid")
    
        dataset_id: str = Field(
            ...,
            description="ID oder Name des Datensatzes, z.B. 'einwohnerinnen-und-einwohner-berlin-lor-planungsraeume'",
            min_length=1,
        )
Behavior3/5

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

Annotations already provide readOnlyHint=true, destructiveHint=false, idempotentHint=true, and openWorldHint=true, covering safety and idempotency. The description adds value by specifying the return format ('detaillierte Markdown-Ansicht' - detailed Markdown view) and listing what metadata is included (title, description, author, license, file formats, download URLs). However, it doesn't disclose rate limits, authentication needs, or error behaviors beyond what annotations imply.

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 sized and front-loaded, starting with the core purpose. The two sentences efficiently convey what the tool does and what it returns. There's minimal waste, though the bilingual structure (German then English) is slightly redundant but not excessive.

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's complexity (simple read operation), rich annotations (readOnlyHint, idempotentHint, etc.), and the presence of an output schema, the description is reasonably complete. It explains the return content in detail, which complements the output schema. However, the lack of parameter discussion and usage guidelines leaves minor gaps.

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

Parameters3/5

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

Schema description coverage is 0%, so the description carries the burden. It doesn't mention the dataset_id parameter at all, leaving it undocumented. The schema provides a description and example for dataset_id, but the description adds no semantic context about parameters. With one parameter and no coverage, the baseline is 3 since the schema does provide some documentation.

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: 'Ruft vollstaendige Metadaten und Ressourcen eines Datensatzes ab' (retrieves complete metadata and resources of a dataset). It specifies the verb ('abrufen' - retrieve) and resource ('Datensatz' - dataset), distinguishing it from siblings like berlin_list_categories or berlin_search_datasets. However, it doesn't explicitly differentiate from berlin_analyze_datasets, which might have overlapping functionality.

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 when to choose this over berlin_search_datasets (which might return multiple datasets) or berlin_analyze_datasets (which might process dataset contents). There are no explicit usage contexts, exclusions, or prerequisites stated.

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