feat: friendly tool names per MCP title field or manifest
- Aggiunto campo 'title' a tools/list in tutti gli script MCP locali (Gmail, Gcal, Drive, Email, SSH, Weather, Wikipedia, WhatsApp) - Aggiunto tools[]/display_name nel manifest per connector remoti/package esterni (Firecrawl, HTTP Fetch, Exa, Tavily, SerpAPI Flights) - Documentata convenzione e resolution order in SKALD.md - Aggiornata manifest_guide.md per tools[] in connectors.json - Bumped version e sha256 per tutti i 13 connector
This commit is contained in:
@@ -318,7 +318,7 @@ def _status() -> dict:
|
||||
|
||||
|
||||
# ── Tool registry ──────────────────────────────────────────────────────────
|
||||
TOOLS: dict[str, tuple[Callable, str, dict]] = {
|
||||
TOOLS: dict[str, tuple[Callable, str, dict, str]] = {
|
||||
"status": (
|
||||
_status,
|
||||
"Check if the Drive API is reachable and credentials are valid.",
|
||||
@@ -327,7 +327,7 @@ TOOLS: dict[str, tuple[Callable, str, dict]] = {
|
||||
"properties": {},
|
||||
"required": [],
|
||||
},
|
||||
),
|
||||
"Status"),
|
||||
"list_files": (
|
||||
_list_files,
|
||||
"List files in a folder (or root if no folder_id given). Returns paginated results.",
|
||||
@@ -352,7 +352,7 @@ TOOLS: dict[str, tuple[Callable, str, dict]] = {
|
||||
},
|
||||
"required": [],
|
||||
},
|
||||
),
|
||||
"List Files"),
|
||||
"search_files": (
|
||||
_search_files,
|
||||
"Search files across Drive by name or content.",
|
||||
@@ -371,7 +371,7 @@ TOOLS: dict[str, tuple[Callable, str, dict]] = {
|
||||
},
|
||||
"required": ["query"],
|
||||
},
|
||||
),
|
||||
"Search Files"),
|
||||
"get_file_metadata": (
|
||||
_get_file_metadata,
|
||||
"Get detailed metadata for a specific file by ID.",
|
||||
@@ -385,7 +385,7 @@ TOOLS: dict[str, tuple[Callable, str, dict]] = {
|
||||
},
|
||||
"required": ["file_id"],
|
||||
},
|
||||
),
|
||||
"Get File Metadata"),
|
||||
"upload_file": (
|
||||
_upload_file,
|
||||
"Upload a local file to Google Drive.",
|
||||
@@ -409,7 +409,7 @@ TOOLS: dict[str, tuple[Callable, str, dict]] = {
|
||||
},
|
||||
"required": ["local_path"],
|
||||
},
|
||||
),
|
||||
"Upload File"),
|
||||
"download_file": (
|
||||
_download_file,
|
||||
"Download a file from Drive. Returns base64 content if no output_path, or saves to disk.",
|
||||
@@ -428,7 +428,7 @@ TOOLS: dict[str, tuple[Callable, str, dict]] = {
|
||||
},
|
||||
"required": ["file_id"],
|
||||
},
|
||||
),
|
||||
"Download File"),
|
||||
"delete_file": (
|
||||
_delete_file,
|
||||
"Permanently delete a file from Google Drive.",
|
||||
@@ -442,7 +442,7 @@ TOOLS: dict[str, tuple[Callable, str, dict]] = {
|
||||
},
|
||||
"required": ["file_id"],
|
||||
},
|
||||
),
|
||||
"Delete File"),
|
||||
"create_folder": (
|
||||
_create_folder,
|
||||
"Create a new folder in Google Drive.",
|
||||
@@ -461,7 +461,7 @@ TOOLS: dict[str, tuple[Callable, str, dict]] = {
|
||||
},
|
||||
"required": ["name"],
|
||||
},
|
||||
),
|
||||
"Create Folder"),
|
||||
}
|
||||
|
||||
|
||||
@@ -496,10 +496,11 @@ def _handle_request(req: dict) -> None:
|
||||
# List available tools
|
||||
if method == "tools/list":
|
||||
tool_list = []
|
||||
for name, (fn, desc, schema) in sorted(TOOLS.items()):
|
||||
for name, (fn, desc, schema, title) in sorted(TOOLS.items()):
|
||||
tool_list.append({
|
||||
"name": name,
|
||||
"description": desc,
|
||||
"title": title,
|
||||
"inputSchema": schema,
|
||||
})
|
||||
_send_response(rid, {"tools": tool_list})
|
||||
|
||||
Reference in New Issue
Block a user