UNPKG

@roottale/cms-mcp

Version:

RootTale CMS MCP server and CLI for models, entries, exposures, media, integration docs, and public API access.

14 lines (10 loc) • 475 B
import { fetchContentModels, fetchAllPosts } from "@roottale/cms-client/server"; const apiKey = process.env.ROOTTALE_API_KEY!; export async function getTeamMembers() { const models = await fetchContentModels({ apiKey }); const model = models.find((candidate) => candidate.key === "team-member"); if (!model || model.preset !== "entity") return []; return fetchAllPosts({ apiKey, modelKey: model.key, limit: 100, maxPages: 100, cursorGuard: "repeated", }); }