MCPcopy Create free account
hub / github.com/agentforce314/clawcodex / _print_invocation

Function _print_invocation

scripts/run_skill_smoke.py:103–123  ·  view source on GitHub ↗
(
    skill_name: str, args: str, ctx: ToolContext
)

Source from the content-addressed store, hash-verified

101
102
103def _print_invocation(
104 skill_name: str, args: str, ctx: ToolContext
105) -> None:
106 result = SkillTool.call({"skill": skill_name, "args": args}, ctx)
107 out = result.output
108 head = f"--- /{skill_name}"
109 if args:
110 head += f' "{args}"'
111 head += " ---"
112 print(f"\n{head}")
113 if not out.get("success"):
114 print(f" ERROR: {out}")
115 return
116 prompt = out["prompt"]
117 preview = prompt if len(prompt) <= PREVIEW_CHARS else (
118 prompt[:PREVIEW_CHARS] + f"\n... [truncated, total {len(prompt)} chars]"
119 )
120 for line in preview.splitlines():
121 print(f" {line}")
122 if out.get("loadedFrom"):
123 print(f" [loadedFrom={out['loadedFrom']}, allowedTools={out.get('allowedTools')}]")
124
125
126def main() -> int:

Callers 1

mainFunction · 0.85

Calls 2

callMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected