MCPcopy Create free account
hub / github.com/ChrisFeldmeier/OpenCodeRust / new

Method new

crates/opencode-mcp/src/tool.rs:15–28  ·  view source on GitHub ↗
(
        server_name: &str,
        name: &str,
        description: Option<String>,
        input_schema: serde_json::Value,
    )

Source from the content-addressed store, hash-verified

13
14impl McpTool {
15 pub fn new(
16 server_name: &str,
17 name: &str,
18 description: Option<String>,
19 input_schema: serde_json::Value,
20 ) -> Self {
21 Self {
22 server_name: server_name.to_string(),
23 name: name.to_string(),
24 full_name: format!("{}_{}", server_name, name),
25 description,
26 input_schema,
27 }
28 }
29}
30
31pub struct McpToolRegistry {

Callers

nothing calls this directly

Calls 1

newFunction · 0.85

Tested by

no test coverage detected