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

Function _resolve_path

src/mcp_cli/planning/executor.py:939–948  ·  view source on GitHub ↗

Resolve a dotted variable path like 'api.endpoint.port'.

(var_path: str, variables: dict[str, Any])

Source from the content-addressed store, hash-verified

937
938
939def _resolve_path(var_path: str, variables: dict[str, Any]) -> Any:
940 """Resolve a dotted variable path like 'api.endpoint.port'."""
941 parts = var_path.split(".")
942 current: Any = variables
943 for part in parts:
944 if isinstance(current, dict) and part in current:
945 current = current[part]
946 else:
947 return None
948 return current
949
950
951# ── Callback Helpers ──────────────────────────────────────────────────────

Callers 2

_resolve_stringFunction · 0.85
replacerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected