Skip to main content
Glama
debug.rs1.18 kB
use serde::{ Deserialize, Serialize, }; use telemetry::prelude::*; use telemetry_utils::metric; use crate::{ BeforeFunction, ComponentView, CycloneRequestable, }; #[derive(Clone, Debug, Deserialize, Eq, PartialEq, Serialize)] #[serde(rename_all = "camelCase")] pub struct DebugRequest { pub execution_id: String, pub handler: String, pub code_base64: String, pub component: ComponentView, pub debug_input: Option<serde_json::Value>, pub before: Vec<BeforeFunction>, } #[derive(Debug, Clone, Deserialize, Serialize)] #[serde(rename_all = "camelCase")] pub struct DebugResultSuccess { pub execution_id: String, pub output: serde_json::Value, pub error: Option<String>, } impl CycloneRequestable for DebugRequest { type Response = DebugResultSuccess; fn execution_id(&self) -> &str { &self.execution_id } fn kind(&self) -> &str { "debug" } fn websocket_path(&self) -> &str { "/execute/debug" } fn inc_run_metric(&self) { metric!(counter.function_run.debug = 1); } fn dec_run_metric(&self) { metric!(counter.function_run.debug = -1); } }

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/systeminit/si'

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