Skip to main content
Glama
translated

Lara Translate MCP Server

by translated

export_glossary

Read-only

Export a glossary from your Lara Translate account as CSV. Supports unidirectional with source language or multidirectional format.

Instructions

Exports a glossary as CSV from your Lara Translate account. Supports unidirectional and multidirectional formats.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesThe glossary ID (format: gls_*, e.g., 'gls_xyz123')
content_typeYesThe export format. 'csv/table-uni' for unidirectional (requires source parameter), 'csv/table-multi' for multidirectional
sourceNoThe source language code. Required when content_type is 'csv/table-uni'

Implementation Reference

  • The main handler function that executes the export_glossary tool logic. It validates arguments via the schema, then calls lara.glossaries.export().
    export async function exportGlossary(args: any, lara: Translator) {
      const validatedArgs = exportGlossarySchema.parse(args);
      const { id, content_type, source } = validatedArgs;
    
      return await lara.glossaries.export(id, content_type, source);
    }
  • Zod schema defining the input validation for export_glossary: requires id (gls_* format), content_type (csv/table-uni or csv/table-multi), and optional source (required for unidirectional export).
    export const exportGlossarySchema = z.object({
      id: z.string()
        .min(1)
        .max(255)
        .regex(/^gls_[a-zA-Z0-9_-]+$/, "Invalid glossary ID format")
        .describe("The glossary ID (format: gls_*, e.g., 'gls_xyz123')"),
      content_type: z
        .enum(["csv/table-uni", "csv/table-multi"])
        .describe("The export format. 'csv/table-uni' for unidirectional (requires source parameter), 'csv/table-multi' for multidirectional"),
      source: z
        .string()
        .optional()
        .describe("The source language code. Required when content_type is 'csv/table-uni'"),
    });
  • src/mcp/tools.ts:64-64 (registration)
    Registers exportGlossary handler in the handlers record so it can be dispatched by name 'export_glossary'.
    export_glossary: exportGlossary,
  • Tool definition registered in the MCP toolDefinitions array with name 'export_glossary', description, inputSchema, annotations (readOnlyHint: true), and invocation meta.
    {
      name: "export_glossary",
      description:
        "Exports a glossary as CSV from your Lara Translate account. Supports unidirectional and multidirectional formats.",
      inputSchema: z.toJSONSchema(exportGlossarySchema),
      annotations: {
        title: "Export glossary as CSV",
        readOnlyHint: true,
        destructiveHint: false,
        openWorldHint: false,
      },
      _meta: invocationMeta("Exporting glossary…", "Glossary exported"),
    },
  • Narration helper that produces the user-facing message 'Exported glossary as CSV' when this tool completes.
    case "export_glossary":
      return "Exported glossary as CSV";
Behavior3/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so the description's mention of 'Exports' is consistent and provides no additional disclosure beyond the format details. The description does not mention rate limits, auth requirements, or error 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?

Two sentences, no redundancy. Every word adds value. Front-loaded with the core action and account context.

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

Completeness4/5

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

For a simple export tool with well-covered schema and clear annotations, the description is mostly complete. It could mention that the glossary must exist or the output format (CSV) but the schema covers param details. No output schema reduces burden slightly.

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 input schema already provides full descriptions for all 3 parameters (100% coverage). The description adds only the note about supported formats, which minimally enhances understanding of the content_type parameter.

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 it exports a glossary as CSV from Lara Translate, and specifies it supports unidirectional and multidirectional formats. This distinguishes it from sibling tools like import_glossary_csv (imports) and get_glossary (likely retrieves in JSON or raw format).

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 description implies usage for exporting glossaries, but does not explicitly compare to alternatives like get_glossary or import_glossary_csv. No guidance on when to use this tool vs. listing or importing.

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/translated/lara-mcp'

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