@@ -179,7 +179,6 @@ def test_from_component_basic(self):
179179 assert tool .description == "A simple component that generates text."
180180 assert tool .parameters == {
181181 "type" : "object" ,
182- "description" : "A simple component that generates text." ,
183182 "properties" : {"text" : {"type" : "string" , "description" : "user's name" }},
184183 "required" : ["text" ],
185184 }
@@ -198,21 +197,13 @@ def test_from_component_with_inputs_from_state(self):
198197 tool = ComponentTool (component = SimpleComponent (), inputs_from_state = {"text" : "text" })
199198 assert tool .inputs_from_state == {"text" : "text" }
200199 # Inputs should be excluded from schema generation
201- assert tool .parameters == {
202- "type" : "object" ,
203- "properties" : {},
204- "description" : "A simple component that generates text." ,
205- }
200+ assert tool .parameters == {"type" : "object" , "properties" : {}}
206201
207202 def test_from_component_with_inputs_from_state_different_names (self ):
208203 tool = ComponentTool (component = SimpleComponent (), inputs_from_state = {"state_text" : "text" })
209204 assert tool .inputs_from_state == {"state_text" : "text" }
210205 # Inputs should be excluded from schema generation
211- assert tool .parameters == {
212- "type" : "object" ,
213- "properties" : {},
214- "description" : "A simple component that generates text." ,
215- }
206+ assert tool .parameters == {"type" : "object" , "properties" : {}}
216207
217208 def test_from_component_with_invalid_inputs_from_state_nested_dict (self ):
218209 """Test that ComponentTool rejects nested dict format for inputs_from_state"""
@@ -240,7 +231,6 @@ def test_from_component_with_dataclass(self):
240231 "type" : "object" ,
241232 }
242233 },
243- "description" : "A simple component that processes a User." ,
244234 "properties" : {"user" : {"$ref" : "#/$defs/User" , "description" : "The User object to process." }},
245235 "required" : ["user" ],
246236 "type" : "object" ,
@@ -262,7 +252,6 @@ def test_from_component_with_list_input(self):
262252
263253 assert tool .parameters == {
264254 "type" : "object" ,
265- "description" : "Concatenates a list of strings into a single string." ,
266255 "properties" : {
267256 "texts" : {
268257 "type" : "array" ,
@@ -303,7 +292,6 @@ def test_from_component_with_nested_dataclass(self):
303292 "type" : "object" ,
304293 },
305294 },
306- "description" : "Creates information about the person." ,
307295 "properties" : {"person" : {"$ref" : "#/$defs/Person" , "description" : "The Person to process." }},
308296 "required" : ["person" ],
309297 "type" : "object" ,
@@ -328,7 +316,6 @@ def test_from_component_with_list_of_documents(self):
328316 "Document" : DOCUMENT_SCHEMA ,
329317 "SparseEmbedding" : SPARSE_EMBEDDING_SCHEMA ,
330318 },
331- "description" : "Concatenates the content of multiple documents with newlines." ,
332319 "properties" : {
333320 "documents" : {
334321 "description" : "List of Documents whose content will be concatenated" ,
@@ -351,7 +338,6 @@ def test_from_component_with_dynamic_input_types(self):
351338 builder = PromptBuilder (template = "Hello, {{name}}!" )
352339 tool = ComponentTool (component = builder , name = "prompt_builder_tool" )
353340 assert tool .parameters == {
354- "description" : "Renders the prompt template with the provided variables." ,
355341 "properties" : {
356342 "name" : {"description" : "Input 'name' for the component." },
357343 "template" : {
@@ -417,10 +403,9 @@ def run(self, text: str, number: int = 42) -> dict[str, str]:
417403 # Create ComponentTool from SuperComponent
418404 tool = ComponentTool (component = super_comp , name = "text_processor" )
419405
420- # Verify that schema includes the docstrings from the original component
406+ # Verify that schema includes the per-parameter docstrings from the original component
421407 assert tool .parameters == {
422408 "type" : "object" ,
423- "description" : "A component that combines: 'processor': Process inputs and return result." ,
424409 "properties" : {
425410 "input_text" : {
426411 "type" : "string" ,
@@ -484,11 +469,9 @@ def run(self, text: str) -> dict[str, str]:
484469 # Create ComponentTool from SuperComponent
485470 tool = ComponentTool (component = super_comp , name = "combined_processor" )
486471
487- # Verify that schema includes combined docstrings from both components
472+ # Verify that schema includes combined per-parameter docstrings from both components
488473 assert tool .parameters == {
489474 "type" : "object" ,
490- "description" : "A component that combines: 'comp_a': Process query in component A., 'comp_b': Process "
491- "text in component B." ,
492475 "properties" : {
493476 "combined_input" : {
494477 "type" : "string" ,
0 commit comments