Skip to main content
Glama

Storyden

by Southclaws
Mozilla Public License 2.0
229
useLibraryIndexScreen.tsx819 B
import { useNodeList } from "src/api/openapi-client/nodes"; import { NodeListOKResponse } from "src/api/openapi-schema"; import { useSession } from "src/auth"; export type Props = { nodes: NodeListOKResponse; }; export function useLibraryIndexScreen(props: Props) { const session = useSession(); const { data: nodes, mutate: mutateNodes, error: errorNodes, } = useNodeList( {}, { swr: { fallbackData: props.nodes, }, }, ); if (!nodes) { return { ready: false as const, error: errorNodes, }; } const empty = nodes.nodes.length === 0; return { ready: true as const, empty, data: { nodes: { data: nodes, mutate: mutateNodes, }, }, mutate: { mutateNodes, }, session, }; }

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