@@ -107,6 +107,41 @@ def test_agentic_app_with_remote_tools(self) -> None:
107107 app .delete ()
108108 self .restart_splunk () # app removal requires a restart
109109
110+ # To execute this test locally, download the Splunk MCP Server App tarball from
111+ # https://splunkbase.splunk.com/app/7931 and place it in a file named
112+ # splunk-mcp-server.tgz at the root of this repo (i.e. ../../splunk-mcp-server.tgz).
113+ #
114+ # Note: that the downloaded file could have a: .spl, .tar, .tar.gz or .tgz extension,
115+ # if it is not .tgz, then you must change it to .tgz.
116+ #
117+ # Our CI does this automatically.
118+ def test_remote_tools_have_tags (self ) -> None :
119+ pytest .importorskip ("langchain_openai" )
120+ self .requires_splunk_10_2 ()
121+
122+ # Skip test in case the instance does not have a /splunk-mcp-server.tgz file.
123+ try :
124+ resp = self .service .get ("agentic_app/has_mcp_app_file" )
125+ assert resp .status == 200
126+ except HTTPError as e :
127+ if e .status == 404 :
128+ pytest .skip ("Splunk MCP Server App file not found on Splunk instance" )
129+ raise
130+
131+ app = self .service .apps .create (name = "/splunk-mcp-server.tgz" , filename = True ) # pyright: ignore[reportUnknownVariableType]
132+
133+ resp = self .service .post (
134+ "agentic_app/tool-tags" ,
135+ body = self .test_llm_settings .model_dump_json (),
136+ )
137+
138+ assert resp .status == 200
139+ body = str (resp .body ) # pyright: ignore[reportUnknownArgumentType]
140+ assert "tags" in body
141+
142+ app .delete ()
143+ self .restart_splunk () # app removal requires a restart
144+
110145 def requires_splunk_10_2 (self ) -> None :
111146 if self .service .splunk_version [0 ] < 10 or self .service .splunk_version [1 ] < 2 :
112147 pytest .skip ("Python 3.13 not available on splunk < 10.2" )
0 commit comments