Skip to main content
Glama
values.ts864 B
import { mutation, query, action } from "./_generated/server"; import { compareValues, v } from "convex/values"; export const intQuery = query({ args: {}, handler: async () => { return 1n; }, }); export const intMutation = mutation({ args: {}, handler: async () => { return 1n; }, }); export const intAction = action({ args: {}, handler: async () => { return 1n; }, }); export const insertObject = mutation({ args: { obj: v.any() }, handler: async (ctx, { obj }) => { return ctx.db.insert("test", obj); }, }); export const getObject = query({ args: { id: v.id("test") }, handler: async (ctx, { id }) => { return ctx.db.get(id); }, }); export const compare = query({ args: { values: v.array(v.any()) }, handler: async (ctx, { values }) => { return values.sort((a, b) => compareValues(a, b)); }, });

Latest Blog Posts

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/get-convex/convex-backend'

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