MCPcopy Create free account
hub / github.com/ChrisFeldmeier/OpenCodeRust / list_tools

Function list_tools

crates/opencode-server/src/routes.rs:4124–4147  ·  view source on GitHub ↗
(Query(_params): Query<HashMap<String, String>>)

Source from the content-addressed store, hash-verified

4122}
4123
4124async fn list_tools(Query(_params): Query<HashMap<String, String>>) -> Json<Vec<ToolInfo>> {
4125 Json(vec![
4126 ToolInfo {
4127 id: "read".to_string(),
4128 name: "Read".to_string(),
4129 description: "Read files".to_string(),
4130 },
4131 ToolInfo {
4132 id: "write".to_string(),
4133 name: "Write".to_string(),
4134 description: "Write files".to_string(),
4135 },
4136 ToolInfo {
4137 id: "edit".to_string(),
4138 name: "Edit".to_string(),
4139 description: "Edit files".to_string(),
4140 },
4141 ToolInfo {
4142 id: "bash".to_string(),
4143 name: "Bash".to_string(),
4144 description: "Execute commands".to_string(),
4145 },
4146 ])
4147}
4148
4149#[derive(Debug, Serialize, Deserialize)]
4150pub struct WorktreeInfo {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected