Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/tools/calculator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ impl ToolProvider for CalculatorTool {
Tool {
name: "calculator".to_string(),
description: "Advanced calculator supporting arithmetic, scientific, and trigonometric operations".to_string(),
input_schema: ToolInputSchema {
inputSchema: ToolInputSchema {
schema_type: "object".to_string(),
properties: schema_properties,
required: vec!["operation".to_string(), "a".to_string()],
Expand Down
2 changes: 1 addition & 1 deletion src/tools/file_system/directory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ impl ToolProvider for DirectoryTool {
Tool {
name: "directory".to_string(),
description: "Directory operations including create, list, and move files.".to_string(),
input_schema: ToolInputSchema {
inputSchema: ToolInputSchema {
schema_type: "object".to_string(),
properties: schema_properties,
required: vec!["operation".to_string()],
Expand Down
2 changes: 1 addition & 1 deletion src/tools/file_system/read.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ impl ToolProvider for ReadFileTool {
name: "read_file".to_string(),
description: "Read the complete contents of one or more files from the file system. \
Handles various text encodings and provides detailed error messages.".to_string(),
input_schema: ToolInputSchema {
inputSchema: ToolInputSchema {
schema_type: "object".to_string(),
properties: schema_properties,
required: vec!["operation".to_string()],
Expand Down
2 changes: 1 addition & 1 deletion src/tools/file_system/search.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ impl ToolProvider for SearchTool {
Tool {
name: "search".to_string(),
description: "Search for files and get file information.".to_string(),
input_schema: ToolInputSchema {
inputSchema: ToolInputSchema {
schema_type: "object".to_string(),
properties: schema_properties,
required: vec!["operation".to_string()],
Expand Down
2 changes: 1 addition & 1 deletion src/tools/file_system/write.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ impl ToolProvider for WriteFileTool {
Tool {
name: "write_file".to_string(),
description: "Write content to a file. Creates a new file or overwrites existing one.".to_string(),
input_schema: ToolInputSchema {
inputSchema: ToolInputSchema {
schema_type: "object".to_string(),
properties: schema_properties,
required: vec!["operation".to_string(), "path".to_string(), "content".to_string()],
Expand Down
2 changes: 1 addition & 1 deletion src/tools/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ impl ToolType {
pub struct Tool {
pub name: String,
pub description: String,
pub input_schema: ToolInputSchema,
pub inputSchema: ToolInputSchema,
}

#[derive(Clone, Debug, Serialize, Deserialize)]
Expand Down
4 changes: 2 additions & 2 deletions src/tools/test_tool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ impl ToolProvider for TestTool {
Tool {
name: "test_tool".to_string(),
description: "Test Tool".to_string(),
input_schema: serde_json::from_str(r#"{
inputSchema: serde_json::from_str(r#"{
"type": "object",
"properties": {
"test": {
Expand Down Expand Up @@ -54,7 +54,7 @@ impl ToolProvider for PingTool {
Tool {
name: "ping_tool".to_string(),
description: "Ping Tool".to_string(),
input_schema: serde_json::from_str(r#"{
inputSchema: serde_json::from_str(r#"{
"type": "object",
"properties": {
"server": {
Expand Down
3 changes: 1 addition & 2 deletions src/transport/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -249,8 +249,7 @@ impl SseTransport {
.stream(async_stream::stream! {
yield Ok::<_, warp::Error>(warp::sse::Event::default()
.event("endpoint")
.json_data(&EndpointEvent { endpoint })
.unwrap());
.data(endpoint));

let mut broadcast_rx = broadcast_rx;
while let Ok(msg) = broadcast_rx.recv().await {
Expand Down
2 changes: 1 addition & 1 deletion tests/tools.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ impl ToolProvider for MockCalculatorTool {
Tool {
name: "calculator".to_string(),
description: "Performs basic arithmetic operations".to_string(),
input_schema: ToolInputSchema {
inputSchema: ToolInputSchema {
schema_type: "object".to_string(),
properties,
required: vec!["operation", "a", "b"].iter().map(|s| s.to_string()).collect(),
Expand Down