Skip to main content
Glama

Storyden

by Southclaws
Mozilla Public License 2.0
229
useComposeScreen.ts762 B
import { useEffect, useState } from "react"; import { threadGet } from "src/api/openapi-client/threads"; import { Thread } from "src/api/openapi-schema"; import { handle } from "@/api/client"; export type Props = { editing?: string }; export function useComposeScreen({ editing }: Props) { const [loadingDraft, setLoadingDraft] = useState(editing !== undefined); const [draft, setDraft] = useState<Thread | undefined>(undefined); useEffect(() => { handle( async () => { if (editing === undefined) return; const thread = await threadGet(editing); setDraft(thread); }, { cleanup: async () => setLoadingDraft(false), }, ); }, [editing]); return { loadingDraft, draft, }; }

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