MCPcopy Create free account
hub / github.com/ScriptedAlchemy/tracedecay / projectless_response

Function projectless_response

src/daemon.rs:2126–2155  ·  view source on GitHub ↗
(
    request: &crate::mcp::JsonRpcRequest,
    client_identity: &DaemonClientIdentity,
)

Source from the content-addressed store, hash-verified

2124
2125#[cfg(unix)]
2126async fn projectless_response(
2127 request: &crate::mcp::JsonRpcRequest,
2128 client_identity: &DaemonClientIdentity,
2129) -> Option<crate::mcp::JsonRpcResponse> {
2130 let id = request.id.clone()?;
2131 match request.method.as_str() {
2132 "initialize" => Some(JsonRpcResponse::success(
2133 id,
2134 json!({
2135 "protocolVersion": "2024-11-05",
2136 "capabilities": {
2137 "tools": {}
2138 },
2139 "serverInfo": {
2140 "name": "tracedecay",
2141 "version": env!("CARGO_PKG_VERSION")
2142 }
2143 }),
2144 )),
2145 "tools/call" => Some(
2146 projectless_tools_call_response(id, request.params.as_ref(), client_identity).await,
2147 ),
2148 "ping" | "logging/setLevel" => Some(JsonRpcResponse::success(id, json!({}))),
2149 _ => Some(JsonRpcResponse::error(
2150 id,
2151 ErrorCode::MethodNotFound,
2152 format!("Method not found: {}", request.method),
2153 )),
2154 }
2155}
2156
2157#[cfg(unix)]
2158async fn projectless_tools_call_response(

Callers 1

serve_projectless_clientFunction · 0.85

Calls 3

errorFunction · 0.85
as_strMethod · 0.45

Tested by

no test coverage detected