MCPcopy Create free account
hub / github.com/AI45Lab/Code / definitions

Method definitions

core/src/tools/registry.rs:119–129  ·  view source on GitHub ↗

Get all tool definitions for LLM

(&self)

Source from the content-addressed store, hash-verified

117
118 /// Get all tool definitions for LLM
119 pub fn definitions(&self) -> Vec<ToolDefinition> {
120 let tools = self.tools.read().unwrap();
121 tools
122 .values()
123 .map(|tool| ToolDefinition {
124 name: tool.name().to_string(),
125 description: tool.description().to_string(),
126 parameters: tool.parameters(),
127 })
128 .collect()
129 }
130
131 /// List all registered tool names
132 pub fn list(&self) -> Vec<String> {

Callers 1

Calls 3

nameMethod · 0.45
descriptionMethod · 0.45
parametersMethod · 0.45

Tested by 1