(self)
| 133 | """MCP Tool wrapper""" |
| 134 | |
| 135 | def get_log_object(self) -> LogItem: |
| 136 | return self.agent.context.log.log( |
| 137 | type="mcp", |
| 138 | heading=f"icon://extension {self.agent.agent_name}: Using MCP tool '{self.name}'", |
| 139 | content="", |
| 140 | kvps={"tool_name": self.name, **self.args}, |
| 141 | id=str(uuid.uuid4()), |
| 142 | ) |
| 143 | |
| 144 | def _context_id(self) -> str: |
| 145 | return str(getattr(getattr(self.agent, "context", None), "id", "") or "").strip() |