Skip to main content
Glama

export_impex

Export data from SAP Commerce Cloud to ImpEx format using FlexibleSearch queries for data migration or backup purposes.

Instructions

Export data to ImpEx format using a FlexibleSearch query

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
flexQueryYesFlexibleSearch query for data to export

Implementation Reference

  • The actual implementation of the export_impex tool, which executes a FlexibleSearch query and processes the result into ImpEx format using a Groovy script.
      async exportImpex(flexQuery: string): Promise<string> {
        // Use Groovy script for ImpEx export
        const escapedQuery = this.escapeGroovyString(flexQuery);
    
        const script = `
    try {
        def flexibleSearchService = spring.getBean("flexibleSearchService")
        def query = "${escapedQuery}"
        def searchResult = flexibleSearchService.search(query)
    
        if (searchResult.result.isEmpty()) {
            println "No results found for query"
            return "# No results found"
        }
    
        // Build ImpEx header from first item
        def firstItem = searchResult.result[0]
        def itemType = firstItem.itemtype  // Use lowercase 'itemtype' property
    
        def sb = new StringBuilder()
        sb.append("# Exported from FlexibleSearch: ").append(query).append("\\n")
        sb.append("# Result count: ").append(searchResult.totalCount).append("\\n\\n")
    
        // Simple export format
        sb.append("INSERT_UPDATE ").append(itemType).append(";pk[unique=true]\\n")
        searchResult.result.each { item ->
            sb.append(";").append(item.PK.toString()).append("\\n")
        }
    
        println "SUCCESS: Exported " + searchResult.result.size() + " items"
  • src/index.ts:244-257 (registration)
    MCP tool definition for 'export_impex'.
    {
      name: 'export_impex',
      description: 'Export data to ImpEx format using a FlexibleSearch query',
      inputSchema: {
        type: 'object',
        properties: {
          flexQuery: {
            type: 'string',
            description: 'FlexibleSearch query for data to export',
          },
        },
        required: ['flexQuery'],
      },
    },
  • Tool execution handler that calls hybrisClient.exportImpex when the 'export_impex' tool is invoked.
    case 'export_impex':
      result = await hybrisClient.exportImpex(
        validateString(args, 'flexQuery', true)
      );
      break;
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the action ('Export data') but doesn't reveal critical traits: whether this is a read-only operation, if it requires specific permissions, what the output looks like (e.g., file format, size limits), or any side effects (e.g., system load). For a tool with no annotation coverage, this leaves significant gaps in understanding its behavior.

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 function without unnecessary words. It is front-loaded with the core action ('Export data to ImpEx format') and includes the key mechanism. Every part of the sentence earns its place, making it highly concise and well-structured.

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 complexity of an export operation with no annotations and no output schema, the description is incomplete. It doesn't explain what the tool returns (e.g., a file, data stream, or status), potential errors, or integration details. For a tool that likely involves data transformation and output, more context is needed to understand its full scope and usage.

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 description adds minimal meaning beyond the input schema. It mentions 'using a FlexibleSearch query', which aligns with the 'flexQuery' parameter described in the schema (100% coverage). However, it doesn't provide additional context such as query syntax examples, valid data scopes, or constraints. With high schema coverage, the baseline is 3, as the description doesn't compensate with extra semantic 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 tool's purpose with a specific verb ('Export') and resource ('data to ImpEx format'), and mentions the mechanism ('using a FlexibleSearch query'). It distinguishes itself from siblings like 'import_impex' by focusing on export rather than import. However, it doesn't explicitly differentiate from other data retrieval tools like 'flexible_search' beyond the output format.

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. It doesn't mention prerequisites (e.g., when ImpEx export is needed over other formats), exclusions, or compare it to siblings like 'flexible_search' (which might retrieve data without export) or 'import_impex'. Usage is implied only by the tool's name and description, lacking explicit context.

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/mcieunic/hybris-mcp-main'

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