Skip to main content
Glama

Storyden

by Southclaws
Mozilla Public License 2.0
229
beacon.ts774 B
import { getSendBeaconMutationKey } from "@/api/openapi-client/misc"; import { DatagraphItemKind } from "@/api/openapi-schema"; import { API_ADDRESS } from "@/config"; /** * Send a beacon to track user activity for a specific item. * This uses the navigator.sendBeacon API for fire-and-forget tracking. * * @param kind - The type of item being tracked (thread, post, etc.) * @param id - The unique identifier of the item */ export function sendBeacon(kind: DatagraphItemKind, id: string): void { if (typeof navigator === "undefined" || !navigator.sendBeacon) { return; } const beaconData = JSON.stringify({ k: kind, id, }); const endpoint = `${API_ADDRESS}/api${getSendBeaconMutationKey()[0]}`; navigator.sendBeacon(endpoint, beaconData); }

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/Southclaws/storyden'

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