@@ -1274,8 +1274,6 @@ def simple_test_tool(message: str) -> str:
12741274 assert tool_span ["data" ]["gen_ai.tool.input" ] == '{"message": "hello"}'
12751275 assert tool_span ["data" ]["gen_ai.tool.name" ] == "simple_test_tool"
12761276 assert tool_span ["data" ]["gen_ai.tool.output" ] == "Tool executed with: hello"
1277- assert tool_span ["data" ]["gen_ai.tool.type" ] == "function"
1278-
12791277 assert ai_client_span2 ["description" ] == "chat gpt-4"
12801278 assert ai_client_span2 ["data" ]["gen_ai.agent.name" ] == "test_agent"
12811279 assert ai_client_span2 ["data" ]["gen_ai.operation.name" ] == "chat"
@@ -1896,17 +1894,13 @@ async def test_mcp_tool_execution_spans(
18961894 # Find the MCP execute_tool span
18971895 mcp_tool_span = None
18981896 for span in spans :
1899- if (
1900- span .get ("description" ) == "execute_tool test_mcp_tool"
1901- and span .get ("data" , {}).get ("gen_ai.tool.type" ) == "mcp"
1902- ):
1897+ if span .get ("description" ) == "execute_tool test_mcp_tool" :
19031898 mcp_tool_span = span
19041899 break
19051900
19061901 # Verify the MCP tool span was created
19071902 assert mcp_tool_span is not None , "MCP execute_tool span was not created"
19081903 assert mcp_tool_span ["description" ] == "execute_tool test_mcp_tool"
1909- assert mcp_tool_span ["data" ]["gen_ai.tool.type" ] == "mcp"
19101904 assert mcp_tool_span ["data" ]["gen_ai.tool.name" ] == "test_mcp_tool"
19111905 assert mcp_tool_span ["data" ]["gen_ai.tool.input" ] == '{"query": "search term"}'
19121906 assert (
@@ -2028,17 +2022,13 @@ async def test_mcp_tool_execution_with_error(
20282022 # Find the MCP execute_tool span with error
20292023 mcp_tool_span = None
20302024 for span in spans :
2031- if (
2032- span .get ("description" ) == "execute_tool failing_mcp_tool"
2033- and span .get ("data" , {}).get ("gen_ai.tool.type" ) == "mcp"
2034- ):
2025+ if span .get ("description" ) == "execute_tool failing_mcp_tool" :
20352026 mcp_tool_span = span
20362027 break
20372028
20382029 # Verify the MCP tool span was created with error status
20392030 assert mcp_tool_span is not None , "MCP execute_tool span was not created"
20402031 assert mcp_tool_span ["description" ] == "execute_tool failing_mcp_tool"
2041- assert mcp_tool_span ["data" ]["gen_ai.tool.type" ] == "mcp"
20422032 assert mcp_tool_span ["data" ]["gen_ai.tool.name" ] == "failing_mcp_tool"
20432033 assert mcp_tool_span ["data" ]["gen_ai.tool.input" ] == '{"query": "test"}'
20442034 assert mcp_tool_span ["data" ]["gen_ai.tool.output" ] is None
@@ -2158,17 +2148,13 @@ async def test_mcp_tool_execution_without_pii(
21582148 # Find the MCP execute_tool span
21592149 mcp_tool_span = None
21602150 for span in spans :
2161- if (
2162- span .get ("description" ) == "execute_tool test_mcp_tool"
2163- and span .get ("data" , {}).get ("gen_ai.tool.type" ) == "mcp"
2164- ):
2151+ if span .get ("description" ) == "execute_tool test_mcp_tool" :
21652152 mcp_tool_span = span
21662153 break
21672154
21682155 # Verify the MCP tool span was created but without input/output
21692156 assert mcp_tool_span is not None , "MCP execute_tool span was not created"
21702157 assert mcp_tool_span ["description" ] == "execute_tool test_mcp_tool"
2171- assert mcp_tool_span ["data" ]["gen_ai.tool.type" ] == "mcp"
21722158 assert mcp_tool_span ["data" ]["gen_ai.tool.name" ] == "test_mcp_tool"
21732159
21742160 # Verify input and output are not included when send_default_pii is False
0 commit comments