Skip to main content
Glama

Convex MCP server

Official
by get-convex
walkMultipleDocuments.ts903 B
import { ValidatorJSON, Value } from "convex/values"; import { Walker } from "@common/elements/ObjectEditor/ast/ast"; import { ArrayNode, ConvexValidationError, } from "@common/elements/ObjectEditor/ast/types"; export function walkMultipleDocuments( array: ArrayNode, validator?: ValidatorJSON, ) { const startNodes = array.elements; const value: Value = []; const errors: ConvexValidationError[] = []; for (const node of startNodes) { if (node === null) { return { value: null, errors: [ new ConvexValidationError( "Arrays must not have empty elements", array.loc, ), ], }; } const walker = new Walker({ validator }); const { value: walkerValue, errors: walkErrors } = walker.walk(node, true); value.push(walkerValue); errors.push(...walkErrors); } return { value, errors }; }

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