MCPcopy
hub / github.com/agentskills/agentskills / to_dict

Method to_dict

skills-ref/src/skills_ref/models.py:28–39  ·  view source on GitHub ↗

Convert to dictionary, excluding None values.

(self)

Source from the content-addressed store, hash-verified

26 metadata: dict[str, str] = field(default_factory=dict)
27
28 def to_dict(self) -> dict:
29 """Convert to dictionary, excluding None values."""
30 result = {"name": self.name, "description": self.description}
31 if self.license is not None:
32 result["license"] = self.license
33 if self.compatibility is not None:
34 result["compatibility"] = self.compatibility
35 if self.allowed_tools is not None:
36 result["allowed-tools"] = self.allowed_tools
37 if self.metadata:
38 result["metadata"] = self.metadata
39 return result

Callers 2

read_properties_cmdFunction · 0.80

Calls

no outgoing calls

Tested by 1