Skip to content

Commit 2b51765

Browse files
authored
Merge pull request #26 from GlisseManTV/dev
0.6.1
2 parents 051b892 + 975b4cd commit 2b51765

File tree

3 files changed

+21
-51
lines changed

3 files changed

+21
-51
lines changed

LLM_Export/docker/mcpo/tools/file_export_mcp.py

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1248,16 +1248,12 @@ def _create_raw_file(content: str, filename: str | None, folder_path: str | None
12481248

12491249
@mcp.tool()
12501250
def create_file(data: dict, persistent: bool = PERSISTENT_FILES) -> dict:
1251-
"""
1252-
Use:
1253-
data = {
1254-
"format": "pdf|docx|pptx|xlsx|csv|txt|xml|py|cs|etc",
1255-
"filename": "name.ext",
1256-
"content": ...,
1257-
"slides_data": [...],
1258-
"title": "Optional title"
1259-
}
1260-
"""
1251+
"""{"format":"pdf","filename":"report.pdf","content":[{"type":"title","text":"..."},{"type":"paragraph","text":"..."}],"title":"..."}
1252+
{"format":"docx","filename":"doc.docx","content":[{"type":"title","text":"..."},{"type":"list","items":[...]}],"title":"..."}
1253+
{"format":"pptx","filename":"slides.pptx","slides_data":[{"title":"...","content":[...],"image_query":"...","image_position":"left|right|top|bottom","image_size":"small|medium|large"}],"title":"..."}
1254+
{"format":"xlsx","filename":"data.xlsx","content":[["Header1","Header2"],["Val1","Val2"]],"title":"..."}
1255+
{"format":"csv","filename":"data.csv","content":[[...]]}
1256+
{"format":"txt|xml|py|etc","filename":"file.ext","content":"string"}"""
12611257
log.debug("Creating file via tool")
12621258
folder_path = _generate_unique_folder()
12631259
format_type = (data.get("format") or "").lower()
@@ -1286,13 +1282,7 @@ def create_file(data: dict, persistent: bool = PERSISTENT_FILES) -> dict:
12861282

12871283
@mcp.tool()
12881284
def generate_and_archive(files_data: list[dict], archive_format: str = "zip", archive_name: str = None, persistent: bool = PERSISTENT_FILES) -> dict:
1289-
"""
1290-
files_data = [
1291-
{"format":"pdf","filename":"r1.pdf","content":[...],"title":"..."},
1292-
{"format":"pptx","filename":"slides.pptx","slides_data":[...],"title":"..."},
1293-
...
1294-
]
1295-
"""
1285+
"""files_data=[{"format":"pdf","filename":"report.pdf","content":[{"type":"title","text":"..."},{"type":"paragraph","text":"..."}],"title":"..."},{"format":"docx","filename":"doc.docx","content":[{"type":"title","text":"..."},{"type":"list","items":[...]}],"title":"..."},{"format":"pptx","filename":"slides.pptx","slides_data":[{"title":"...","content":[...],"image_query":"...","image_position":"left|right|top|bottom","image_size":"small|medium|large"}],"title":"..."},{"format":"xlsx","filename":"data.xlsx","content":[["Header1","Header2"],["Val1","Val2"]],"title":"..."},{"format":"csv","filename":"data.csv","content":[[...]]},{"format":"txt|xml|py|etc","filename":"file.ext","content":"string"}]"""
12961286
log.debug("Generating archive via tool")
12971287
folder_path = _generate_unique_folder()
12981288
generated_paths: list[str] = []

LLM_Export/docker/sse_http/tools/file_export_mcp.py

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1256,16 +1256,12 @@ def _create_raw_file(content: str, filename: str | None, folder_path: str | None
12561256

12571257
@mcp.tool()
12581258
def create_file(data: dict, persistent: bool = PERSISTENT_FILES) -> dict:
1259-
"""
1260-
Use:
1261-
data = {
1262-
"format": "pdf|docx|pptx|xlsx|csv|txt|xml|py|cs|etc",
1263-
"filename": "name.ext",
1264-
"content": ...,
1265-
"slides_data": [...],
1266-
"title": "Optional title"
1267-
}
1268-
"""
1259+
"""{"format":"pdf","filename":"report.pdf","content":[{"type":"title","text":"..."},{"type":"paragraph","text":"..."}],"title":"..."}
1260+
{"format":"docx","filename":"doc.docx","content":[{"type":"title","text":"..."},{"type":"list","items":[...]}],"title":"..."}
1261+
{"format":"pptx","filename":"slides.pptx","slides_data":[{"title":"...","content":[...],"image_query":"...","image_position":"left|right|top|bottom","image_size":"small|medium|large"}],"title":"..."}
1262+
{"format":"xlsx","filename":"data.xlsx","content":[["Header1","Header2"],["Val1","Val2"]],"title":"..."}
1263+
{"format":"csv","filename":"data.csv","content":[[...]]}
1264+
{"format":"txt|xml|py|etc","filename":"file.ext","content":"string"}"""
12691265
log.debug("Creating file via tool")
12701266
folder_path = _generate_unique_folder()
12711267
format_type = (data.get("format") or "").lower()
@@ -1294,13 +1290,7 @@ def create_file(data: dict, persistent: bool = PERSISTENT_FILES) -> dict:
12941290

12951291
@mcp.tool()
12961292
def generate_and_archive(files_data: list[dict], archive_format: str = "zip", archive_name: str = None, persistent: bool = PERSISTENT_FILES) -> dict:
1297-
"""
1298-
files_data = [
1299-
{"format":"pdf","filename":"r1.pdf","content":[...],"title":"..."},
1300-
{"format":"pptx","filename":"slides.pptx","slides_data":[...],"title":"..."},
1301-
...
1302-
]
1303-
"""
1293+
"""files_data=[{"format":"pdf","filename":"report.pdf","content":[{"type":"title","text":"..."},{"type":"paragraph","text":"..."}],"title":"..."},{"format":"docx","filename":"doc.docx","content":[{"type":"title","text":"..."},{"type":"list","items":[...]}],"title":"..."},{"format":"pptx","filename":"slides.pptx","slides_data":[{"title":"...","content":[...],"image_query":"...","image_position":"left|right|top|bottom","image_size":"small|medium|large"}],"title":"..."},{"format":"xlsx","filename":"data.xlsx","content":[["Header1","Header2"],["Val1","Val2"]],"title":"..."},{"format":"csv","filename":"data.csv","content":[[...]]},{"format":"txt|xml|py|etc","filename":"file.ext","content":"string"}]"""
13041294
log.debug("Generating archive via tool")
13051295
folder_path = _generate_unique_folder()
13061296
generated_paths: list[str] = []

LLM_Export/tools/file_export_mcp.py

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1259,16 +1259,12 @@ def _create_raw_file(content: str, filename: str | None, folder_path: str | None
12591259

12601260
@mcp.tool()
12611261
def create_file(data: dict, persistent: bool = PERSISTENT_FILES) -> dict:
1262-
"""
1263-
Use:
1264-
data = {
1265-
"format": "pdf|docx|pptx|xlsx|csv|txt|xml|py|cs|etc",
1266-
"filename": "name.ext",
1267-
"content": ...,
1268-
"slides_data": [...],
1269-
"title": "Optional title"
1270-
}
1271-
"""
1262+
"""{"format":"pdf","filename":"report.pdf","content":[{"type":"title","text":"..."},{"type":"paragraph","text":"..."}],"title":"..."}
1263+
{"format":"docx","filename":"doc.docx","content":[{"type":"title","text":"..."},{"type":"list","items":[...]}],"title":"..."}
1264+
{"format":"pptx","filename":"slides.pptx","slides_data":[{"title":"...","content":[...],"image_query":"...","image_position":"left|right|top|bottom","image_size":"small|medium|large"}],"title":"..."}
1265+
{"format":"xlsx","filename":"data.xlsx","content":[["Header1","Header2"],["Val1","Val2"]],"title":"..."}
1266+
{"format":"csv","filename":"data.csv","content":[[...]]}
1267+
{"format":"txt|xml|py|etc","filename":"file.ext","content":"string"}"""
12721268
log.debug("Creating file via tool")
12731269
folder_path = _generate_unique_folder()
12741270
format_type = (data.get("format") or "").lower()
@@ -1297,13 +1293,7 @@ def create_file(data: dict, persistent: bool = PERSISTENT_FILES) -> dict:
12971293

12981294
@mcp.tool()
12991295
def generate_and_archive(files_data: list[dict], archive_format: str = "zip", archive_name: str = None, persistent: bool = PERSISTENT_FILES) -> dict:
1300-
"""
1301-
files_data = [
1302-
{"format":"pdf","filename":"r1.pdf","content":[...],"title":"..."},
1303-
{"format":"pptx","filename":"slides.pptx","slides_data":[...],"title":"..."},
1304-
...
1305-
]
1306-
"""
1296+
"""files_data=[{"format":"pdf","filename":"report.pdf","content":[{"type":"title","text":"..."},{"type":"paragraph","text":"..."}],"title":"..."},{"format":"docx","filename":"doc.docx","content":[{"type":"title","text":"..."},{"type":"list","items":[...]}],"title":"..."},{"format":"pptx","filename":"slides.pptx","slides_data":[{"title":"...","content":[...],"image_query":"...","image_position":"left|right|top|bottom","image_size":"small|medium|large"}],"title":"..."},{"format":"xlsx","filename":"data.xlsx","content":[["Header1","Header2"],["Val1","Val2"]],"title":"..."},{"format":"csv","filename":"data.csv","content":[[...]]},{"format":"txt|xml|py|etc","filename":"file.ext","content":"string"}]"""
13071297
log.debug("Generating archive via tool")
13081298
folder_path = _generate_unique_folder()
13091299
generated_paths: list[str] = []

0 commit comments

Comments
 (0)