Skip to main content
Glama
Cappybara12

OpenXAI MCP Server

by Cappybara12

list_datasets

Explore and filter available datasets in the OpenXAI framework by category, such as synthetic, real-world, tabular, image, or text, for evaluating and benchmarking AI explanation methods.

Instructions

List available datasets in OpenXAI framework

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
categoryNoFilter by dataset category (synthetic, real-world, tabular, image, text)

Implementation Reference

  • The core handler function for the 'list_datasets' tool. It defines hardcoded datasets categorized by type (synthetic, real-world, tabular, image, text) and filters them based on the input 'category' parameter (default 'all'). Returns a formatted text response with the list of datasets.
    async listDatasets(category) { const datasets = { synthetic: [ { name: 'synthetic_classification', description: 'Synthetic classification dataset with ground truth explanations', task: 'classification', features: 'Customizable number of features', samples: 'Customizable number of samples' }, { name: 'synthetic_regression', description: 'Synthetic regression dataset with ground truth explanations', task: 'regression', features: 'Customizable number of features', samples: 'Customizable number of samples' } ], 'real-world': [ { name: 'german', description: 'German Credit dataset - Binary classification for credit approval', task: 'classification', features: 20, samples: 1000, classes: 2 }, { name: 'compas', description: 'COMPAS Recidivism dataset - Binary classification for recidivism prediction', task: 'classification', features: 11, samples: 6172, classes: 2 }, { name: 'adult', description: 'Adult Income dataset - Binary classification for income prediction', task: 'classification', features: 14, samples: 48842, classes: 2 }, { name: 'folktable', description: 'ACS Folktables dataset - Various prediction tasks', task: 'classification', features: 'Variable', samples: 'Variable', classes: 'Variable' } ], tabular: [ 'german', 'compas', 'adult', 'folktable', 'synthetic_classification', 'synthetic_regression' ], image: [ { name: 'mnist', description: 'MNIST handwritten digits dataset', task: 'classification', features: '28x28 grayscale images', samples: 70000, classes: 10 }, { name: 'cifar10', description: 'CIFAR-10 object recognition dataset', task: 'classification', features: '32x32 color images', samples: 60000, classes: 10 } ], text: [ { name: 'imdb', description: 'IMDB Movie Review sentiment classification', task: 'classification', features: 'Text sequences', samples: 50000, classes: 2 } ] }; let result = []; if (category === 'all') { result = Object.values(datasets).flat(); } else { result = datasets[category] || []; } return { content: [ { type: 'text', text: `Available OpenXAI datasets (${category}):\n\n` + JSON.stringify(result, null, 2) } ] }; }
  • Input schema definition for the 'list_datasets' tool, specifying an optional 'category' parameter with allowed enum values.
    inputSchema: { type: 'object', properties: { category: { type: 'string', description: 'Filter by dataset category (synthetic, real-world, tabular, image, text)', enum: ['synthetic', 'real-world', 'tabular', 'image', 'text', 'all'] } }, required: [] }
  • index.js:38-52 (registration)
    Tool registration in the ListToolsRequestSchema handler, defining name, description, and inputSchema for 'list_datasets'.
    { name: 'list_datasets', description: 'List available datasets in OpenXAI framework', inputSchema: { type: 'object', properties: { category: { type: 'string', description: 'Filter by dataset category (synthetic, real-world, tabular, image, text)', enum: ['synthetic', 'real-world', 'tabular', 'image', 'text', 'all'] } }, required: [] } },
  • index.js:255-257 (registration)
    Dispatcher case in the CallToolRequestSchema handler that routes 'list_datasets' calls to the listDatasets method.
    case 'list_datasets': return await this.listDatasets(args.category || 'all');

Other Tools

Related 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/Cappybara12/mcpopenxAI'

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