{"$message_type":"diagnostic","message":"unresolved import `rust_mcp_sdk::schema::McpError`","code":{"code":"E0432","explanation":"An import was unresolved.\n\nErroneous code example:\n\n```compile_fail,E0432\nuse something::Foo; // error: unresolved import `something::Foo`.\n```\n\nIn Rust 2015, paths in `use` statements are relative to the crate root. To\nimport items relative to the current and parent modules, use the `self::` and\n`super::` prefixes, respectively.\n\nIn Rust 2018 or later, paths in `use` statements are relative to the current\nmodule unless they begin with the name of a crate or a literal `crate::`, in\nwhich case they start from the crate root. As in Rust 2015 code, the `self::`\nand `super::` prefixes refer to the current and parent modules respectively.\n\nAlso verify that you didn't misspell the import name and that the import exists\nin the module from where you tried to import it. Example:\n\n```\nuse self::something::Foo; // Ok.\n\nmod something {\n pub struct Foo;\n}\n# fn main() {}\n```\n\nIf you tried to use a module from an external crate and are using Rust 2015,\nyou may have missed the `extern crate` declaration (which is usually placed in\nthe crate root):\n\n```edition2015\nextern crate core; // Required to use the `core` crate in Rust 2015.\n\nuse core::any;\n# fn main() {}\n```\n\nSince Rust 2018 the `extern crate` declaration is not required and\nyou can instead just `use` it:\n\n```edition2018\nuse core::any; // No extern crate required in Rust 2018.\n# fn main() {}\n```\n"},"level":"error","spans":[{"file_name":"src\\main.rs","byte_start":245,"byte_end":253,"line_start":10,"line_end":10,"column_start":5,"column_end":13,"is_primary":true,"text":[{"text":" McpError, Tool,","highlight_start":5,"highlight_end":13}],"label":"no `McpError` in `schema`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"a similar name exists in the module","code":null,"level":"help","spans":[{"file_name":"src\\main.rs","byte_start":245,"byte_end":253,"line_start":10,"line_end":10,"column_start":5,"column_end":13,"is_primary":true,"text":[{"text":" McpError, Tool,","highlight_start":5,"highlight_end":13}],"label":null,"suggested_replacement":"RpcError","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[1m\u001b[91merror[E0432]\u001b[0m\u001b[1m\u001b[97m: unresolved import `rust_mcp_sdk::schema::McpError`\u001b[0m\n \u001b[1m\u001b[96m--> \u001b[0msrc\\main.rs:10:5\n \u001b[1m\u001b[96m|\u001b[0m\n\u001b[1m\u001b[96m10\u001b[0m \u001b[1m\u001b[96m|\u001b[0m McpError, Tool,\n \u001b[1m\u001b[96m|\u001b[0m \u001b[1m\u001b[91m^^^^^^^^\u001b[0m\n \u001b[1m\u001b[96m|\u001b[0m \u001b[1m\u001b[91m|\u001b[0m\n \u001b[1m\u001b[96m|\u001b[0m \u001b[1m\u001b[91mno `McpError` in `schema`\u001b[0m\n \u001b[1m\u001b[96m|\u001b[0m \u001b[1m\u001b[91mhelp: a similar name exists in the module: `RpcError`\u001b[0m\n\n"}
{"$message_type":"diagnostic","message":"method `list_tools` is not a member of trait `ServerHandler`","code":{"code":"E0407","explanation":"A definition of a method not in the implemented trait was given in a trait\nimplementation.\n\nErroneous code example:\n\n```compile_fail,E0407\ntrait Foo {\n fn a();\n}\n\nstruct Bar;\n\nimpl Foo for Bar {\n fn a() {}\n fn b() {} // error: method `b` is not a member of trait `Foo`\n}\n```\n\nPlease verify you didn't misspell the method name and you used the correct\ntrait. First example:\n\n```\ntrait Foo {\n fn a();\n fn b();\n}\n\nstruct Bar;\n\nimpl Foo for Bar {\n fn a() {}\n fn b() {} // ok!\n}\n```\n\nSecond example:\n\n```\ntrait Foo {\n fn a();\n}\n\nstruct Bar;\n\nimpl Foo for Bar {\n fn a() {}\n}\n\nimpl Bar {\n fn b() {}\n}\n```\n"},"level":"error","spans":[{"file_name":"src\\main.rs","byte_start":543,"byte_end":1836,"line_start":25,"line_end":49,"column_start":5,"column_end":6,"is_primary":true,"text":[{"text":" async fn list_tools(&self, _request: ListToolsRequest) -> Result<ListToolsResult, McpError> {","highlight_start":5,"highlight_end":98},{"text":" Ok(ListToolsResult {","highlight_start":1,"highlight_end":29},{"text":" tools: vec![","highlight_start":1,"highlight_end":25},{"text":" Tool {","highlight_start":1,"highlight_end":23},{"text":" name: \"enqueue_output\".to_string(),","highlight_start":1,"highlight_end":56},{"text":" description: Some(\"AIエージェントの出力を承認待ちスタックに追加します。\".to_string()),","highlight_start":1,"highlight_end":82},{"text":" input_schema: serde_json::json!({","highlight_start":1,"highlight_end":54},{"text":" \"type\": \"object\",","highlight_start":1,"highlight_end":42},{"text":" \"properties\": {","highlight_start":1,"highlight_end":40},{"text":" \"target\": { \"type\": \"string\", \"description\": \"送信先(slack, webhook, etc.)\" },","highlight_start":1,"highlight_end":104},{"text":" \"content\": { \"type\": \"string\", \"description\": \"送信内容\" },","highlight_start":1,"highlight_end":84},{"text":" \"metadata\": { \"type\": \"string\", \"description\": \"追加情報(任意)\" }","highlight_start":1,"highlight_end":88},{"text":" },","highlight_start":1,"highlight_end":27},{"text":" \"required\": [\"target\", \"content\"]","highlight_start":1,"highlight_end":58},{"text":" }),","highlight_start":1,"highlight_end":24},{"text":" },","highlight_start":1,"highlight_end":19},{"text":" Tool {","highlight_start":1,"highlight_end":23},{"text":" name: \"list_pending\".to_string(),","highlight_start":1,"highlight_end":54},{"text":" description: Some(\"承認待ちの出力依頼を一覧表示します。\".to_string()),","highlight_start":1,"highlight_end":73},{"text":" input_schema: serde_json::json!({ \"type\": \"object\", \"properties\": {} }),","highlight_start":1,"highlight_end":93},{"text":" },","highlight_start":1,"highlight_end":19},{"text":" ],","highlight_start":1,"highlight_end":15},{"text":" next_cursor: None,","highlight_start":1,"highlight_end":31},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" }","highlight_start":1,"highlight_end":6}],"label":"not a member of trait `ServerHandler`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"\u001b[1m\u001b[91merror[E0407]\u001b[0m\u001b[1m\u001b[97m: method `list_tools` is not a member of trait `ServerHandler`\u001b[0m\n \u001b[1m\u001b[96m--> \u001b[0msrc\\main.rs:25:5\n \u001b[1m\u001b[96m|\u001b[0m\n\u001b[1m\u001b[96m25\u001b[0m \u001b[1m\u001b[96m|\u001b[0m \u001b[1m\u001b[91m/\u001b[0m async fn list_tools(&self, _request: ListToolsRequest) -> Result<ListToolsResult, McpError> {\n\u001b[1m\u001b[96m26\u001b[0m \u001b[1m\u001b[96m|\u001b[0m \u001b[1m\u001b[91m|\u001b[0m Ok(ListToolsResult {\n\u001b[1m\u001b[96m27\u001b[0m \u001b[1m\u001b[96m|\u001b[0m \u001b[1m\u001b[91m|\u001b[0m tools: vec![\n\u001b[1m\u001b[96m28\u001b[0m \u001b[1m\u001b[96m|\u001b[0m \u001b[1m\u001b[91m|\u001b[0m Tool {\n\u001b[1m\u001b[96m...\u001b[0m \u001b[1m\u001b[91m|\u001b[0m\n\u001b[1m\u001b[96m48\u001b[0m \u001b[1m\u001b[96m|\u001b[0m \u001b[1m\u001b[91m|\u001b[0m })\n\u001b[1m\u001b[96m49\u001b[0m \u001b[1m\u001b[96m|\u001b[0m \u001b[1m\u001b[91m|\u001b[0m }\n \u001b[1m\u001b[96m|\u001b[0m \u001b[1m\u001b[91m|_____^\u001b[0m \u001b[1m\u001b[91mnot a member of trait `ServerHandler`\u001b[0m\n\n"}
{"$message_type":"diagnostic","message":"method `call_tool` is not a member of trait `ServerHandler`","code":{"code":"E0407","explanation":"A definition of a method not in the implemented trait was given in a trait\nimplementation.\n\nErroneous code example:\n\n```compile_fail,E0407\ntrait Foo {\n fn a();\n}\n\nstruct Bar;\n\nimpl Foo for Bar {\n fn a() {}\n fn b() {} // error: method `b` is not a member of trait `Foo`\n}\n```\n\nPlease verify you didn't misspell the method name and you used the correct\ntrait. First example:\n\n```\ntrait Foo {\n fn a();\n fn b();\n}\n\nstruct Bar;\n\nimpl Foo for Bar {\n fn a() {}\n fn b() {} // ok!\n}\n```\n\nSecond example:\n\n```\ntrait Foo {\n fn a();\n}\n\nstruct Bar;\n\nimpl Foo for Bar {\n fn a() {}\n}\n\nimpl Bar {\n fn b() {}\n}\n```\n"},"level":"error","spans":[{"file_name":"src\\main.rs","byte_start":1842,"byte_end":3546,"line_start":51,"line_end":86,"column_start":5,"column_end":6,"is_primary":true,"text":[{"text":" async fn call_tool(&self, request: CallToolRequest) -> Result<CallToolResult, McpError> {","highlight_start":5,"highlight_end":94},{"text":" match request.name.as_str() {","highlight_start":1,"highlight_end":38},{"text":" \"enqueue_output\" => {","highlight_start":1,"highlight_end":34},{"text":" let params = request.arguments.unwrap_or_default();","highlight_start":1,"highlight_end":68},{"text":" let target = params[\"target\"].as_str().unwrap_or(\"unknown\");","highlight_start":1,"highlight_end":77},{"text":" let content = params[\"content\"].as_str().unwrap_or(\"\");","highlight_start":1,"highlight_end":72},{"text":" let metadata = params[\"metadata\"].as_str();","highlight_start":1,"highlight_end":60},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let db = self.db.lock().await;","highlight_start":1,"highlight_end":47},{"text":" match db.enqueue(target, content, metadata) {","highlight_start":1,"highlight_end":62},{"text":" Ok(id) => Ok(CallToolResult {","highlight_start":1,"highlight_end":50},{"text":" content: vec![serde_json::json!({","highlight_start":1,"highlight_end":58},{"text":" \"type\": \"text\",","highlight_start":1,"highlight_end":44},{"text":" \"text\": format!(\"出力がスタックに追加されました。ID: {}\", id)","highlight_start":1,"highlight_end":74},{"text":" }).into()],","highlight_start":1,"highlight_end":36},{"text":" is_error: None,","highlight_start":1,"highlight_end":40},{"text":" }),","highlight_start":1,"highlight_end":24},{"text":" Err(e) => Err(McpError::internal_error(format!(\"Failed to enqueue: {}\", e))),","highlight_start":1,"highlight_end":98},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" \"list_pending\" => {","highlight_start":1,"highlight_end":32},{"text":" let db = self.db.lock().await;","highlight_start":1,"highlight_end":47},{"text":" match db.list_pending() {","highlight_start":1,"highlight_end":42},{"text":" Ok(items) => Ok(CallToolResult {","highlight_start":1,"highlight_end":53},{"text":" content: vec![serde_json::json!({","highlight_start":1,"highlight_end":58},{"text":" \"type\": \"text\",","highlight_start":1,"highlight_end":44},{"text":" \"text\": format!(\"承認待ちアイテム: {:?}\", items)","highlight_start":1,"highlight_end":69},{"text":" }).into()],","highlight_start":1,"highlight_end":36},{"text":" is_error: None,","highlight_start":1,"highlight_end":40},{"text":" }),","highlight_start":1,"highlight_end":24},{"text":" Err(e) => Err(McpError::internal_error(format!(\"Failed to list: {}\", e))),","highlight_start":1,"highlight_end":95},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" _ => Err(McpError::method_not_found(request.name)),","highlight_start":1,"highlight_end":64},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" }","highlight_start":1,"highlight_end":6}],"label":"not a member of trait `ServerHandler`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"\u001b[1m\u001b[91merror[E0407]\u001b[0m\u001b[1m\u001b[97m: method `call_tool` is not a member of trait `ServerHandler`\u001b[0m\n \u001b[1m\u001b[96m--> \u001b[0msrc\\main.rs:51:5\n \u001b[1m\u001b[96m|\u001b[0m\n\u001b[1m\u001b[96m51\u001b[0m \u001b[1m\u001b[96m|\u001b[0m \u001b[1m\u001b[91m/\u001b[0m async fn call_tool(&self, request: CallToolRequest) -> Result<CallToolResult, McpError> {\n\u001b[1m\u001b[96m52\u001b[0m \u001b[1m\u001b[96m|\u001b[0m \u001b[1m\u001b[91m|\u001b[0m match request.name.as_str() {\n\u001b[1m\u001b[96m53\u001b[0m \u001b[1m\u001b[96m|\u001b[0m \u001b[1m\u001b[91m|\u001b[0m \"enqueue_output\" => {\n\u001b[1m\u001b[96m54\u001b[0m \u001b[1m\u001b[96m|\u001b[0m \u001b[1m\u001b[91m|\u001b[0m let params = request.arguments.unwrap_or_default();\n\u001b[1m\u001b[96m...\u001b[0m \u001b[1m\u001b[91m|\u001b[0m\n\u001b[1m\u001b[96m86\u001b[0m \u001b[1m\u001b[96m|\u001b[0m \u001b[1m\u001b[91m|\u001b[0m }\n \u001b[1m\u001b[96m|\u001b[0m \u001b[1m\u001b[91m|_____^\u001b[0m \u001b[1m\u001b[91mnot a member of trait `ServerHandler`\u001b[0m\n\n"}
{"$message_type":"diagnostic","message":"cannot find function `run` in module `server_runtime`","code":{"code":"E0425","explanation":"An unresolved name was used.\n\nErroneous code examples:\n\n```compile_fail,E0425\nsomething_that_doesnt_exist::foo;\n// error: unresolved name `something_that_doesnt_exist::foo`\n\n// or:\n\ntrait Foo {\n fn bar() {\n Self; // error: unresolved name `Self`\n }\n}\n\n// or:\n\nlet x = unknown_variable; // error: unresolved name `unknown_variable`\n```\n\nPlease verify that the name wasn't misspelled and ensure that the\nidentifier being referred to is valid for the given situation. Example:\n\n```\nenum something_that_does_exist {\n Foo,\n}\n```\n\nOr:\n\n```\nmod something_that_does_exist {\n pub static foo : i32 = 0i32;\n}\n\nsomething_that_does_exist::foo; // ok!\n```\n\nOr:\n\n```\nlet unknown_variable = 12u32;\nlet x = unknown_variable; // ok!\n```\n\nIf the item is not defined in the current module, it must be imported using a\n`use` statement, like so:\n\n```\n# mod foo { pub fn bar() {} }\n# fn main() {\nuse foo::bar;\nbar();\n# }\n```\n\nIf the item you are importing is not defined in some super-module of the\ncurrent module, then it must also be declared as public (e.g., `pub fn`).\n"},"level":"error","spans":[{"file_name":"src\\main.rs","byte_start":3878,"byte_end":3881,"line_start":99,"line_end":99,"column_start":21,"column_end":24,"is_primary":true,"text":[{"text":" server_runtime::run(server, transport).await?;","highlight_start":21,"highlight_end":24}],"label":"not found in `server_runtime`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"\u001b[1m\u001b[91merror[E0425]\u001b[0m\u001b[1m\u001b[97m: cannot find function `run` in module `server_runtime`\u001b[0m\n \u001b[1m\u001b[96m--> \u001b[0msrc\\main.rs:99:21\n \u001b[1m\u001b[96m|\u001b[0m\n\u001b[1m\u001b[96m99\u001b[0m \u001b[1m\u001b[96m|\u001b[0m server_runtime::run(server, transport).await?;\n \u001b[1m\u001b[96m|\u001b[0m \u001b[1m\u001b[91m^^^\u001b[0m \u001b[1m\u001b[91mnot found in `server_runtime`\u001b[0m\n\n"}
{"$message_type":"diagnostic","message":"missing fields `annotations`, `execution`, `icons` and 3 other fields in initializer of `Tool`","code":{"code":"E0063","explanation":"A struct's or struct-like enum variant's field was not provided.\n\nErroneous code example:\n\n```compile_fail,E0063\nstruct Foo {\n x: i32,\n y: i32,\n}\n\nfn main() {\n let x = Foo { x: 0 }; // error: missing field: `y`\n}\n```\n\nEach field should be specified exactly once. Example:\n\n```\nstruct Foo {\n x: i32,\n y: i32,\n}\n\nfn main() {\n let x = Foo { x: 0, y: 0 }; // ok!\n}\n```\n"},"level":"error","spans":[{"file_name":"src\\main.rs","byte_start":707,"byte_end":711,"line_start":28,"line_end":28,"column_start":17,"column_end":21,"is_primary":true,"text":[{"text":" Tool {","highlight_start":17,"highlight_end":21}],"label":"missing `annotations`, `execution`, `icons` and 3 other fields","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"\u001b[1m\u001b[91merror[E0063]\u001b[0m\u001b[1m\u001b[97m: missing fields `annotations`, `execution`, `icons` and 3 other fields in initializer of `Tool`\u001b[0m\n \u001b[1m\u001b[96m--> \u001b[0msrc\\main.rs:28:17\n \u001b[1m\u001b[96m|\u001b[0m\n\u001b[1m\u001b[96m28\u001b[0m \u001b[1m\u001b[96m|\u001b[0m Tool {\n \u001b[1m\u001b[96m|\u001b[0m \u001b[1m\u001b[91m^^^^\u001b[0m \u001b[1m\u001b[91mmissing `annotations`, `execution`, `icons` and 3 other fields\u001b[0m\n\n"}
{"$message_type":"diagnostic","message":"missing fields `annotations`, `execution`, `icons` and 3 other fields in initializer of `Tool`","code":{"code":"E0063","explanation":"A struct's or struct-like enum variant's field was not provided.\n\nErroneous code example:\n\n```compile_fail,E0063\nstruct Foo {\n x: i32,\n y: i32,\n}\n\nfn main() {\n let x = Foo { x: 0 }; // error: missing field: `y`\n}\n```\n\nEach field should be specified exactly once. Example:\n\n```\nstruct Foo {\n x: i32,\n y: i32,\n}\n\nfn main() {\n let x = Foo { x: 0, y: 0 }; // ok!\n}\n```\n"},"level":"error","spans":[{"file_name":"src\\main.rs","byte_start":1492,"byte_end":1496,"line_start":41,"line_end":41,"column_start":17,"column_end":21,"is_primary":true,"text":[{"text":" Tool {","highlight_start":17,"highlight_end":21}],"label":"missing `annotations`, `execution`, `icons` and 3 other fields","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"\u001b[1m\u001b[91merror[E0063]\u001b[0m\u001b[1m\u001b[97m: missing fields `annotations`, `execution`, `icons` and 3 other fields in initializer of `Tool`\u001b[0m\n \u001b[1m\u001b[96m--> \u001b[0msrc\\main.rs:41:17\n \u001b[1m\u001b[96m|\u001b[0m\n\u001b[1m\u001b[96m41\u001b[0m \u001b[1m\u001b[96m|\u001b[0m Tool {\n \u001b[1m\u001b[96m|\u001b[0m \u001b[1m\u001b[91m^^^^\u001b[0m \u001b[1m\u001b[91mmissing `annotations`, `execution`, `icons` and 3 other fields\u001b[0m\n\n"}
{"$message_type":"diagnostic","message":"missing field `meta` in initializer of `rust_mcp_sdk::schema::ListToolsResult`","code":{"code":"E0063","explanation":"A struct's or struct-like enum variant's field was not provided.\n\nErroneous code example:\n\n```compile_fail,E0063\nstruct Foo {\n x: i32,\n y: i32,\n}\n\nfn main() {\n let x = Foo { x: 0 }; // error: missing field: `y`\n}\n```\n\nEach field should be specified exactly once. Example:\n\n```\nstruct Foo {\n x: i32,\n y: i32,\n}\n\nfn main() {\n let x = Foo { x: 0, y: 0 }; // ok!\n}\n```\n"},"level":"error","spans":[{"file_name":"src\\main.rs","byte_start":648,"byte_end":663,"line_start":26,"line_end":26,"column_start":12,"column_end":27,"is_primary":true,"text":[{"text":" Ok(ListToolsResult {","highlight_start":12,"highlight_end":27}],"label":"missing `meta`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"\u001b[1m\u001b[91merror[E0063]\u001b[0m\u001b[1m\u001b[97m: missing field `meta` in initializer of `rust_mcp_sdk::schema::ListToolsResult`\u001b[0m\n \u001b[1m\u001b[96m--> \u001b[0msrc\\main.rs:26:12\n \u001b[1m\u001b[96m|\u001b[0m\n\u001b[1m\u001b[96m26\u001b[0m \u001b[1m\u001b[96m|\u001b[0m Ok(ListToolsResult {\n \u001b[1m\u001b[96m|\u001b[0m \u001b[1m\u001b[91m^^^^^^^^^^^^^^^\u001b[0m \u001b[1m\u001b[91mmissing `meta`\u001b[0m\n\n"}
{"$message_type":"diagnostic","message":"no field `name` on type `rust_mcp_sdk::schema::CallToolRequest`","code":{"code":"E0609","explanation":"Attempted to access a nonexistent field in a struct.\n\nErroneous code example:\n\n```compile_fail,E0609\nstruct StructWithFields {\n x: u32,\n}\n\nlet s = StructWithFields { x: 0 };\nprintln!(\"{}\", s.foo); // error: no field `foo` on type `StructWithFields`\n```\n\nTo fix this error, check that you didn't misspell the field's name or that the\nfield actually exists. Example:\n\n```\nstruct StructWithFields {\n x: u32,\n}\n\nlet s = StructWithFields { x: 0 };\nprintln!(\"{}\", s.x); // ok!\n```\n"},"level":"error","spans":[{"file_name":"src\\main.rs","byte_start":1954,"byte_end":1958,"line_start":52,"line_end":52,"column_start":23,"column_end":27,"is_primary":true,"text":[{"text":" match request.name.as_str() {","highlight_start":23,"highlight_end":27}],"label":"unknown field","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"one of the expressions' fields has a field of the same name","code":null,"level":"help","spans":[{"file_name":"src\\main.rs","byte_start":1954,"byte_end":1954,"line_start":52,"line_end":52,"column_start":23,"column_end":23,"is_primary":true,"text":[{"text":" match request.name.as_str() {","highlight_start":23,"highlight_end":23}],"label":null,"suggested_replacement":"params.","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[1m\u001b[91merror[E0609]\u001b[0m\u001b[1m\u001b[97m: no field `name` on type `rust_mcp_sdk::schema::CallToolRequest`\u001b[0m\n \u001b[1m\u001b[96m--> \u001b[0msrc\\main.rs:52:23\n \u001b[1m\u001b[96m|\u001b[0m\n\u001b[1m\u001b[96m52\u001b[0m \u001b[1m\u001b[96m|\u001b[0m match request.name.as_str() {\n \u001b[1m\u001b[96m|\u001b[0m \u001b[1m\u001b[91m^^^^\u001b[0m \u001b[1m\u001b[91munknown field\u001b[0m\n \u001b[1m\u001b[96m|\u001b[0m\n\u001b[1m\u001b[96mhelp\u001b[0m: one of the expressions' fields has a field of the same name\n \u001b[1m\u001b[96m|\u001b[0m\n\u001b[1m\u001b[96m52\u001b[0m \u001b[1m\u001b[96m| \u001b[0m match request.\u001b[92mparams.\u001b[0mname.as_str() {\n \u001b[1m\u001b[96m|\u001b[0m \u001b[92m+++++++\u001b[0m\n\n"}
{"$message_type":"diagnostic","message":"no field `arguments` on type `rust_mcp_sdk::schema::CallToolRequest`","code":{"code":"E0609","explanation":"Attempted to access a nonexistent field in a struct.\n\nErroneous code example:\n\n```compile_fail,E0609\nstruct StructWithFields {\n x: u32,\n}\n\nlet s = StructWithFields { x: 0 };\nprintln!(\"{}\", s.foo); // error: no field `foo` on type `StructWithFields`\n```\n\nTo fix this error, check that you didn't misspell the field's name or that the\nfield actually exists. Example:\n\n```\nstruct StructWithFields {\n x: u32,\n}\n\nlet s = StructWithFields { x: 0 };\nprintln!(\"{}\", s.x); // ok!\n```\n"},"level":"error","spans":[{"file_name":"src\\main.rs","byte_start":2041,"byte_end":2050,"line_start":54,"line_end":54,"column_start":38,"column_end":47,"is_primary":true,"text":[{"text":" let params = request.arguments.unwrap_or_default();","highlight_start":38,"highlight_end":47}],"label":"unknown field","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"one of the expressions' fields has a field of the same name","code":null,"level":"help","spans":[{"file_name":"src\\main.rs","byte_start":2041,"byte_end":2041,"line_start":54,"line_end":54,"column_start":38,"column_end":38,"is_primary":true,"text":[{"text":" let params = request.arguments.unwrap_or_default();","highlight_start":38,"highlight_end":38}],"label":null,"suggested_replacement":"params.","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[1m\u001b[91merror[E0609]\u001b[0m\u001b[1m\u001b[97m: no field `arguments` on type `rust_mcp_sdk::schema::CallToolRequest`\u001b[0m\n \u001b[1m\u001b[96m--> \u001b[0msrc\\main.rs:54:38\n \u001b[1m\u001b[96m|\u001b[0m\n\u001b[1m\u001b[96m54\u001b[0m \u001b[1m\u001b[96m|\u001b[0m let params = request.arguments.unwrap_or_default();\n \u001b[1m\u001b[96m|\u001b[0m \u001b[1m\u001b[91m^^^^^^^^^\u001b[0m \u001b[1m\u001b[91munknown field\u001b[0m\n \u001b[1m\u001b[96m|\u001b[0m\n\u001b[1m\u001b[96mhelp\u001b[0m: one of the expressions' fields has a field of the same name\n \u001b[1m\u001b[96m|\u001b[0m\n\u001b[1m\u001b[96m54\u001b[0m \u001b[1m\u001b[96m| \u001b[0m let params = request.\u001b[92mparams.\u001b[0marguments.unwrap_or_default();\n \u001b[1m\u001b[96m|\u001b[0m \u001b[92m+++++++\u001b[0m\n\n"}
{"$message_type":"diagnostic","message":"the trait bound `ContentBlock: From<serde_json::Value>` is not satisfied","code":{"code":"E0277","explanation":"You tried to use a type which doesn't implement some trait in a place which\nexpected that trait.\n\nErroneous code example:\n\n```compile_fail,E0277\n// here we declare the Foo trait with a bar method\ntrait Foo {\n fn bar(&self);\n}\n\n// we now declare a function which takes an object implementing the Foo trait\nfn some_func<T: Foo>(foo: T) {\n foo.bar();\n}\n\nfn main() {\n // we now call the method with the i32 type, which doesn't implement\n // the Foo trait\n some_func(5i32); // error: the trait bound `i32 : Foo` is not satisfied\n}\n```\n\nIn order to fix this error, verify that the type you're using does implement\nthe trait. Example:\n\n```\ntrait Foo {\n fn bar(&self);\n}\n\n// we implement the trait on the i32 type\nimpl Foo for i32 {\n fn bar(&self) {}\n}\n\nfn some_func<T: Foo>(foo: T) {\n foo.bar(); // we can now use this method since i32 implements the\n // Foo trait\n}\n\nfn main() {\n some_func(5i32); // ok!\n}\n```\n\nOr in a generic context, an erroneous code example would look like:\n\n```compile_fail,E0277\nfn some_func<T>(foo: T) {\n println!(\"{:?}\", foo); // error: the trait `core::fmt::Debug` is not\n // implemented for the type `T`\n}\n\nfn main() {\n // We now call the method with the i32 type,\n // which *does* implement the Debug trait.\n some_func(5i32);\n}\n```\n\nNote that the error here is in the definition of the generic function. Although\nwe only call it with a parameter that does implement `Debug`, the compiler\nstill rejects the function. It must work with all possible input types. In\norder to make this example compile, we need to restrict the generic type we're\naccepting:\n\n```\nuse std::fmt;\n\n// Restrict the input type to types that implement Debug.\nfn some_func<T: fmt::Debug>(foo: T) {\n println!(\"{:?}\", foo);\n}\n\nfn main() {\n // Calling the method is still fine, as i32 implements Debug.\n some_func(5i32);\n\n // This would fail to compile now:\n // struct WithoutDebug;\n // some_func(WithoutDebug);\n}\n```\n\nRust only looks at the signature of the called function, as such it must\nalready specify all requirements that will be used for every type parameter.\n"},"level":"error","spans":[{"file_name":"src\\main.rs","byte_start":2479,"byte_end":2675,"line_start":62,"line_end":65,"column_start":39,"column_end":27,"is_primary":true,"text":[{"text":" content: vec![serde_json::json!({","highlight_start":39,"highlight_end":58},{"text":" \"type\": \"text\",","highlight_start":1,"highlight_end":44},{"text":" \"text\": format!(\"出力がスタックに追加されました。ID: {}\", id)","highlight_start":1,"highlight_end":74},{"text":" }).into()],","highlight_start":1,"highlight_end":27}],"label":"the trait `From<serde_json::Value>` is not implemented for `ContentBlock`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"src\\main.rs","byte_start":2676,"byte_end":2680,"line_start":65,"line_end":65,"column_start":28,"column_end":32,"is_primary":false,"text":[{"text":" }).into()],","highlight_start":28,"highlight_end":32}],"label":"required by a bound introduced by this call","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"the following other types implement trait `From<T>`:\n `ContentBlock` implements `From<rust_mcp_sdk::schema::AudioContent>`\n `ContentBlock` implements `From<rust_mcp_sdk::schema::EmbeddedResource>`\n `ContentBlock` implements `From<rust_mcp_sdk::schema::ImageContent>`\n `ContentBlock` implements `From<rust_mcp_sdk::schema::ResourceLink>`\n `ContentBlock` implements `From<rust_mcp_sdk::schema::TextContent>`","code":null,"level":"help","spans":[],"children":[],"rendered":null},{"message":"required for `serde_json::Value` to implement `Into<ContentBlock>`","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"\u001b[1m\u001b[91merror[E0277]\u001b[0m\u001b[1m\u001b[97m: the trait bound `ContentBlock: From<serde_json::Value>` is not satisfied\u001b[0m\n \u001b[1m\u001b[96m--> \u001b[0msrc\\main.rs:62:39\n \u001b[1m\u001b[96m|\u001b[0m\n\u001b[1m\u001b[96m62\u001b[0m \u001b[1m\u001b[96m|\u001b[0m content: vec![serde_json::json!({\n \u001b[1m\u001b[96m|\u001b[0m \u001b[1m\u001b[91m _______________________________________^\u001b[0m\n\u001b[1m\u001b[96m63\u001b[0m \u001b[1m\u001b[96m|\u001b[0m \u001b[1m\u001b[91m|\u001b[0m \"type\": \"text\",\n\u001b[1m\u001b[96m64\u001b[0m \u001b[1m\u001b[96m|\u001b[0m \u001b[1m\u001b[91m|\u001b[0m \"text\": format!(\"出力がスタックに追加されました。ID: {}\", id)\n\u001b[1m\u001b[96m65\u001b[0m \u001b[1m\u001b[96m|\u001b[0m \u001b[1m\u001b[91m|\u001b[0m }).into()],\n \u001b[1m\u001b[96m|\u001b[0m \u001b[1m\u001b[91m|\u001b[0m \u001b[1m\u001b[91m^\u001b[0m \u001b[1m\u001b[96m----\u001b[0m \u001b[1m\u001b[96mrequired by a bound introduced by this call\u001b[0m\n \u001b[1m\u001b[96m|\u001b[0m \u001b[1m\u001b[91m|__________________________|\u001b[0m\n \u001b[1m\u001b[96m|\u001b[0m \u001b[1m\u001b[91mthe trait `From<serde_json::Value>` is not implemented for `ContentBlock`\u001b[0m\n \u001b[1m\u001b[96m|\u001b[0m\n \u001b[1m\u001b[96m= \u001b[0m\u001b[1m\u001b[97mhelp\u001b[0m: the following other types implement trait `From<T>`:\n `ContentBlock` implements `From<rust_mcp_sdk::schema::AudioContent>`\n `ContentBlock` implements `From<rust_mcp_sdk::schema::EmbeddedResource>`\n `ContentBlock` implements `From<rust_mcp_sdk::schema::ImageContent>`\n `ContentBlock` implements `From<rust_mcp_sdk::schema::ResourceLink>`\n `ContentBlock` implements `From<rust_mcp_sdk::schema::TextContent>`\n \u001b[1m\u001b[96m= \u001b[0m\u001b[1m\u001b[97mnote\u001b[0m: required for `serde_json::Value` to implement `Into<ContentBlock>`\n\n"}
{"$message_type":"diagnostic","message":"missing fields `meta` and `structured_content` in initializer of `rust_mcp_sdk::schema::CallToolResult`","code":{"code":"E0063","explanation":"A struct's or struct-like enum variant's field was not provided.\n\nErroneous code example:\n\n```compile_fail,E0063\nstruct Foo {\n x: i32,\n y: i32,\n}\n\nfn main() {\n let x = Foo { x: 0 }; // error: missing field: `y`\n}\n```\n\nEach field should be specified exactly once. Example:\n\n```\nstruct Foo {\n x: i32,\n y: i32,\n}\n\nfn main() {\n let x = Foo { x: 0, y: 0 }; // ok!\n}\n```\n"},"level":"error","spans":[{"file_name":"src\\main.rs","byte_start":2424,"byte_end":2438,"line_start":61,"line_end":61,"column_start":34,"column_end":48,"is_primary":true,"text":[{"text":" Ok(id) => Ok(CallToolResult {","highlight_start":34,"highlight_end":48}],"label":"missing `meta` and `structured_content`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"\u001b[1m\u001b[91merror[E0063]\u001b[0m\u001b[1m\u001b[97m: missing fields `meta` and `structured_content` in initializer of `rust_mcp_sdk::schema::CallToolResult`\u001b[0m\n \u001b[1m\u001b[96m--> \u001b[0msrc\\main.rs:61:34\n \u001b[1m\u001b[96m|\u001b[0m\n\u001b[1m\u001b[96m61\u001b[0m \u001b[1m\u001b[96m|\u001b[0m Ok(id) => Ok(CallToolResult {\n \u001b[1m\u001b[96m|\u001b[0m \u001b[1m\u001b[91m^^^^^^^^^^^^^^\u001b[0m \u001b[1m\u001b[91mmissing `meta` and `structured_content`\u001b[0m\n\n"}
{"$message_type":"diagnostic","message":"the trait bound `ContentBlock: From<serde_json::Value>` is not satisfied","code":{"code":"E0277","explanation":"You tried to use a type which doesn't implement some trait in a place which\nexpected that trait.\n\nErroneous code example:\n\n```compile_fail,E0277\n// here we declare the Foo trait with a bar method\ntrait Foo {\n fn bar(&self);\n}\n\n// we now declare a function which takes an object implementing the Foo trait\nfn some_func<T: Foo>(foo: T) {\n foo.bar();\n}\n\nfn main() {\n // we now call the method with the i32 type, which doesn't implement\n // the Foo trait\n some_func(5i32); // error: the trait bound `i32 : Foo` is not satisfied\n}\n```\n\nIn order to fix this error, verify that the type you're using does implement\nthe trait. Example:\n\n```\ntrait Foo {\n fn bar(&self);\n}\n\n// we implement the trait on the i32 type\nimpl Foo for i32 {\n fn bar(&self) {}\n}\n\nfn some_func<T: Foo>(foo: T) {\n foo.bar(); // we can now use this method since i32 implements the\n // Foo trait\n}\n\nfn main() {\n some_func(5i32); // ok!\n}\n```\n\nOr in a generic context, an erroneous code example would look like:\n\n```compile_fail,E0277\nfn some_func<T>(foo: T) {\n println!(\"{:?}\", foo); // error: the trait `core::fmt::Debug` is not\n // implemented for the type `T`\n}\n\nfn main() {\n // We now call the method with the i32 type,\n // which *does* implement the Debug trait.\n some_func(5i32);\n}\n```\n\nNote that the error here is in the definition of the generic function. Although\nwe only call it with a parameter that does implement `Debug`, the compiler\nstill rejects the function. It must work with all possible input types. In\norder to make this example compile, we need to restrict the generic type we're\naccepting:\n\n```\nuse std::fmt;\n\n// Restrict the input type to types that implement Debug.\nfn some_func<T: fmt::Debug>(foo: T) {\n println!(\"{:?}\", foo);\n}\n\nfn main() {\n // Calling the method is still fine, as i32 implements Debug.\n some_func(5i32);\n\n // This would fail to compile now:\n // struct WithoutDebug;\n // some_func(WithoutDebug);\n}\n```\n\nRust only looks at the signature of the called function, as such it must\nalready specify all requirements that will be used for every type parameter.\n"},"level":"error","spans":[{"file_name":"src\\main.rs","byte_start":3091,"byte_end":3266,"line_start":75,"line_end":78,"column_start":39,"column_end":27,"is_primary":true,"text":[{"text":" content: vec![serde_json::json!({","highlight_start":39,"highlight_end":58},{"text":" \"type\": \"text\",","highlight_start":1,"highlight_end":44},{"text":" \"text\": format!(\"承認待ちアイテム: {:?}\", items)","highlight_start":1,"highlight_end":69},{"text":" }).into()],","highlight_start":1,"highlight_end":27}],"label":"the trait `From<serde_json::Value>` is not implemented for `ContentBlock`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"src\\main.rs","byte_start":3267,"byte_end":3271,"line_start":78,"line_end":78,"column_start":28,"column_end":32,"is_primary":false,"text":[{"text":" }).into()],","highlight_start":28,"highlight_end":32}],"label":"required by a bound introduced by this call","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"the following other types implement trait `From<T>`:\n `ContentBlock` implements `From<rust_mcp_sdk::schema::AudioContent>`\n `ContentBlock` implements `From<rust_mcp_sdk::schema::EmbeddedResource>`\n `ContentBlock` implements `From<rust_mcp_sdk::schema::ImageContent>`\n `ContentBlock` implements `From<rust_mcp_sdk::schema::ResourceLink>`\n `ContentBlock` implements `From<rust_mcp_sdk::schema::TextContent>`","code":null,"level":"help","spans":[],"children":[],"rendered":null},{"message":"required for `serde_json::Value` to implement `Into<ContentBlock>`","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"\u001b[1m\u001b[91merror[E0277]\u001b[0m\u001b[1m\u001b[97m: the trait bound `ContentBlock: From<serde_json::Value>` is not satisfied\u001b[0m\n \u001b[1m\u001b[96m--> \u001b[0msrc\\main.rs:75:39\n \u001b[1m\u001b[96m|\u001b[0m\n\u001b[1m\u001b[96m75\u001b[0m \u001b[1m\u001b[96m|\u001b[0m content: vec![serde_json::json!({\n \u001b[1m\u001b[96m|\u001b[0m \u001b[1m\u001b[91m _______________________________________^\u001b[0m\n\u001b[1m\u001b[96m76\u001b[0m \u001b[1m\u001b[96m|\u001b[0m \u001b[1m\u001b[91m|\u001b[0m \"type\": \"text\",\n\u001b[1m\u001b[96m77\u001b[0m \u001b[1m\u001b[96m|\u001b[0m \u001b[1m\u001b[91m|\u001b[0m \"text\": format!(\"承認待ちアイテム: {:?}\", items)\n\u001b[1m\u001b[96m78\u001b[0m \u001b[1m\u001b[96m|\u001b[0m \u001b[1m\u001b[91m|\u001b[0m }).into()],\n \u001b[1m\u001b[96m|\u001b[0m \u001b[1m\u001b[91m|\u001b[0m \u001b[1m\u001b[91m^\u001b[0m \u001b[1m\u001b[96m----\u001b[0m \u001b[1m\u001b[96mrequired by a bound introduced by this call\u001b[0m\n \u001b[1m\u001b[96m|\u001b[0m \u001b[1m\u001b[91m|__________________________|\u001b[0m\n \u001b[1m\u001b[96m|\u001b[0m \u001b[1m\u001b[91mthe trait `From<serde_json::Value>` is not implemented for `ContentBlock`\u001b[0m\n \u001b[1m\u001b[96m|\u001b[0m\n \u001b[1m\u001b[96m= \u001b[0m\u001b[1m\u001b[97mhelp\u001b[0m: the following other types implement trait `From<T>`:\n `ContentBlock` implements `From<rust_mcp_sdk::schema::AudioContent>`\n `ContentBlock` implements `From<rust_mcp_sdk::schema::EmbeddedResource>`\n `ContentBlock` implements `From<rust_mcp_sdk::schema::ImageContent>`\n `ContentBlock` implements `From<rust_mcp_sdk::schema::ResourceLink>`\n `ContentBlock` implements `From<rust_mcp_sdk::schema::TextContent>`\n \u001b[1m\u001b[96m= \u001b[0m\u001b[1m\u001b[97mnote\u001b[0m: required for `serde_json::Value` to implement `Into<ContentBlock>`\n\n"}
{"$message_type":"diagnostic","message":"missing fields `meta` and `structured_content` in initializer of `rust_mcp_sdk::schema::CallToolResult`","code":{"code":"E0063","explanation":"A struct's or struct-like enum variant's field was not provided.\n\nErroneous code example:\n\n```compile_fail,E0063\nstruct Foo {\n x: i32,\n y: i32,\n}\n\nfn main() {\n let x = Foo { x: 0 }; // error: missing field: `y`\n}\n```\n\nEach field should be specified exactly once. Example:\n\n```\nstruct Foo {\n x: i32,\n y: i32,\n}\n\nfn main() {\n let x = Foo { x: 0, y: 0 }; // ok!\n}\n```\n"},"level":"error","spans":[{"file_name":"src\\main.rs","byte_start":3036,"byte_end":3050,"line_start":74,"line_end":74,"column_start":37,"column_end":51,"is_primary":true,"text":[{"text":" Ok(items) => Ok(CallToolResult {","highlight_start":37,"highlight_end":51}],"label":"missing `meta` and `structured_content`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"\u001b[1m\u001b[91merror[E0063]\u001b[0m\u001b[1m\u001b[97m: missing fields `meta` and `structured_content` in initializer of `rust_mcp_sdk::schema::CallToolResult`\u001b[0m\n \u001b[1m\u001b[96m--> \u001b[0msrc\\main.rs:74:37\n \u001b[1m\u001b[96m|\u001b[0m\n\u001b[1m\u001b[96m74\u001b[0m \u001b[1m\u001b[96m|\u001b[0m Ok(items) => Ok(CallToolResult {\n \u001b[1m\u001b[96m|\u001b[0m \u001b[1m\u001b[91m^^^^^^^^^^^^^^\u001b[0m \u001b[1m\u001b[91mmissing `meta` and `structured_content`\u001b[0m\n\n"}
{"$message_type":"diagnostic","message":"no field `name` on type `rust_mcp_sdk::schema::CallToolRequest`","code":{"code":"E0609","explanation":"Attempted to access a nonexistent field in a struct.\n\nErroneous code example:\n\n```compile_fail,E0609\nstruct StructWithFields {\n x: u32,\n}\n\nlet s = StructWithFields { x: 0 };\nprintln!(\"{}\", s.foo); // error: no field `foo` on type `StructWithFields`\n```\n\nTo fix this error, check that you didn't misspell the field's name or that the\nfield actually exists. Example:\n\n```\nstruct StructWithFields {\n x: u32,\n}\n\nlet s = StructWithFields { x: 0 };\nprintln!(\"{}\", s.x); // ok!\n```\n"},"level":"error","spans":[{"file_name":"src\\main.rs","byte_start":3523,"byte_end":3527,"line_start":84,"line_end":84,"column_start":57,"column_end":61,"is_primary":true,"text":[{"text":" _ => Err(McpError::method_not_found(request.name)),","highlight_start":57,"highlight_end":61}],"label":"unknown field","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"one of the expressions' fields has a field of the same name","code":null,"level":"help","spans":[{"file_name":"src\\main.rs","byte_start":3523,"byte_end":3523,"line_start":84,"line_end":84,"column_start":57,"column_end":57,"is_primary":true,"text":[{"text":" _ => Err(McpError::method_not_found(request.name)),","highlight_start":57,"highlight_end":57}],"label":null,"suggested_replacement":"params.","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[1m\u001b[91merror[E0609]\u001b[0m\u001b[1m\u001b[97m: no field `name` on type `rust_mcp_sdk::schema::CallToolRequest`\u001b[0m\n \u001b[1m\u001b[96m--> \u001b[0msrc\\main.rs:84:57\n \u001b[1m\u001b[96m|\u001b[0m\n\u001b[1m\u001b[96m84\u001b[0m \u001b[1m\u001b[96m|\u001b[0m _ => Err(McpError::method_not_found(request.name)),\n \u001b[1m\u001b[96m|\u001b[0m \u001b[1m\u001b[91m^^^^\u001b[0m \u001b[1m\u001b[91munknown field\u001b[0m\n \u001b[1m\u001b[96m|\u001b[0m\n\u001b[1m\u001b[96mhelp\u001b[0m: one of the expressions' fields has a field of the same name\n \u001b[1m\u001b[96m|\u001b[0m\n\u001b[1m\u001b[96m84\u001b[0m \u001b[1m\u001b[96m| \u001b[0m _ => Err(McpError::method_not_found(request.\u001b[92mparams.\u001b[0mname)),\n \u001b[1m\u001b[96m|\u001b[0m \u001b[92m+++++++\u001b[0m\n\n"}
{"$message_type":"diagnostic","message":"`?` couldn't convert the error: `(dyn std::any::Any + Send + 'static): Sync` is not satisfied","code":{"code":"E0277","explanation":"You tried to use a type which doesn't implement some trait in a place which\nexpected that trait.\n\nErroneous code example:\n\n```compile_fail,E0277\n// here we declare the Foo trait with a bar method\ntrait Foo {\n fn bar(&self);\n}\n\n// we now declare a function which takes an object implementing the Foo trait\nfn some_func<T: Foo>(foo: T) {\n foo.bar();\n}\n\nfn main() {\n // we now call the method with the i32 type, which doesn't implement\n // the Foo trait\n some_func(5i32); // error: the trait bound `i32 : Foo` is not satisfied\n}\n```\n\nIn order to fix this error, verify that the type you're using does implement\nthe trait. Example:\n\n```\ntrait Foo {\n fn bar(&self);\n}\n\n// we implement the trait on the i32 type\nimpl Foo for i32 {\n fn bar(&self) {}\n}\n\nfn some_func<T: Foo>(foo: T) {\n foo.bar(); // we can now use this method since i32 implements the\n // Foo trait\n}\n\nfn main() {\n some_func(5i32); // ok!\n}\n```\n\nOr in a generic context, an erroneous code example would look like:\n\n```compile_fail,E0277\nfn some_func<T>(foo: T) {\n println!(\"{:?}\", foo); // error: the trait `core::fmt::Debug` is not\n // implemented for the type `T`\n}\n\nfn main() {\n // We now call the method with the i32 type,\n // which *does* implement the Debug trait.\n some_func(5i32);\n}\n```\n\nNote that the error here is in the definition of the generic function. Although\nwe only call it with a parameter that does implement `Debug`, the compiler\nstill rejects the function. It must work with all possible input types. In\norder to make this example compile, we need to restrict the generic type we're\naccepting:\n\n```\nuse std::fmt;\n\n// Restrict the input type to types that implement Debug.\nfn some_func<T: fmt::Debug>(foo: T) {\n println!(\"{:?}\", foo);\n}\n\nfn main() {\n // Calling the method is still fine, as i32 implements Debug.\n some_func(5i32);\n\n // This would fail to compile now:\n // struct WithoutDebug;\n // some_func(WithoutDebug);\n}\n```\n\nRust only looks at the signature of the called function, as such it must\nalready specify all requirements that will be used for every type parameter.\n"},"level":"error","spans":[{"file_name":"src\\main.rs","byte_start":3759,"byte_end":3798,"line_start":96,"line_end":96,"column_start":21,"column_end":60,"is_primary":false,"text":[{"text":" let transport = StdioTransport::new(Default::default())?;","highlight_start":21,"highlight_end":60}],"label":"this can't be annotated with `?` because it has type `Result<_, rust_mcp_sdk::TransportError>`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"src\\main.rs","byte_start":3798,"byte_end":3799,"line_start":96,"line_end":96,"column_start":60,"column_end":61,"is_primary":true,"text":[{"text":" let transport = StdioTransport::new(Default::default())?;","highlight_start":60,"highlight_end":61}],"label":"`(dyn std::any::Any + Send + 'static)` cannot be shared between threads safely","suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"src\\main.rs","byte_start":3798,"byte_end":3799,"line_start":96,"line_end":96,"column_start":60,"column_end":61,"is_primary":false,"text":[{"text":" let transport = StdioTransport::new(Default::default())?;","highlight_start":60,"highlight_end":61}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},"macro_decl_name":"desugaring of operator `?`","def_site_span":{"file_name":"src\\main.rs","byte_start":0,"byte_end":0,"line_start":1,"line_end":1,"column_start":1,"column_end":1,"is_primary":false,"text":[],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}}],"children":[{"message":"the trait `Sync` is not implemented for `(dyn std::any::Any + Send + 'static)`","code":null,"level":"help","spans":[],"children":[],"rendered":null},{"message":"the question mark operation (`?`) implicitly performs a conversion on the error value using the `From` trait","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"required for `Unique<(dyn std::any::Any + Send + 'static)>` to implement `Sync`","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"required because it appears within the type `Box<(dyn std::any::Any + Send + 'static)>`","code":null,"level":"note","spans":[{"file_name":"C:\\Users\\bythe\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib/rustlib/src/rust\\library\\alloc\\src\\boxed.rs","byte_start":9046,"byte_end":9049,"line_start":234,"line_end":234,"column_start":12,"column_end":15,"is_primary":true,"text":[{"text":"pub struct Box<","highlight_start":12,"highlight_end":15}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":null},{"message":"required because it appears within the type `GenericSendError`","code":null,"level":"note","spans":[{"file_name":"C:\\Users\\bythe\\.cargo\\registry\\src\\index.crates.io-1949cf8c6b5b557f\\rust-mcp-transport-0.9.0\\src\\error.rs","byte_start":574,"byte_end":590,"line_start":15,"line_end":15,"column_start":12,"column_end":28,"is_primary":true,"text":[{"text":"pub struct GenericSendError {","highlight_start":12,"highlight_end":28}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":null},{"message":"required because it appears within the type `rust_mcp_sdk::TransportError`","code":null,"level":"note","spans":[{"file_name":"C:\\Users\\bythe\\.cargo\\registry\\src\\index.crates.io-1949cf8c6b5b557f\\rust-mcp-transport-0.9.0\\src\\error.rs","byte_start":2733,"byte_end":2747,"line_start":85,"line_end":85,"column_start":10,"column_end":24,"is_primary":true,"text":[{"text":"pub enum TransportError {","highlight_start":10,"highlight_end":24}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":null},{"message":"required for `anyhow::Error` to implement `From<rust_mcp_sdk::TransportError>`","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"\u001b[1m\u001b[91merror[E0277]\u001b[0m\u001b[1m\u001b[97m: `?` couldn't convert the error: `(dyn std::any::Any + Send + 'static): Sync` is not satisfied\u001b[0m\n \u001b[1m\u001b[96m--> \u001b[0msrc\\main.rs:96:60\n \u001b[1m\u001b[96m|\u001b[0m\n \u001b[1m\u001b[96m96\u001b[0m \u001b[1m\u001b[96m|\u001b[0m let transport = StdioTransport::new(Default::default())?;\n \u001b[1m\u001b[96m|\u001b[0m \u001b[1m\u001b[96m---------------------------------------\u001b[0m\u001b[1m\u001b[91m^\u001b[0m \u001b[1m\u001b[91m`(dyn std::any::Any + Send + 'static)` cannot be shared between threads safely\u001b[0m\n \u001b[1m\u001b[96m|\u001b[0m \u001b[1m\u001b[96m|\u001b[0m\n \u001b[1m\u001b[96m|\u001b[0m \u001b[1m\u001b[96mthis can't be annotated with `?` because it has type `Result<_, rust_mcp_sdk::TransportError>`\u001b[0m\n \u001b[1m\u001b[96m|\u001b[0m\n \u001b[1m\u001b[96m= \u001b[0m\u001b[1m\u001b[97mhelp\u001b[0m: the trait `Sync` is not implemented for `(dyn std::any::Any + Send + 'static)`\n \u001b[1m\u001b[96m= \u001b[0m\u001b[1m\u001b[97mnote\u001b[0m: the question mark operation (`?`) implicitly performs a conversion on the error value using the `From` trait\n \u001b[1m\u001b[96m= \u001b[0m\u001b[1m\u001b[97mnote\u001b[0m: required for `Unique<(dyn std::any::Any + Send + 'static)>` to implement `Sync`\n\u001b[1m\u001b[92mnote\u001b[0m: required because it appears within the type `Box<(dyn std::any::Any + Send + 'static)>`\n \u001b[1m\u001b[96m--> \u001b[0mC:\\Users\\bythe\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib/rustlib/src/rust\\library\\alloc\\src\\boxed.rs:234:12\n \u001b[1m\u001b[96m|\u001b[0m\n\u001b[1m\u001b[96m234\u001b[0m \u001b[1m\u001b[96m|\u001b[0m pub struct Box<\n \u001b[1m\u001b[96m|\u001b[0m \u001b[1m\u001b[92m^^^\u001b[0m\n\u001b[1m\u001b[92mnote\u001b[0m: required because it appears within the type `GenericSendError`\n \u001b[1m\u001b[96m--> \u001b[0mC:\\Users\\bythe\\.cargo\\registry\\src\\index.crates.io-1949cf8c6b5b557f\\rust-mcp-transport-0.9.0\\src\\error.rs:15:12\n \u001b[1m\u001b[96m|\u001b[0m\n \u001b[1m\u001b[96m15\u001b[0m \u001b[1m\u001b[96m|\u001b[0m pub struct GenericSendError {\n \u001b[1m\u001b[96m|\u001b[0m \u001b[1m\u001b[92m^^^^^^^^^^^^^^^^\u001b[0m\n\u001b[1m\u001b[92mnote\u001b[0m: required because it appears within the type `rust_mcp_sdk::TransportError`\n \u001b[1m\u001b[96m--> \u001b[0mC:\\Users\\bythe\\.cargo\\registry\\src\\index.crates.io-1949cf8c6b5b557f\\rust-mcp-transport-0.9.0\\src\\error.rs:85:10\n \u001b[1m\u001b[96m|\u001b[0m\n \u001b[1m\u001b[96m85\u001b[0m \u001b[1m\u001b[96m|\u001b[0m pub enum TransportError {\n \u001b[1m\u001b[96m|\u001b[0m \u001b[1m\u001b[92m^^^^^^^^^^^^^^\u001b[0m\n \u001b[1m\u001b[96m= \u001b[0m\u001b[1m\u001b[97mnote\u001b[0m: required for `anyhow::Error` to implement `From<rust_mcp_sdk::TransportError>`\n\n"}
{"$message_type":"diagnostic","message":"mismatched types","code":{"code":"E0308","explanation":"Expected type did not match the received type.\n\nErroneous code examples:\n\n```compile_fail,E0308\nfn plus_one(x: i32) -> i32 {\n x + 1\n}\n\nplus_one(\"Not a number\");\n// ^^^^^^^^^^^^^^ expected `i32`, found `&str`\n\nif \"Not a bool\" {\n// ^^^^^^^^^^^^ expected `bool`, found `&str`\n}\n\nlet x: f32 = \"Not a float\";\n// --- ^^^^^^^^^^^^^ expected `f32`, found `&str`\n// |\n// expected due to this\n```\n\nThis error occurs when an expression was used in a place where the compiler\nexpected an expression of a different type. It can occur in several cases, the\nmost common being when calling a function and passing an argument which has a\ndifferent type than the matching type in the function declaration.\n"},"level":"error","spans":[{"file_name":"C:\\Users\\bythe\\.cargo\\registry\\src\\index.crates.io-1949cf8c6b5b557f\\serde_json-1.0.149\\src\\macros.rs","byte_start":9541,"byte_end":9718,"line_start":269,"line_end":273,"column_start":9,"column_end":11,"is_primary":true,"text":[{"text":" $crate::Value::Object({","highlight_start":9,"highlight_end":32},{"text":" let mut object = $crate::Map::new();","highlight_start":1,"highlight_end":49},{"text":" $crate::json_internal!(@object object () ($($tt)+) ($($tt)+));","highlight_start":1,"highlight_end":75},{"text":" object","highlight_start":1,"highlight_end":19},{"text":" })","highlight_start":1,"highlight_end":11}],"label":"expected `ToolInputSchema`, found `Value`","suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"C:\\Users\\bythe\\.cargo\\registry\\src\\index.crates.io-1949cf8c6b5b557f\\serde_json-1.0.149\\src\\macros.rs","byte_start":1430,"byte_end":1463,"line_start":57,"line_end":57,"column_start":9,"column_end":42,"is_primary":false,"text":[{"text":" $crate::json_internal!($($json)+)","highlight_start":9,"highlight_end":42}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"src\\main.rs","byte_start":936,"byte_end":1455,"line_start":31,"line_end":39,"column_start":35,"column_end":23,"is_primary":false,"text":[{"text":" input_schema: serde_json::json!({","highlight_start":35,"highlight_end":54},{"text":" \"type\": \"object\",","highlight_start":1,"highlight_end":42},{"text":" \"properties\": {","highlight_start":1,"highlight_end":40},{"text":" \"target\": { \"type\": \"string\", \"description\": \"送信先(slack, webhook, etc.)\" },","highlight_start":1,"highlight_end":104},{"text":" \"content\": { \"type\": \"string\", \"description\": \"送信内容\" },","highlight_start":1,"highlight_end":84},{"text":" \"metadata\": { \"type\": \"string\", \"description\": \"追加情報(任意)\" }","highlight_start":1,"highlight_end":88},{"text":" },","highlight_start":1,"highlight_end":27},{"text":" \"required\": [\"target\", \"content\"]","highlight_start":1,"highlight_end":58},{"text":" }),","highlight_start":1,"highlight_end":23}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},"macro_decl_name":"serde_json::json!","def_site_span":{"file_name":"C:\\Users\\bythe\\.cargo\\registry\\src\\index.crates.io-1949cf8c6b5b557f\\serde_json-1.0.149\\src\\macros.rs","byte_start":1303,"byte_end":1320,"line_start":54,"line_end":54,"column_start":1,"column_end":18,"is_primary":false,"text":[{"text":"macro_rules! json {","highlight_start":1,"highlight_end":18}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"$crate::json_internal!","def_site_span":{"file_name":"C:\\Users\\bythe\\.cargo\\registry\\src\\index.crates.io-1949cf8c6b5b557f\\serde_json-1.0.149\\src\\macros.rs","byte_start":1955,"byte_end":1981,"line_start":70,"line_end":70,"column_start":1,"column_end":27,"is_primary":false,"text":[{"text":"macro_rules! json_internal {","highlight_start":1,"highlight_end":27}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}}],"children":[],"rendered":"\u001b[1m\u001b[91merror[E0308]\u001b[0m\u001b[1m\u001b[97m: mismatched types\u001b[0m\n \u001b[1m\u001b[96m--> \u001b[0msrc\\main.rs:31:35\n \u001b[1m\u001b[96m|\u001b[0m\n\u001b[1m\u001b[96m31\u001b[0m \u001b[1m\u001b[96m|\u001b[0m input_schema: serde_json::json!({\n \u001b[1m\u001b[96m|\u001b[0m \u001b[1m\u001b[91m ___________________________________^\u001b[0m\n\u001b[1m\u001b[96m32\u001b[0m \u001b[1m\u001b[96m|\u001b[0m \u001b[1m\u001b[91m|\u001b[0m \"type\": \"object\",\n\u001b[1m\u001b[96m33\u001b[0m \u001b[1m\u001b[96m|\u001b[0m \u001b[1m\u001b[91m|\u001b[0m \"properties\": {\n\u001b[1m\u001b[96m34\u001b[0m \u001b[1m\u001b[96m|\u001b[0m \u001b[1m\u001b[91m|\u001b[0m \"target\": { \"type\": \"string\", \"description\": \"送信先(slack, webhook, etc.)\" },\n\u001b[1m\u001b[96m...\u001b[0m \u001b[1m\u001b[91m|\u001b[0m\n\u001b[1m\u001b[96m38\u001b[0m \u001b[1m\u001b[96m|\u001b[0m \u001b[1m\u001b[91m|\u001b[0m \"required\": [\"target\", \"content\"]\n\u001b[1m\u001b[96m39\u001b[0m \u001b[1m\u001b[96m|\u001b[0m \u001b[1m\u001b[91m|\u001b[0m }),\n \u001b[1m\u001b[96m|\u001b[0m \u001b[1m\u001b[91m|______________________^\u001b[0m \u001b[1m\u001b[91mexpected `ToolInputSchema`, found `Value`\u001b[0m\n \u001b[1m\u001b[96m|\u001b[0m\n \u001b[1m\u001b[96m= \u001b[0m\u001b[1m\u001b[97mnote\u001b[0m: this error originates in the macro `$crate::json_internal` which comes from the expansion of the macro `serde_json::json` (in Nightly builds, run with -Z macro-backtrace for more info)\n\n"}
{"$message_type":"diagnostic","message":"mismatched types","code":{"code":"E0308","explanation":"Expected type did not match the received type.\n\nErroneous code examples:\n\n```compile_fail,E0308\nfn plus_one(x: i32) -> i32 {\n x + 1\n}\n\nplus_one(\"Not a number\");\n// ^^^^^^^^^^^^^^ expected `i32`, found `&str`\n\nif \"Not a bool\" {\n// ^^^^^^^^^^^^ expected `bool`, found `&str`\n}\n\nlet x: f32 = \"Not a float\";\n// --- ^^^^^^^^^^^^^ expected `f32`, found `&str`\n// |\n// expected due to this\n```\n\nThis error occurs when an expression was used in a place where the compiler\nexpected an expression of a different type. It can occur in several cases, the\nmost common being when calling a function and passing an argument which has a\ndifferent type than the matching type in the function declaration.\n"},"level":"error","spans":[{"file_name":"C:\\Users\\bythe\\.cargo\\registry\\src\\index.crates.io-1949cf8c6b5b557f\\serde_json-1.0.149\\src\\macros.rs","byte_start":9541,"byte_end":9718,"line_start":269,"line_end":273,"column_start":9,"column_end":11,"is_primary":true,"text":[{"text":" $crate::Value::Object({","highlight_start":9,"highlight_end":32},{"text":" let mut object = $crate::Map::new();","highlight_start":1,"highlight_end":49},{"text":" $crate::json_internal!(@object object () ($($tt)+) ($($tt)+));","highlight_start":1,"highlight_end":75},{"text":" object","highlight_start":1,"highlight_end":19},{"text":" })","highlight_start":1,"highlight_end":11}],"label":"expected `ToolInputSchema`, found `Value`","suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"C:\\Users\\bythe\\.cargo\\registry\\src\\index.crates.io-1949cf8c6b5b557f\\serde_json-1.0.149\\src\\macros.rs","byte_start":1430,"byte_end":1463,"line_start":57,"line_end":57,"column_start":9,"column_end":42,"is_primary":false,"text":[{"text":" $crate::json_internal!($($json)+)","highlight_start":9,"highlight_end":42}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"src\\main.rs","byte_start":1696,"byte_end":1753,"line_start":44,"line_end":44,"column_start":35,"column_end":92,"is_primary":false,"text":[{"text":" input_schema: serde_json::json!({ \"type\": \"object\", \"properties\": {} }),","highlight_start":35,"highlight_end":92}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},"macro_decl_name":"serde_json::json!","def_site_span":{"file_name":"C:\\Users\\bythe\\.cargo\\registry\\src\\index.crates.io-1949cf8c6b5b557f\\serde_json-1.0.149\\src\\macros.rs","byte_start":1303,"byte_end":1320,"line_start":54,"line_end":54,"column_start":1,"column_end":18,"is_primary":false,"text":[{"text":"macro_rules! json {","highlight_start":1,"highlight_end":18}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"$crate::json_internal!","def_site_span":{"file_name":"C:\\Users\\bythe\\.cargo\\registry\\src\\index.crates.io-1949cf8c6b5b557f\\serde_json-1.0.149\\src\\macros.rs","byte_start":1955,"byte_end":1981,"line_start":70,"line_end":70,"column_start":1,"column_end":27,"is_primary":false,"text":[{"text":"macro_rules! json_internal {","highlight_start":1,"highlight_end":27}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}}],"children":[],"rendered":"\u001b[1m\u001b[91merror[E0308]\u001b[0m\u001b[1m\u001b[97m: mismatched types\u001b[0m\n \u001b[1m\u001b[96m--> \u001b[0msrc\\main.rs:44:35\n \u001b[1m\u001b[96m|\u001b[0m\n\u001b[1m\u001b[96m44\u001b[0m \u001b[1m\u001b[96m|\u001b[0m input_schema: serde_json::json!({ \"type\": \"object\", \"properties\": {} }),\n \u001b[1m\u001b[96m|\u001b[0m \u001b[1m\u001b[91m^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\u001b[0m \u001b[1m\u001b[91mexpected `ToolInputSchema`, found `Value`\u001b[0m\n \u001b[1m\u001b[96m|\u001b[0m\n \u001b[1m\u001b[96m= \u001b[0m\u001b[1m\u001b[97mnote\u001b[0m: this error originates in the macro `$crate::json_internal` which comes from the expansion of the macro `serde_json::json` (in Nightly builds, run with -Z macro-backtrace for more info)\n\n"}
{"$message_type":"diagnostic","message":"aborting due to 17 previous errors","code":null,"level":"error","spans":[],"children":[],"rendered":"\u001b[1m\u001b[91merror\u001b[0m\u001b[1m\u001b[97m: aborting due to 17 previous errors\u001b[0m\n\n"}
{"$message_type":"diagnostic","message":"Some errors have detailed explanations: E0063, E0277, E0308, E0407, E0425, E0432, E0609.","code":null,"level":"failure-note","spans":[],"children":[],"rendered":"\u001b[1m\u001b[97mSome errors have detailed explanations: E0063, E0277, E0308, E0407, E0425, E0432, E0609.\u001b[0m\n"}
{"$message_type":"diagnostic","message":"For more information about an error, try `rustc --explain E0063`.","code":null,"level":"failure-note","spans":[],"children":[],"rendered":"\u001b[1m\u001b[97mFor more information about an error, try `rustc --explain E0063`.\u001b[0m\n"}