Skip to main content
Glama

CodeGraph CLI MCP Server

by Jakedismo
edge.rs861 B
use codegraph_core::{EdgeId, EdgeType, NodeId}; use serde::{Deserialize, Serialize}; use std::collections::HashMap; #[derive(Debug, Clone, Serialize, Deserialize)] pub struct CodeEdge { pub id: EdgeId, pub from: NodeId, pub to: NodeId, pub edge_type: EdgeType, pub weight: f64, pub metadata: HashMap<String, String>, } impl CodeEdge { pub fn new(from: NodeId, to: NodeId, edge_type: EdgeType) -> Self { Self { id: EdgeId::new_v4(), from, to, edge_type, weight: 1.0, metadata: HashMap::new(), } } pub fn with_weight(mut self, weight: f64) -> Self { self.weight = weight; self } pub fn with_metadata(mut self, key: String, value: String) -> Self { self.metadata.insert(key, value); self } }

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/Jakedismo/codegraph-rust'

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