Skip to main content
Glama

bluente_translate_document_workflow

Translate documents while preserving formatting. Upload files, specify languages, and receive translated versions in PDF, DOCX, or XLSX formats.

Instructions

Run end-to-end translation: upload, start, poll until READY, and optionally download.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYes
fromYes
toYes
to_typeNodocx
engineNoLLM
glossaryNo
custom_glossaryNo
bilingualNoline
vertical_bilingualNo
scannedNo
namespaceNo
metadataNo
poll_interval_msNo
max_poll_attemptsNo
auto_downloadNo
status_entryNopdf
output_pathNo

Implementation Reference

  • The service method `runDocumentWorkflow` implements the core logic for the translation document workflow.
    async runDocumentWorkflow({
      filePath,
      from,
      to,
      toType,
      engine,
      glossary,
      customGlossary,
      bilingual,
      verticalBilingual,
      scanned,
      namespace,
      metadata,
      pollIntervalMs,
      maxPollAttempts,
      autoDownload,
      statusEntry = "pdf",
      outputPath
    }) {
      const uploadResult = await this.client.uploadFile({ filePath, engine, glossary });
      const id = uploadResult?.data?.id;
    
      if (!id) {
        throw new BluenteApiError("Upload completed but no task id was returned.", {
          uploadResult
        });
      }
    
      await this.client.translateFile({
        id,
        action: "start",
        from,
        to,
        engine,
        glossary,
        customGlossary,
        bilingual,
        verticalBilingual,
        scanned,
        namespace,
        metadata
      });
    
      let finalStatusPayload = null;
    
      for (let i = 0; i < maxPollAttempts; i += 1) {
        const statusPayload = await this.client.getTranslationStatus({ id, entry: statusEntry });
        finalStatusPayload = statusPayload;
        const status = statusPayload?.data?.status;
    
        if (TERMINAL_TRANSLATION_STATUSES.has(status)) {
          break;
        }
    
        await sleep(pollIntervalMs);
      }
    
      const finalStatus = finalStatusPayload?.data?.status;
      if (finalStatus !== "READY") {
        throw new BluenteApiError("Translation job did not reach READY state.", {
          id,
          finalStatus,
          finalStatusPayload
        });
      }
    
      const download = autoDownload
        ? await this.client.downloadFile({ id, toType, outputPath })
        : null;
    
      return {
        id,
        finalStatus,
        status: finalStatusPayload,
        download
      };
    }
  • Tool registration for 'bluente_translate_document_workflow', which calls the workflow service.
    export function registerTranslateDocumentWorkflowTool(server, { workflowService }) {
      server.tool(
        TOOL_NAME,
        "Run end-to-end translation: upload, start, poll until READY, and optionally download.",
        documentWorkflowSchema,
        async (args) =>
          executeTool(TOOL_NAME, async () =>
            workflowService.runDocumentWorkflow({
              filePath: args.file_path,
              from: args.from,
              to: args.to,
              toType: args.to_type,
              engine: args.engine,
              glossary: args.glossary,
              customGlossary: args.custom_glossary,
              bilingual: args.bilingual,
              verticalBilingual: args.vertical_bilingual,
              scanned: args.scanned,
              namespace: args.namespace,
              metadata: args.metadata,
              pollIntervalMs: args.poll_interval_ms,
              maxPollAttempts: args.max_poll_attempts,
              autoDownload: args.auto_download,
              statusEntry: args.status_entry,
              outputPath: args.output_path
            })
          )
      );
    }
Behavior3/5

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

With no annotations provided, the description carries the full burden. It successfully discloses the critical polling behavior ('poll until READY') and optional download, indicating this is a blocking, synchronous-feeling workflow. However, it omits error handling behavior (what happens if max_poll_attempts is reached), state cleanup, or side effects.

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

Conciseness4/5

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

The single sentence is front-loaded with information and contains no waste—every clause earns its place by describing the workflow stages. However, given the extreme complexity (17 parameters, 0% schema coverage), it may be inappropriately terse rather than ideally concise.

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?

For a complex 17-parameter workflow tool with zero schema descriptions and no output schema, a single-sentence description is insufficient. It lacks explanation of required parameters (beyond the schema), polling configuration semantics, or return value structure.

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?

Schema description coverage is 0%, and the description fails to compensate by mentioning any of the 17 parameters. Critical parameters like namespace, status_entry, custom_glossary vs glossary, vertical_bilingual, and scanned are completely undocumented in both schema and description.

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

Purpose5/5

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

The description clearly states the tool runs an 'end-to-end translation' workflow, specifying the exact composite actions (upload, start, poll, download) that distinguish it from atomic sibling tools like bluente_upload_file or bluente_translate_file.

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

Usage Guidelines3/5

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

The phrase 'end-to-end' and the explicit step enumeration (upload, poll, download) imply this is the high-level orchestration tool, suggesting when to use it versus individual atomic steps. However, there is no explicit 'when to use vs alternatives' guidance.

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/Bluente/bluente-translate'

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