File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -304,6 +304,19 @@ async def handle_list_tools() -> list[types.Tool]:
304304 ),
305305
306306 # Knowledge Management
307+ types .Tool (
308+ name = "create_knowledge_from_file" ,
309+ description = "Create knowledge from a local file on the server filesystem" ,
310+ inputSchema = {
311+ "type" : "object" ,
312+ "properties" : {
313+ "kb_id" : {"type" : "string" , "description" : "Knowledge base ID" },
314+ "file_path" : {"type" : "string" , "description" : "Absolute path to the local file on the server" },
315+ "enable_multimodel" : {"type" : "boolean" , "description" : "Enable multimodal processing" , "default" : True }
316+ },
317+ "required" : ["kb_id" , "file_path" ]
318+ }
319+ ),
307320 types .Tool (
308321 name = "create_knowledge_from_url" ,
309322 description = "Create knowledge from URL" ,
@@ -537,6 +550,12 @@ async def handle_call_tool(
537550 result = client .hybrid_search (args ["kb_id" ], args ["query" ], config )
538551
539552 # Knowledge Management
553+ elif name == "create_knowledge_from_file" :
554+ result = client .create_knowledge_from_file (
555+ args ["kb_id" ],
556+ args ["file_path" ],
557+ args .get ("enable_multimodel" , True )
558+ )
540559 elif name == "create_knowledge_from_url" :
541560 result = client .create_knowledge_from_url (
542561 args ["kb_id" ],
You can’t perform that action at this time.
0 commit comments