Skip to main content
Glama
+server.ts1.03 kB
import type { RequestHandler } from './$types' import { json } from '@sveltejs/kit' import { ContentSyncService } from '$lib/server/contentSync' import { DEFAULT_REPOSITORY } from '$lib/presets' import { logErrorAlways } from '$lib/log' export const GET: RequestHandler = async () => { try { const stats = await ContentSyncService.getContentStats() const { owner, repo } = DEFAULT_REPOSITORY const isStale = await ContentSyncService.isRepositoryContentStale() return json({ success: true, repository: `${owner}/${repo}`, stats, isStale, isEmpty: stats.total_files === 0, message: stats.total_files === 0 ? 'Content table is empty. Content will be synced automatically on first preset request.' : `Content table contains ${stats.total_files} files`, timestamp: new Date().toISOString() }) } catch (error) { logErrorAlways('Error getting content status:', error) return json( { success: false, error: 'Failed to get content status' }, { status: 500 } ) } }

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/khromov/llmctx'

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