Skip to main content
Glama

Convex MCP server

Official
by get-convex
client.rs1.67 kB
use std::collections::BTreeMap; use common::{ bootstrap_model::components::definition::ComponentDefinitionMetadata, components::ComponentDefinitionPath, errors::JsError, }; use pb::common::{ function_result::Result as FunctionResultTypeProto, FunctionResult as FunctionResultProto, }; use value::JsonPackedValue; pub type EvaluateAppDefinitionsResult = BTreeMap<ComponentDefinitionPath, ComponentDefinitionMetadata>; #[derive(Clone, Debug)] #[cfg_attr( any(test, feature = "testing"), derive(proptest_derive::Arbitrary, PartialEq) )] pub struct FunctionResult { pub result: Result<JsonPackedValue, JsError>, } impl TryFrom<FunctionResultProto> for FunctionResult { type Error = anyhow::Error; fn try_from(result: FunctionResultProto) -> anyhow::Result<Self> { let result = match result.result { Some(FunctionResultTypeProto::JsonPackedValue(value)) => { Ok(JsonPackedValue::from_network(value)?) }, Some(FunctionResultTypeProto::JsError(js_error)) => Err(js_error.try_into()?), None => anyhow::bail!("Missing result"), }; Ok(FunctionResult { result }) } } impl TryFrom<FunctionResult> for FunctionResultProto { type Error = anyhow::Error; fn try_from(result: FunctionResult) -> anyhow::Result<Self> { let result = match result.result { Ok(value) => FunctionResultTypeProto::JsonPackedValue(value.as_str().to_owned()), Err(js_error) => FunctionResultTypeProto::JsError(js_error.try_into()?), }; Ok(FunctionResultProto { result: Some(result), }) } }

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