Skip to main content
Glama

convert_bo4e_to_edifact

Convert BO4E transaction data to EDIFACT format for German energy market communication using transformer.bee service.

Instructions

Convert a BO4E transaktion to its EDIFACT equivalent

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
transaktionYes
edifact_format_versionNo

Implementation Reference

  • Handler function for the 'convert_bo4e_to_edifact' tool. It retrieves the TransformerBeeClient from context, converts the provided BO4E transaction (BOneyComb) to EDIFACT format, handles errors, logs success, and returns the EDIFACT string. Registered via @mcp.tool decorator.
    @mcp.tool(description="Convert a BO4E transaktion to its EDIFACT equivalent") async def convert_bo4e_to_edifact( ctx: Context, # type:ignore[type-arg] # no idea what the second type arg is transaktion: BOneyComb, edifact_format_version: EdifactFormatVersion | None = None, ) -> str: """Tool that uses initialized resources""" if not edifact_format_version: edifact_format_version = get_current_edifact_format_version() client: TransformerBeeClient = ctx.request_context.lifespan_context.transformerbeeclient try: edifact = await client.convert_to_edifact(boney_comb=transaktion, edifact_format_version=edifact_format_version) except Exception: _logger.exception("Error while converting BO4E to edifact") raise await ctx.info(f"Successfully converted BO4E to EDIFACT with format version {edifact_format_version}") return edifact

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/Hochfrequenz/TransformerBee.mcp'

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