Skip to content
This repository was archived by the owner on Apr 29, 2025. It is now read-only.

Commit 7ceb9a0

Browse files
committed
add output to info
1 parent 9cc5007 commit 7ceb9a0

File tree

3 files changed

+31
-1
lines changed

3 files changed

+31
-1
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ and this project adheres to [SimpleTool](https://github.com/nchekwa/simpletool-p
1010

1111
### Added
1212
- Make SimpleTool picklable by only serializing essential attributes
13+
- add output_schema in info property
1314

1415
## [0.0.18] - 2025-01-13 Milestone Alpha2
1516

simpletool/__init__.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,8 @@ def info(self) -> str:
363363
return json.dumps({
364364
"name": self.name,
365365
"description": self.description,
366-
"input_schema": sorted_input_schema
366+
"input_schema": sorted_input_schema,
367+
"output_schema": self.output_schema
367368
}, indent=4)
368369

369370
@property

tool_example.txt

+28
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,34 @@ Type: <class 'str'>
2222
"required": [
2323
"text"
2424
]
25+
},
26+
"output_schema": {
27+
"type": "array",
28+
"items": {
29+
"oneOf": [
30+
{
31+
"additionalProperties": true,
32+
"description": "Text content for a message.",
33+
"properties": {
34+
"type": {
35+
"const": "text",
36+
"default": "text",
37+
"title": "Type",
38+
"type": "string"
39+
},
40+
"text": {
41+
"title": "Text",
42+
"type": "string"
43+
}
44+
},
45+
"required": [
46+
"text"
47+
],
48+
"title": "TextContent",
49+
"type": "object"
50+
}
51+
]
52+
}
2553
}
2654
}
2755

0 commit comments

Comments
 (0)