We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/get-convex/convex-backend'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
export function indexFieldsForSyncObject(
syncSchema: any,
table: string,
index: string,
) {
const indexDefinition: any = syncSchema.tables[table].indexes.find(
(i: any) => i.indexDescriptor === index,
);
if (!indexDefinition) {
throw new Error(`Index ${index} not found for table ${table}`);
}
return indexDefinition.fields;
}
export function cursorForSyncObject(
syncSchema: any,
table: string,
index: string,
doc: any,
) {
const fields = indexFieldsForSyncObject(syncSchema, table, index);
// TODO: null is kind of wrong but we can't use undefined because it's not convex-json serializable
return {
kind: "exact" as const,
value: fields.map((field: string) => doc[field] ?? null),
};
}