@translated/lara-mcp
Version:
Lara API official MCP server
16 lines (15 loc) • 597 B
JavaScript
import { z } from "zod/v4";
import { glossaryCountsSchema } from "./_schemas.js";
export const getGlossaryCountsOutputSchema = glossaryCountsSchema;
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')"),
});
export async function getGlossaryCounts(args, lara) {
const validatedArgs = getGlossaryCountsSchema.parse(args);
const { id } = validatedArgs;
return await lara.glossaries.counts(id);
}