Skip to main content
Glama

export_databricks_bundle

Destructive

Export RLHF logs and proof artifacts as a Databricks-ready analytics bundle for persistent storage and retrieval across sessions.

Instructions

Export RLHF logs and proof artifacts as a Databricks-ready analytics bundle

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
outputPathNo

Implementation Reference

  • The implementation of exportDatabricksBundle, which generates a Databricks-ready analytics bundle by processing feedback and proof data.
    function exportDatabricksBundle(feedbackDir = getDefaultFeedbackDir(), outputPath, options = {}) {
      const resolvedFeedbackDir = path.resolve(feedbackDir || getDefaultFeedbackDir());
      const resolvedProofDir = path.resolve(options.proofDir || DEFAULT_PROOF_DIR);
      const exportedAt = new Date().toISOString();
      const bundlePath = path.resolve(outputPath || path.join(
        resolvedFeedbackDir,
        'analytics',
        `databricks-${timestampSlug()}`
      ));
      const tablesDir = path.join(bundlePath, 'tables');
      ensureDir(tablesDir);
    
      const datasets = [
        {
          tableName: 'feedback_events',
          sourcePath: path.join(resolvedFeedbackDir, 'feedback-log.jsonl'),
          description: 'Raw RLHF feedback events from feedback-log.jsonl',
        },
        {
          tableName: 'memory_records',
          sourcePath: path.join(resolvedFeedbackDir, 'memory-log.jsonl'),
          description: 'Promoted learning and mistake memories from memory-log.jsonl',
        },
        {
          tableName: 'feedback_sequences',
          sourcePath: path.join(resolvedFeedbackDir, 'feedback-sequences.jsonl'),
          description: 'Sequence-model training rows derived from accepted feedback',
        },
        {
          tableName: 'feedback_attributions',
          sourcePath: path.join(resolvedFeedbackDir, 'attributed-feedback.jsonl'),
          description: 'Tool-call attribution rows for negative feedback events',
        },
      ];
    
      const tables = datasets.map((dataset) => {
        const rows = annotateRows(
          readJSONL(dataset.sourcePath),
          dataset.tableName,
          path.basename(dataset.sourcePath),
          exportedAt,
        );
        const fileName = `${dataset.tableName}.jsonl`;
        const relativePath = toBundleRelativePath('tables', fileName);
        writeJSONL(path.join(tablesDir, fileName), rows);
        return {
          tableName: dataset.tableName,
          relativePath,
          rowCount: rows.length,
          description: dataset.description,
        };
      });
    
      const proofRows = collectProofReports(resolvedProofDir, exportedAt);
      const proofRelativePath = toBundleRelativePath('tables', 'proof_reports.jsonl');
      writeJSONL(path.join(tablesDir, 'proof_reports.jsonl'), proofRows);
      tables.push({
        tableName: 'proof_reports',
        relativePath: proofRelativePath,
        rowCount: proofRows.length,
        description: 'Machine-readable proof artifacts discovered under proof/**/*.json',
      });
    
      const manifest = {
        format: 'databricks-analytics-bundle',
        version: 1,
        exportedAt,
        bundlePath,
        feedbackDir: resolvedFeedbackDir,
        proofDir: resolvedProofDir,
        placeholders: {
          catalog: '__CATALOG__',
          schema: '__SCHEMA__',
          bundleRoot: '__BUNDLE_ROOT__',
        },
        tables,
      };
    
      const manifestPath = path.join(bundlePath, 'manifest.json');
      const sqlTemplatePath = path.join(bundlePath, 'load_databricks.sql');
      fs.writeFileSync(manifestPath, JSON.stringify(manifest, null, 2) + '\n');
      fs.writeFileSync(sqlTemplatePath, buildSqlTemplate(manifest) + '\n');
    
      return {
        bundlePath,
        manifestPath,
        sqlTemplatePath,
        tableCount: tables.length,
        totalRows: tables.reduce((sum, table) => sum + table.rowCount, 0),
        tables,
      };
    }
  • Tool handler registration for 'export_databricks_bundle' in the MCP server adapter.
    case 'export_databricks_bundle': {
      const outputPath = args.outputPath ? resolveSafePath(args.outputPath) : undefined;
      return toTextResult(exportDatabricksBundle(undefined, outputPath));
    }
Behavior3/5

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

Annotations indicate destructiveHint=true, but the description doesn't add behavioral context beyond this. It doesn't explain what 'destructive' means here (e.g., data deletion, side effects) or mention other traits like permissions or rate limits. With annotations covering safety, it adds minimal value but no contradiction.

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 front-loads the core purpose without unnecessary words. It's appropriately sized for a tool with one parameter and clear annotations.

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

Completeness2/5

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

Given the destructive annotation, lack of output schema, and 0% parameter coverage, the description is incomplete. It doesn't address what the export contains, how it's structured, or implications of the destructive behavior, leaving significant gaps for an agent to use it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, and the description provides no information about the 'outputPath' parameter. It doesn't explain what this path represents, expected format, or constraints, failing to compensate for the lack of schema details.

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 action ('Export') and the resource ('RLHF logs and proof artifacts'), specifying the output format ('Databricks-ready analytics bundle'). It distinguishes from siblings by focusing on export functionality, though it doesn't explicitly contrast with similar tools like 'export_dpo_pairs'.

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?

No guidance is provided on when to use this tool versus alternatives (e.g., 'export_dpo_pairs'), prerequisites, or typical use cases. The description implies it's for exporting analytics data but lacks context on timing or constraints.

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/IgorGanapolsky/mcp-memory-gateway'

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