MCPcopy Create free account
hub / github.com/ScaleML/AgentSPEX / _som_tool_msg

Function _som_tool_msg

tests/tool_tests/test_vision_pipeline.py:182–198  ·  view source on GitHub ↗

Tool message whose content JSON contains som_elements.

(n_elements: int, url: str = "https://example.com")

Source from the content-addressed store, hash-verified

180
181
182def _som_tool_msg(n_elements: int, url: str = "https://example.com"):
183 """Tool message whose content JSON contains som_elements."""
184 content = json.dumps(
185 {
186 "url": url,
187 "som_filename": "/shots/shot.png",
188 "som_elements": [
189 f"id: {i}, text: elem{i}, tag: button" for i in range(1, n_elements + 1)
190 ],
191 }
192 )
193 return {
194 "role": "tool",
195 "tool_call_id": "x",
196 "name": "browser_navigate",
197 "content": content,
198 }
199
200
201def _plain_tool_msg():

Calls

no outgoing calls

Tested by

no test coverage detected