pub fn define_tool(
name: &str,
description: &str,
parameters_schema: Option<Value>,
) -> ToolExpand description
Define a tool with metadata for registration on a session.
Returns a Tool struct with name, description, and parameters schema.
The handler must be registered separately on the session via
session.register_tool_with_handler().
§Example
use copilot_sdk::tools::define_tool;
use serde_json::json;
let tool = define_tool(
"my_tool",
"A description of my tool",
Some(json!({"type": "object", "properties": {"query": {"type": "string"}}})),
);
// Register on session: session.register_tool_with_handler(tool, Some(handler)).await;