Skip to main content
Glama

mcp-google-sheets

folders-hooks.ts871 B
import { useQuery, useQueryClient } from '@tanstack/react-query'; import { authenticationSession } from '@/lib/authentication-session'; import { foldersApi } from './folders-api'; const folderListQueryKey = ['folders', authenticationSession.getProjectId()]; export const foldersHooks = { folderListQueryKey, useQueryClient: null as any, useFolders: () => { foldersHooks.useQueryClient = useQueryClient(); const folderQuery = useQuery({ queryKey: folderListQueryKey, queryFn: () => foldersApi.list(), }); return { folders: folderQuery.data, isLoading: folderQuery.isLoading, refetch: folderQuery.refetch, }; }, useFolder: (folderId: string) => { return useQuery({ queryKey: ['folder', folderId], queryFn: () => foldersApi.get(folderId), enabled: folderId !== 'NULL', }); }, };

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/activepieces/activepieces'

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