feat: add permission field to the list tools response (#2080)

This commit is contained in:
Yingjie He
2025-04-08 09:47:29 -07:00
committed by GitHub
parent 76e2686c74
commit 318f419861
9 changed files with 152 additions and 17 deletions
+52
View File
@@ -19,6 +19,18 @@
"super::routes::agent"
],
"operationId": "get_tools",
"parameters": [
{
"name": "extension_name",
"in": "query",
"description": "Optional extension name to filter tools",
"required": false,
"schema": {
"type": "string",
"nullable": true
}
}
],
"responses": {
"200": {
"description": "Tools retrieved successfully",
@@ -547,6 +559,15 @@
}
}
},
"PermissionLevel": {
"type": "string",
"description": "Enum representing the possible permission levels for a tool.",
"enum": [
"always_allow",
"ask_before",
"never_allow"
]
},
"ProviderDetails": {
"type": "object",
"required": [
@@ -688,6 +709,37 @@
}
}
},
"ToolInfo": {
"type": "object",
"description": "Information about the tool used for building prompts",
"required": [
"name",
"description",
"parameters"
],
"properties": {
"description": {
"type": "string"
},
"name": {
"type": "string"
},
"parameters": {
"type": "array",
"items": {
"type": "string"
}
},
"permission": {
"allOf": [
{
"$ref": "#/components/schemas/PermissionLevel"
}
],
"nullable": true
}
}
},
"UpsertConfigQuery": {
"type": "object",
"required": [