Skip to main content
Glama

update_terms

Modify term metadata like display text, context, references, or tags in POEditor translation projects by identifying terms with their current values.

Instructions

Update term metadata such as the display text, context, references, or tags. Identify each term by its current term/context values.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idNo
itemsYes

Implementation Reference

  • Handler function that executes the update_terms tool logic: maps input items to payload, calls POEditor 'terms/update' API via poeditor helper, and formats response.
    UpdateTermsInput.shape, async (args) => { const id = requireProjectId(args.project_id ?? null); const payload = args.items.map((item) => { const termData: Record<string, any> = { term: item.term, context: item.context ?? "" }; if (item.new_term) termData.new_term = item.new_term; if (item.new_context) termData.new_context = item.new_context; if (item.reference) termData.reference = item.reference; if (item.comment) termData.comment = item.comment; if (item.tags) termData.tags = item.tags; if (item.untranslatable !== undefined) { termData.untranslatable = item.untranslatable ? 1 : 0; } return termData; }); const data = JSON.stringify(payload); const res = await poeditor("terms/update", { id: String(id), data }); return { content: [{ type: "text", text: JSON.stringify(res.result ?? {}, null, 2) }] };
  • Zod input schema for update_terms tool defining project_id (optional) and array of items with current term/context and optional updates.
    const UpdateTermsInput = z.object({ project_id: z.number().int().positive().optional(), items: z.array(z.object({ term: z.string().min(1), context: z.string().optional(), new_term: z.string().optional(), new_context: z.string().optional(), reference: z.string().optional(), comment: z.string().optional(), tags: z.array(z.string()).optional(), untranslatable: z.boolean().optional() })).min(1) });
  • src/server.ts:258-283 (registration)
    Registration of the update_terms tool via server.tool() call, specifying name, description, schema, and inline handler function.
    server.tool( "update_terms", "Update term metadata such as the display text, context, references, or tags. Identify each term by its current term/context values.", UpdateTermsInput.shape, async (args) => { const id = requireProjectId(args.project_id ?? null); const payload = args.items.map((item) => { const termData: Record<string, any> = { term: item.term, context: item.context ?? "" }; if (item.new_term) termData.new_term = item.new_term; if (item.new_context) termData.new_context = item.new_context; if (item.reference) termData.reference = item.reference; if (item.comment) termData.comment = item.comment; if (item.tags) termData.tags = item.tags; if (item.untranslatable !== undefined) { termData.untranslatable = item.untranslatable ? 1 : 0; } return termData; }); const data = JSON.stringify(payload); const res = await poeditor("terms/update", { id: String(id), data }); return { content: [{ type: "text", text: JSON.stringify(res.result ?? {}, null, 2) }] }; }

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/ryan-shaw/poeditor-mcp'

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