Skip to main content
Glama

exportWhiteboard

Export Heptabase whiteboards to markdown, JSON, or HTML formats with options to include cards, connections, and metadata for enhanced data organization and sharing.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
formatNomarkdown
includeCardsNo
includeConnectionsNo
includeMetadataNo
outputPathYes
whiteboardIdYes

Implementation Reference

  • Main handler function that fetches whiteboard data, generates export content in markdown, json, or html format, writes it to the specified output path, and returns a success message.
    export async function exportWhiteboard(
      dataService: HeptabaseDataService,
      params: z.infer<typeof exportWhiteboardSchema>
    ) {
      const data = await dataService.getWhiteboard(params.whiteboardId, {
        includeCards: params.includeCards,
        includeConnections: params.includeConnections
      });
    
      let content = '';
      
      switch (params.format) {
        case 'markdown':
          content = await generateMarkdownExport(data, params);
          break;
        case 'json':
          content = JSON.stringify(data, null, 2);
          break;
        case 'html':
          content = await generateHtmlExport(data, params);
          break;
      }
    
      await fs.mkdir(path.dirname(params.outputPath), { recursive: true });
      await fs.writeFile(params.outputPath, content, 'utf8');
    
      const response = [`Exported whiteboard to ${params.outputPath}`];
      if (params.includeMetadata) {
        response.push('Included metadata in export');
      }
    
      return {
        content: [{
          type: 'text',
          text: response.join('\n')
        }]
      };
    }
  • Zod schema defining the input parameters for the exportWhiteboard tool, including whiteboard ID, export format, inclusion flags, and output path.
    export const exportWhiteboardSchema = z.object({
      whiteboardId: z.string(),
      format: z.enum(['markdown', 'json', 'html']).optional().default('markdown'),
      includeCards: z.boolean().optional().default(true),
      includeConnections: z.boolean().optional().default(false),
      includeMetadata: z.boolean().optional().default(false),
      outputPath: z.string()
    });
  • src/server.ts:668-681 (registration)
    Tool registration in the MCP server: imports the handler and schema from export.ts, wraps the handler to ensure data service initialization, and registers it with this.server.tool.
    const { exportWhiteboard, summarizeWhiteboard, exportWhiteboardSchema, summarizeWhiteboardSchema } = require('./tools/export');
    
    // exportWhiteboard tool
    this.tools.exportWhiteboard = {
      inputSchema: exportWhiteboardSchema,
      handler: async (params) => {
        await this.ensureDataServiceInitialized();
        return exportWhiteboard(this.dataService, params);
      }
    };
    
    this.server.tool('exportWhiteboard', exportWhiteboardSchema.shape, async (params: z.infer<typeof exportWhiteboardSchema>) => {
      return this.tools.exportWhiteboard.handler(params);
    });
Behavior1/5

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

Tool has no description.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness1/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Tool has no description.

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

Completeness1/5

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

Tool has no description.

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

Parameters1/5

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

Tool has no description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose1/5

Does the description clearly state what the tool does and how it differs from similar tools?

Tool has no description.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines1/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Tool has no description.

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

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/LarryStanley/heptabse-mcp'

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