Skip to main content
Glama
get-text-templates.ts836 B
import { type Tool } from 'fastmcp'; import { get } from '../../utils/requests.js'; import { textTemplatesSchema } from '../../schemas/settings.js'; import { emptyObject as parameters } from '../../utils/schema.js'; import { throwApiInvalidResponseError } from '../../utils/errors.js'; export const getTextTemplatesTool: Tool<undefined, typeof parameters> = { name: 'get_text_templates', description: 'Lists available language text templates which are used to create new proposals', parameters, annotations: { title: 'Get Language Text Templates', openWorldHint: true, }, async execute() { const result = await get('/settings/text-templates'); const parsed = textTemplatesSchema.safeParse(result); if (!parsed.success) { throwApiInvalidResponseError(parsed.error); } return JSON.stringify(parsed.data); }, };

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/offorte/offorte-mcp-server'

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