File tree Expand file tree Collapse file tree 3 files changed +15
-9
lines changed Expand file tree Collapse file tree 3 files changed +15
-9
lines changed Original file line number Diff line number Diff line change @@ -185,6 +185,5 @@ for (const name of builtNames) {
185185` ;
186186 fs . writeFileSync ( hashedHtmlPath , html , { encoding : "utf8" } ) ;
187187 fs . writeFileSync ( liveHtmlPath , html , { encoding : "utf8" } ) ;
188- console . log ( `${ hashedHtmlPath } (generated live HTML)` ) ;
189- console . log ( `${ liveHtmlPath } (generated live HTML)` ) ;
188+ console . log ( `${ liveHtmlPath } ` ) ;
190189}
Original file line number Diff line number Diff line change @@ -153,6 +153,12 @@ const tools: Tool[] = widgets.map((widget) => ({
153153 inputSchema : toolInputSchema ,
154154 title : widget . title ,
155155 _meta : widgetMeta ( widget ) ,
156+ // To disable the approval prompt for the widgets
157+ annotations : {
158+ destructiveHint : false ,
159+ openWorldHint : false ,
160+ readOnlyHint : true ,
161+ } ,
156162} ) ) ;
157163
158164const resources : Resource [ ] = widgets . map ( ( widget ) => ( {
Original file line number Diff line number Diff line change @@ -138,12 +138,7 @@ def _tool_meta(widget: PizzazWidget) -> Dict[str, Any]:
138138 "openai/toolInvocation/invoking" : widget .invoking ,
139139 "openai/toolInvocation/invoked" : widget .invoked ,
140140 "openai/widgetAccessible" : True ,
141- "openai/resultCanProduceWidget" : True ,
142- "annotations" : {
143- "destructiveHint" : False ,
144- "openWorldHint" : False ,
145- "readOnlyHint" : True ,
146- }
141+ "openai/resultCanProduceWidget" : True
147142 }
148143
149144
@@ -168,6 +163,12 @@ async def _list_tools() -> List[types.Tool]:
168163 description = widget .title ,
169164 inputSchema = deepcopy (TOOL_INPUT_SCHEMA ),
170165 _meta = _tool_meta (widget ),
166+ # To disable the approval prompt for the tools
167+ annotations = {
168+ "destructiveHint" : False ,
169+ "openWorldHint" : False ,
170+ "readOnlyHint" : True ,
171+ },
171172 )
172173 for widget in widgets
173174 ]
@@ -276,7 +277,7 @@ async def _call_tool_request(req: types.CallToolRequest) -> types.ServerResult:
276277 )
277278 ],
278279 structuredContent = {"pizzaTopping" : topping },
279- _meta = meta ,
280+ _meta = meta
280281 )
281282 )
282283
You can’t perform that action at this time.
0 commit comments