MCPcopy Create free account
hub / github.com/IBM/mcp-cli / _execute

Method _execute

examples/sample_tools/weather_tool.py:23–31  ·  view source on GitHub ↗

Simulate a weather‑API call (demo only).

(self, location: str, units: str)

Source from the content-addressed store, hash-verified

21 location: str
22
23 def _execute(self, location: str, units: str) -> dict: # sync implementation
24 """Simulate a weather‑API call (demo only)."""
25 time.sleep(0.5) # pretend network latency
26 return {
27 "temperature": 22.5,
28 "conditions": "Partly Cloudy",
29 "humidity": 65.0,
30 "location": location,
31 }

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected