Skip to main content
Glama
translated

Lara Translate MCP Server

by translated

get_glossary_counts

Read-only

Retrieve term and language counts for any glossary in your Lara Translate account using its unique glossary ID.

Instructions

Retrieves the term and language counts for a glossary in your Lara Translate account.

Input Schema

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

Implementation Reference

  • The main handler function that validates input via getGlossaryCountsSchema and calls lara.glossaries.counts(id) to retrieve glossary counts.
    export async function getGlossaryCounts(args: any, lara: Translator) {
      const validatedArgs = getGlossaryCountsSchema.parse(args);
      const { id } = validatedArgs;
    
      return await lara.glossaries.counts(id);
    }
  • Zod schema defining the input for get_glossary_counts: requires a string 'id' with pattern 'gls_*'.
    export const getGlossaryCountsSchema = 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:65-65 (registration)
    Registration of the getGlossaryCounts handler in the handlers map, keyed by tool name.
    get_glossary_counts: getGlossaryCounts,
  • Result formatting for get_glossary_counts in the ListTools response.
    case "get_glossary_counts":
      return `Glossary entry count: ${result?.unidirectional ?? result?.multidirectional ?? "retrieved"}`;
  • Tool definition/metadata including name, description, inputSchema, and annotations registered in the MCP ListTools response.
    {
      name: "get_glossary_counts",
      description:
        "Retrieves the term and language counts for a glossary in your Lara Translate account.",
      inputSchema: z.toJSONSchema(getGlossaryCountsSchema),
Behavior3/5

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

Annotations already indicate read-only and non-destructive behavior. The description adds that it returns term and language counts, but does not disclose additional behavioral traits like response format or pagination. Since annotations cover safety, this is adequate but not exceptional.

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 a single, concise sentence that front-loads the core action and resource. Every word is necessary with no redundancy.

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 read-only tool with one parameter and no output schema, the description covers the purpose and what counts are retrieved. It is complete enough for an agent to understand the tool's function, though the exact output structure is not specified.

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 a detailed description of the 'id' parameter, including format and pattern. With 100% schema coverage, the description adds no extra meaning beyond what the schema offers.

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 specific verb 'retrieves' and the resource 'term and language counts for a glossary', distinguishing it from sibling tools like get_glossary which likely returns full glossary details. It is precise and unambiguous.

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 retrieving counts, but it does not explicitly state when to use this tool over alternatives like get_glossary. No guidance on prerequisites or scenarios is provided.

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