Skip to main content
Glama
translated

Lara Translate MCP Server

by translated

create_memory

Create a named translation memory to store reusable source-target text pairs for consistent future translations.

Instructions

Create a translation memory with a custom name in your Lara Translate account. Translation memories store pairs of source and target text segments (translation units) for reuse in future translations.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
external_idNoThe ID of the memory to be imported from MyMemory. Use this to initialize the memory with external content. Format: ext_my_[MyMemory ID]

Implementation Reference

  • The actual handler function that executes the create_memory tool. It validates args using createMemorySchema, then calls lara.memories.create(name, external_id).
    export async function createMemory(args: any, lara: Translator) {
      const validatedArgs = createMemorySchema.parse(args);
      const { name, external_id } = validatedArgs;
      return await lara.memories.create(name, external_id);
    }
  • Zod schema for create_memory input validation. Defines 'name' (required, string, max 250 chars) and 'external_id' (optional string for importing from MyMemory).
    export const createMemorySchema = z.object({
      name: z
        .string()
        .describe(
          "The name of the new memory, it should be short and generic, like 'catch_phrases' or 'brand_names'"
        )
        .refine((name) => name.length <= 250, {
          message: "Name of the memory can't be more than 250 characters",
        }),
      external_id: z
        .string()
        .describe(
          "The ID of the memory to be imported from MyMemory. Use this to initialize the memory with external content. Format: ext_my_[MyMemory ID]"
        )
        .optional(),
    });
  • src/mcp/tools.ts:51-51 (registration)
    Registration of create_memory in the handlers map, mapping the tool name to the createMemory handler function.
    create_memory: createMemory,
  • Tool definition registration including name, description, inputSchema, and annotations (title, readOnlyHint, destructiveHint, openWorldHint).
    {
      name: "create_memory",
      description:
        "Create a translation memory with a custom name in your Lara Translate account. Translation memories store pairs of source and target text segments (translation units) for reuse in future translations.",
      inputSchema: z.toJSONSchema(createMemorySchema),
      annotations: {
        title: "Create translation memory",
        readOnlyHint: false,
        destructiveHint: false,
        openWorldHint: false,
      },
    },
  • Narration/response formatting for create_memory tool results (e.g., 'Created translation memory "..."').
    case "create_memory":
      return `Created translation memory "${result?.name ?? args?.name ?? ""}"`;
Behavior3/5

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

Annotations already indicate readOnlyHint=false and destructiveHint=false, so the description adds limited behavioral context beyond stating 'stores pairs for reuse'. It does not disclose return value, authorization needs, or side effects, relying on annotations for safety profile.

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, front-loaded with the core action, and a brief follow-up explaining purpose. No wasted words.

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 creation tool with two parameters and no output schema, the description covers the key concept (recurring reuse) and mentions the optional external_id. It could mention the output or initial state, but overall sufficient.

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?

With 50% schema description coverage, the description adds context for 'external_id' (import from MyMemory) but not for 'name' beyond 'custom name'. It partially compensates for the missing schema descriptions.

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 verb 'create' and the resource 'translation memory', specifying that it stores translation units for reuse. While it distinguishes from siblings that create other entities (e.g., glossaries), it does not explicitly differentiate from similar creation tools.

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?

No explicit guidance on when or when not to use this tool, nor does it mention alternatives. The description implies usage for storing translation pairs but fails to provide decision-making 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/translated/lara-mcp'

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