{"record":{"id":"08c031ae38336278","repo":"zed-industries/zed","slug":"copilot-chat-does-not-support-custom-tools","errorCode":null,"errorMessage":"Copilot Chat does not support custom tools","messagePattern":"Copilot Chat does not support custom tools","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/copilot_chat/src/model.rs","lineNumber":999,"sourceCode":"                            .and_then(|v| v.as_str())\n                            .map(|s| s.to_string());\n                        (opaque, text)\n                    } else {\n                        (None, None)\n                    };\n\n                messages.push(ChatMessage::Assistant {\n                    content: if text_content.is_empty() {\n                        ChatMessageContent::empty()\n                    } else {\n                        text_content.into()\n                    },\n                    tool_calls,\n                    reasoning_opaque,\n                    reasoning_text,\n                });\n            }\n            Role::System => messages.push(ChatMessage::System {\n                content: message.string_contents(),\n            }),\n        }\n    }\n\n    let tools = request\n        .tools\n        .iter()\n        .map(|tool| match &tool.input {\n            language_model::LanguageModelRequestToolInput::Function { input_schema, .. } => {\n                Ok(Tool::Function {\n                    function: Function {\n                        name: tool.name.clone(),\n                        description: tool.description.clone(),\n                        parameters: input_schema.clone(),\n                    },\n                })\n            }","sourceCodeStart":981,"sourceCodeEnd":1017,"githubUrl":"https://github.com/zed-industries/zed/blob/916fc2b8cb3a815cbef4a3b40e13081be72036b6/crates/copilot_chat/src/model.rs#L981-L1017","documentation":"While converting the request's tools to Copilot Chat format, a tool whose input is not a plain function (e.g. an MCP-style tool) was found; Copilot Chat only accepts function tools, so the request is rejected before it is sent.","triggerScenarios":"Thrown at crates/copilot_chat/src/model.rs:980 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Exclude non-function tools from Copilot Chat requests","Use a model provider that supports the required tool types"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"916fc2b8cb3a815cbef4a3b40e13081be72036b6","analyzedAt":"2026-08-20T19:29:52.058Z","contentChangedAt":"2026-08-20T19:29:52.058Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}