Skip to main content
Glama
translated

Lara Translate MCP Server

by translated

get_glossary

Read-only

Retrieve a specific glossary from your Lara Translate account using its unique ID. Returns null if the glossary does not exist.

Instructions

Retrieves a specific glossary by ID from your Lara Translate account. Returns null if the glossary is not found.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesThe glossary ID (format: gls_*, e.g., 'gls_xyz123')

Implementation Reference

  • The getGlossary function executes the tool logic. It validates args using the schema, extracts the glossary 'id', and calls lara.glossaries.get(id) to retrieve the glossary.
    export async function getGlossary(args: unknown, lara: Translator) {
      const validatedArgs = getGlossarySchema.parse(args);
      const { id } = validatedArgs;
    
      return await lara.glossaries.get(id);
    }
  • The getGlossarySchema defines input validation: a required 'id' string (1-255 chars) matching the format gls_* (e.g., 'gls_xyz123').
    export const getGlossarySchema = 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')"),
    });
  • src/mcp/tools.ts:58-68 (registration)
    The handler is registered in the handlers map under the key 'get_glossary', mapping to the imported getGlossary function.
      get_glossary: getGlossary,
      create_glossary: createGlossary,
      update_glossary: updateGlossary,
      delete_glossary: deleteGlossary,
      import_glossary_csv: importGlossaryCsv,
      check_glossary_import_status: checkGlossaryImportStatus,
      export_glossary: exportGlossary,
      get_glossary_counts: getGlossaryCounts,
      add_glossary_entry: addGlossaryEntry,
      delete_glossary_entry: deleteGlossaryEntry,
    };
  • The tool definition in toolDefinitions array registers 'get_glossary' with its description, inputSchema, and annotations (readOnlyHint: true).
    {
      name: "get_glossary",
      description:
        "Retrieves a specific glossary by ID from your Lara Translate account. Returns null if the glossary is not found.",
      inputSchema: z.toJSONSchema(getGlossarySchema),
      annotations: {
        title: "Get glossary",
        readOnlyHint: true,
        destructiveHint: false,
        openWorldHint: false,
      },
    },
  • The narrate function handles the 'get_glossary' case, producing a user-readable summary like 'Retrieved glossary "..."'.
        case "get_glossary":
          return `Retrieved glossary "${result?.name ?? args?.id ?? ""}"`;
        case "create_glossary":
          return `Created glossary "${result?.name ?? args?.name ?? ""}"`;
        case "update_glossary":
          return `Renamed glossary to "${result?.name ?? args?.name ?? ""}"`;
        case "delete_glossary":
          return `Deleted glossary ${result?.id ?? args?.id ?? ""}`;
        case "add_glossary_entry":
          return "Added entry to glossary";
        case "delete_glossary_entry":
          return "Deleted entry from glossary";
        case "import_glossary_csv":
          return `Queued glossary CSV import${result?.id ? " (job " + result.id + ")" : ""}`;
        case "check_glossary_import_status":
          return `Glossary import status: ${result?.status ?? "unknown"}`;
        case "export_glossary":
          return "Exported glossary as CSV";
        case "get_glossary_counts":
          return `Glossary entry count: ${result?.unidirectional ?? result?.multidirectional ?? "retrieved"}`;
        default:
          return `${name} completed`;
      }
    }
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false. The description adds that it returns null if not found, which is useful context beyond the annotations.

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 two short, front-loaded sentences with no extraneous information. Every word adds value.

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 retrieval tool with one parameter and no output schema, the description covers purpose and null return behavior. It lacks details about the return object structure, but that is inferred.

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?

Schema description coverage is 100% and the parameter description in the schema already explains the format. The description does not add new semantic value beyond what is in the schema.

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 retrieves a specific glossary by ID from the Lara Translate account, using specific verb and resource. It distinguishes from siblings like list_glossaries, create_glossary, etc.

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 when you have a glossary ID but does not explicitly compare with alternatives like list_glossaries or provide when-not-to-use 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/translated/lara-mcp'

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