Skip to content

Commit ce5c46c

Browse files
committed
Preserver argument value
1 parent c2e531a commit ce5c46c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

toolcall/handler.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ static mcp::tools_call_request tools_call_request_from_local_json(nlohmann::json
189189
nlohmann::json j = json::parse(local_json);
190190
mcp::tool_arg_list args;
191191
for (const auto & [key, val] : j["parameters"].items()) {
192-
args.push_back({key, val.dump()});
192+
args.push_back({key, val});
193193
}
194194
return mcp::tools_call_request(id, j["name"], args);
195195
}

toolcall/mcp_messages.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ namespace mcp
230230

231231
struct tool_arg {
232232
std::string name;
233-
std::string value;
233+
nlohmann::json value;
234234
};
235235

236236
using tool_arg_list = std::vector<tool_arg>;

0 commit comments

Comments
 (0)