MCPcopy Create free account
hub / github.com/IBM/AssetOpsBench / _resolve_args

Function _resolve_args

src/agent/plan_execute/executor.py:335–348  ·  view source on GitHub ↗

Simple string substitution of {{step_N}} placeholders (kept for tests).

(args: dict, context: dict[int, StepResult])

Source from the content-addressed store, hash-verified

333
334
335def _resolve_args(args: dict, context: dict[int, StepResult]) -> dict:
336 """Simple string substitution of {{step_N}} placeholders (kept for tests)."""
337 resolved = {}
338 for key, val in args.items():
339 if isinstance(val, str):
340
341 def _sub(m: re.Match) -> str:
342 n = int(m.group(1))
343 return context[n].response if n in context else m.group(0)
344
345 resolved[key] = _PLACEHOLDER_RE.sub(_sub, val)
346 else:
347 resolved[key] = val
348 return resolved
349
350
351def _parse_tool_call(raw: str) -> dict:

Calls

no outgoing calls