Skip to main content
Glama
Cappybara12

OpenXAI MCP Server

by Cappybara12

list_explainers

Discover and filter available AI explanation methods like LIME, SHAP, and Grad-CAM using OpenXAI's standardized interface for evaluating and benchmarking models.

Instructions

List available explanation methods in OpenXAI

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
method_typeNoFilter by explanation method type

Implementation Reference

  • The handler function that lists available explanation methods (LIME, SHAP, etc.) filtered by methodType ('all', 'lime', etc.), returning a formatted text response with details.
    async listExplainers(methodType) { const explainers = { lime: { name: 'LIME (Local Interpretable Model-agnostic Explanations)', description: 'Local explanations by approximating the model locally with an interpretable model', supported_data_types: ['tabular', 'image', 'text'], explanation_type: 'local', model_agnostic: true }, shap: { name: 'SHAP (SHapley Additive exPlanations)', description: 'Feature attribution based on cooperative game theory', supported_data_types: ['tabular', 'image', 'text'], explanation_type: 'local', model_agnostic: true }, integrated_gradients: { name: 'Integrated Gradients', description: 'Attribution method based on gradients integrated along a path', supported_data_types: ['tabular', 'image', 'text'], explanation_type: 'local', model_agnostic: false, requires: 'PyTorch or TensorFlow model' }, gradcam: { name: 'Grad-CAM (Gradient-weighted Class Activation Mapping)', description: 'Visual explanations for CNN models using gradients', supported_data_types: ['image'], explanation_type: 'local', model_agnostic: false, requires: 'CNN model' }, guided_backprop: { name: 'Guided Backpropagation', description: 'Modified backpropagation for generating visual explanations', supported_data_types: ['image'], explanation_type: 'local', model_agnostic: false, requires: 'Neural network model' } }; let result = []; if (methodType === 'all') { result = Object.entries(explainers).map(([key, value]) => ({ method: key, ...value })); } else { result = explainers[methodType] ? [{ method: methodType, ...explainers[methodType] }] : []; } return { content: [ { type: 'text', text: `Available OpenXAI explanation methods:\n\n` + JSON.stringify(result, null, 2) } ] }; }
  • index.js:250-301 (registration)
    Registers the tool handler via switch case in CallToolRequestSchema handler, dispatching 'list_explainers' calls to this.listExplainers().
    this.server.setRequestHandler(CallToolRequestSchema, async (request) => { const { name, arguments: args } = request.params; try { switch (name) { case 'list_datasets': return await this.listDatasets(args.category || 'all'); case 'load_dataset': return await this.loadDataset(args.dataset_name, args.download); case 'list_models': return await this.listModels(args.dataset_name, args.model_type || 'all'); case 'load_model': return await this.loadModel(args.data_name, args.ml_model, args.pretrained); case 'list_explainers': return await this.listExplainers(args.method_type || 'all'); case 'generate_explanation': return await this.generateExplanation(args.method, args.data_sample, args.model_info); case 'list_metrics': return await this.listMetrics(args.metric_type || 'all'); case 'evaluate_explanation': return await this.evaluateExplanation(args.metric, args.explanation, args.model_info); case 'get_leaderboard': return await this.getLeaderboard(args.dataset, args.metric); case 'get_framework_info': return await this.getFrameworkInfo(args.info_type || 'overview'); case 'get_deployment_guide': return await this.getDeploymentGuide(args.deployment_type || 'quick_start'); default: throw new Error(`Unknown tool: ${name}`); } } catch (error) { return { content: [ { type: 'text', text: `Error: ${error.message}` } ] }; } });
  • index.js:115-129 (registration)
    Tool registration in ListToolsRequestSchema response, including name, description, and input schema definition.
    { name: 'list_explainers', description: 'List available explanation methods in OpenXAI', inputSchema: { type: 'object', properties: { method_type: { type: 'string', description: 'Filter by explanation method type', enum: ['lime', 'shap', 'integrated_gradients', 'gradcam', 'all'] } }, required: [] } },
  • Input schema for the list_explainers tool, defining optional method_type parameter with enum values.
    inputSchema: { type: 'object', properties: { method_type: { type: 'string', description: 'Filter by explanation method type', enum: ['lime', 'shap', 'integrated_gradients', 'gradcam', 'all'] } }, required: []

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