Skip to main content
Glama
Cappybara12

OpenXAI MCP Server

by Cappybara12

list_datasets

Browse available datasets in the OpenXAI framework to select appropriate data for evaluating AI explanation methods. Filter by category to find synthetic, real-world, tabular, image, or text datasets.

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 primary handler function implementing the list_datasets tool logic. It defines datasets by category and filters/returns them based on the input category parameter (default 'all'), formatting as MCP content response.
    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) } ] }; }
  • The input schema for the list_datasets tool, specifying an optional 'category' string parameter with allowed enum values for filtering datasets.
    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)
    Registration of the list_datasets tool in the tools list returned by ListToolsRequestSchema handler.
    { 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)
    Dispatch/registration of the list_datasets handler in the CallToolRequestSchema switch statement.
    case 'list_datasets': return await this.listDatasets(args.category || 'all');

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