MCPcopy Index your code
hub / github.com/github/copilot-sdk / CanvasAction

Class CanvasAction

python/copilot/generated/rpc.py:647–675  ·  view source on GitHub ↗

Canvas action that the agent or host can invoke. To discover the input schema for a particular action, call the list_canvas_capabilities tool.

Source from the content-addressed store, hash-verified

645# Experimental: this type is part of an experimental API and may change or be removed.
646@dataclass
647class CanvasAction:
648 """Canvas action that the agent or host can invoke. To discover the input schema for a
649 particular action, call the list_canvas_capabilities tool.
650 """
651 name: str
652 """Action name exposed by the canvas provider"""
653
654 description: str | None = None
655 """Description of the action"""
656
657 input_schema: Any = None
658 """JSON Schema for the action input"""
659
660 @staticmethod
661 def from_dict(obj: Any) -> 'CanvasAction':
662 assert isinstance(obj, dict)
663 name = from_str(obj.get("name"))
664 description = from_union([from_str, from_none], obj.get("description"))
665 input_schema = obj.get("inputSchema")
666 return CanvasAction(name, description, input_schema)
667
668 def to_dict(self) -> dict:
669 result: dict = {}
670 result["name"] = from_str(self.name)
671 if self.description is not None:
672 result["description"] = from_union([from_str, from_none], self.description)
673 if self.input_schema is not None:
674 result["inputSchema"] = self.input_schema
675 return result
676
677# Experimental: this type is part of an experimental API and may change or be removed.
678@dataclass

Callers 2

_counter_canvasFunction · 0.90
from_dictMethod · 0.70

Calls

no outgoing calls

Tested by 1

_counter_canvasFunction · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…