Skip to content

Commit f5a8383

Browse files
authored
Fix arguments (#13)
* Fix arguments are always of type String * handle array types * just format & structured_content for tool responses * structured_content is nullable string
1 parent f35e336 commit f5a8383

File tree

2 files changed

+414
-23
lines changed

2 files changed

+414
-23
lines changed

src/connector.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,11 +322,17 @@ impl Connector for McpConnector {
322322
})
323323
.collect::<Vec<_>>();
324324

325+
let structured_content = result
326+
.structured_content
327+
.and_then(|content| serde_json::to_string(&content).ok());
328+
325329
// Convert content to a row
326330
let mut row = IndexMap::new();
327331
row.insert(
328332
"__value".into(),
329-
models::RowFieldValue(serde_json::json!({"content": contents})),
333+
models::RowFieldValue(serde_json::json!(
334+
{"content": contents, "structured_content": structured_content}
335+
)),
330336
);
331337
let rowset = models::RowSet {
332338
rows: Some(vec![row]),

0 commit comments

Comments
 (0)