gmaps: fix missing dependency install + wire verify (v6 / 1.1.0)

The connector shipped no requirements.txt, so ensure_installed_host()
installed nothing and every tool call failed with "No module named
'googlemaps'" while the server still answered tools/list — skald logged
"connected — 6 tool(s)" on a connector that could not work.

- add requirements.txt (googlemaps>=4.10.0); deps were declared in the
  manifest's `dependencies` field, which skald only uses for the card
- wire the shipped verify.py through a `verify` manifest block, so a
  broken install fails visibly at enable time instead of silently
- verify.py puts .pydeps on sys.path: skald sets PYTHONPATH only for the
  server process, not for the `sh -c "python3 verify.py"` verify step
- drop the inert mcp_config.env {SECRET:…} placeholder — those tokens are
  substituted in the URL only, never in env values
- realign manifest/fragment versions (were 2/1.0.1 vs 5/1.0.4); skald
  prefers the manifest, so "update available" could never appear
- requires ENV -> API_KEY; drop deprecated secrets/ path from error text
- regenerate the index
This commit is contained in:
Daniele
2026-08-10 12:38:32 +01:00
parent 2ad3954e3a
commit 73d1a51b1f
7 changed files with 62 additions and 29 deletions
+9 -7
View File
@@ -9,8 +9,9 @@ Capabilities (callable as `mcp__gmaps__<tool>`):
distance_matrix — travel time & distance between multiple origins/destinations
Auth:
API key is read from env var GOOGLE_MAPS_API_KEY, or from the file at
GOOGLE_MAPS_API_KEY_FILE (default: ./secrets/gmaps_api_key.txt).
API key is read from env var GOOGLE_MAPS_API_KEY, injected by Skald from the
connector's `env[]` form field. A file fallback (GOOGLE_MAPS_API_KEY_FILE)
exists for standalone runs only.
Required Google Cloud APIs to enable:
- Directions API
@@ -81,8 +82,8 @@ def _get_client():
if not api_key:
_init_error = (
"Google Maps API key not found. "
"Set GOOGLE_MAPS_API_KEY env var or create secrets/gmaps_api_key.txt "
"with just the key on the first line."
"Open the Google Maps connector in Skald and paste the API key into "
"the 'Google Maps API key' field, then re-enable it."
)
log(_init_error)
return None
@@ -119,7 +120,7 @@ def _format_gmaps_error(e: Exception, api_label: str) -> str:
if status == "REQUEST_DENIED":
return (
f"Error: {api_label} API request denied (REQUEST_DENIED). "
"Verify that the API key in secrets/gmaps_api_key.txt is valid and that "
"Verify that the API key configured for this connector is valid and that "
f"the {api_label} API is enabled in the Google Cloud Console."
)
if status == "INVALID_REQUEST":
@@ -163,8 +164,9 @@ def _maps_status(args: dict) -> str:
if not api_key:
return (
"Error: Google Maps API key not found. "
"Set GOOGLE_MAPS_API_KEY env var or create secrets/gmaps_api_key.txt "
"with the key on the first line. No Google Maps tool will work until this is fixed."
"Ask the administrator to open the Google Maps connector in Skald and paste "
"the API key into the 'Google Maps API key' field. "
"No Google Maps tool will work until this is fixed."
)
# Step 2: dependency present + client built?