MCPcopy Create free account
hub / github.com/Louisym/MiniCC / tool_add

Function tool_add

tutorials/01_agentic_loop_basics.py:132–140  ·  view source on GitHub ↗

一个简单的加法工具。 输入: "2,2" 这样的字符串 输出: "4" 计算结果的字符串

(input_str: str)

Source from the content-addressed store, hash-verified

130# 对应源码: rust/crates/tools/src/lib.rs
131
132def tool_add(input_str: str) -> str:
133 """
134 一个简单的加法工具。
135 输入: "2,2" 这样的字符串
136 输出: "4" 计算结果的字符串
137 """
138 numbers = [int(x.strip()) for x in input_str.split(",")]
139 result = sum(numbers)
140 return str(result)
141
142
143# 工具注册表:名称 → 函数

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected