Skip to main content
Glama
Hug0x0

mcp-reunion

reunion_inspect_dataset

Retrieve a dataset's schema, fields, types, title, description, record count, and features to know which fields to filter on before querying.

Instructions

Inspect one dataset: return its schema (fields + types), title, description, record count, and features. Use this before calling reunion_query_dataset so you know which fields you can filter on.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataset_idYesDataset identifier as returned by reunion_search_catalog

Implementation Reference

  • The reunion_inspect_dataset tool handler. Takes a dataset_id, fetches metadata from the OpenDataSoft API via client.getDatasetMetadata(), and returns the dataset's schema (fields with name/type/label), title, description, records_count, and has_records flag.
    server.tool(
      'reunion_inspect_dataset',
      'Inspect one dataset: return its schema (fields + types), title, description, record count, and features. Use this before calling reunion_query_dataset so you know which fields you can filter on.',
      {
        dataset_id: z.string().describe('Dataset identifier as returned by reunion_search_catalog'),
      },
      async ({ dataset_id }) => {
        try {
          const meta = await client.getDatasetMetadata(dataset_id);
          if (!meta) {
            return jsonResult({ found: false, dataset_id });
          }
          const metas = meta.metas?.default ?? {};
          return jsonResult({
            found: true,
            dataset_id: meta.dataset_id,
            title: metas.title,
            description:
              typeof metas.description === 'string'
                ? metas.description.replace(/<[^>]+>/g, '').slice(0, 1000)
                : undefined,
            records_count: metas.records_count,
            has_records: meta.has_records,
            fields: meta.fields.map((f) => ({ name: f.name, type: f.type, label: f.label })),
          });
        } catch (error) {
          return errorResult(error instanceof Error ? error.message : 'Failed to inspect dataset');
        }
      }
    );
  • Input schema for reunion_inspect_dataset: requires a dataset_id string describing the dataset identifier as returned by reunion_search_catalog.
    {
      dataset_id: z.string().describe('Dataset identifier as returned by reunion_search_catalog'),
    },
  • The tool is registered via server.tool('reunion_inspect_dataset', ...) inside registerCatalogTools(), which is called from registerAllTools() in src/modules/index.ts, which is called from main() in src/index.ts.
    server.tool(
      'reunion_inspect_dataset',
      'Inspect one dataset: return its schema (fields + types), title, description, record count, and features. Use this before calling reunion_query_dataset so you know which fields you can filter on.',
      {
        dataset_id: z.string().describe('Dataset identifier as returned by reunion_search_catalog'),
      },
      async ({ dataset_id }) => {
        try {
          const meta = await client.getDatasetMetadata(dataset_id);
          if (!meta) {
            return jsonResult({ found: false, dataset_id });
          }
          const metas = meta.metas?.default ?? {};
          return jsonResult({
            found: true,
            dataset_id: meta.dataset_id,
            title: metas.title,
            description:
              typeof metas.description === 'string'
                ? metas.description.replace(/<[^>]+>/g, '').slice(0, 1000)
                : undefined,
            records_count: metas.records_count,
            has_records: meta.has_records,
            fields: meta.fields.map((f) => ({ name: f.name, type: f.type, label: f.label })),
          });
        } catch (error) {
          return errorResult(error instanceof Error ? error.message : 'Failed to inspect dataset');
        }
      }
    );
  • The getDatasetMetadata() method used by the handler to fetch dataset metadata from data.regionreunion.com API, with caching.
    async getDatasetMetadata(datasetId: string): Promise<DatasetMetadata | undefined> {
      if (!this.metadataCache.has(datasetId)) {
        const promise = this.fetchJson<CatalogResponse>(
          this.buildUrl('/catalog/datasets', {
            where: `dataset_id = ${quote(datasetId)}`,
            limit: 1,
          })
        ).then((data) => data.results[0]);
    
        this.metadataCache.set(datasetId, promise);
      }
    
      return this.metadataCache.get(datasetId);
    }
  • The jsonResult() and errorResult() helper functions used to format the tool's response.
    export function jsonResult(data: unknown): ToolResult {
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(data, null, 2),
          },
        ],
      };
    }
Behavior4/5

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

With no annotations provided, the description fully carries the burden. It lists returned data (schema, fields, types, title, description, record count, features) but doesn't mention error behavior or side effects. However, as an inspection tool, it's inherently read-only, and the description is sufficient.

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

Conciseness5/5

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

Two sentences that are front-loaded: first states action and outputs, second gives usage context. No wasted words, highly efficient.

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 simple tool with one parameter and no output schema, the description adequately covers what the tool does, what it returns, and when to use it. Minor omission of error scenarios, but not critical for a read-only inspection tool.

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 100% for the single parameter dataset_id, with a clear description in the schema. The description adds no extra meaning beyond the schema, so a baseline score of 3 is appropriate.

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?

Description clearly states the tool inspects a dataset and returns schema, title, description, record count, and features. It also distinguishes itself by recommending use before reunion_query_dataset, differentiating it from sibling search/get tools.

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?

Explicitly advises using this tool before reunion_query_dataset to know which fields to filter on. Provides a clear use case, though it doesn't specify when not to use it.

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/Hug0x0/mcp-reunion'

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