MCPcopy Create free account
hub / github.com/Virtual-Protocol/virtuals-python / toJson

Method toJson

src/virtuals_sdk/twitter_agent/agent.py:55–63  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

53 self.id = self.id or str(uuid.uuid4())
54
55 def toJson(self):
56 return {
57 "id": self.id,
58 "fn_name": self.fn_name,
59 "fn_description": self.fn_description,
60 "args": [asdict(arg) for arg in self.args],
61 "hint": self.hint,
62 "config": asdict(self.config)
63 }
64
65 def _validate_args(self, *args) -> Dict[str, Any]:
66 """Validate and convert positional arguments to named arguments"""

Callers 2

simulateMethod · 0.80
reactMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected