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');
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states what the tool does but doesn't describe how it behaves—such as whether it returns a paginated list, requires authentication, has rate limits, or what the output format looks like. This leaves significant gaps for a tool that presumably returns a list of datasets.

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?

The description is a single, efficient sentence that directly states the tool's purpose without any fluff or redundancy. It is appropriately sized and front-loaded, making it easy to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's low complexity (one optional parameter with full schema coverage) and lack of annotations or output schema, the description is minimally adequate. It covers the basic purpose but doesn't provide enough context about behavior or output to be fully complete, especially without annotations to fill in 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?

The input schema has 100% description coverage, including an enum for the 'category' parameter, so the schema already documents the parameter well. The description doesn't add any semantic details beyond what the schema provides, such as default behavior when no category is specified, which aligns with the baseline score for high schema coverage.

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 verb ('List') and resource ('available datasets in OpenXAI framework'), making the purpose specific and understandable. However, it doesn't explicitly differentiate from sibling tools like 'load_dataset' or 'list_models', which would be needed for a perfect score.

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 like 'load_dataset' or 'list_models'. It lacks any context about prerequisites, exclusions, or comparative use cases, leaving the agent with minimal direction.

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

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