Add autoglm-os-9b-v (#344)

* update for autoglm-v

* Update run_autoglm.py

---------

Co-authored-by: hanyullai <hanyullai@outlook.com>
This commit is contained in:
Yanxiao Zhao
2025-09-24 19:43:28 +08:00
committed by GitHub
parent f59cf00cae
commit a4f8fe2f00
23 changed files with 8425 additions and 2 deletions

View File

@@ -0,0 +1,3 @@
from .func import generate_func
__all__ = ["generate_func"]

View File

@@ -0,0 +1,236 @@
[
{
"type": "function",
"function": {
"name": "CodeTools.launch_vscode",
"description": "Launch VS Code with specified path",
"parameters": {
"type": "object",
"properties": {
"path": {
"type": "string",
"description": "File path or directory to open"
}
},
"required": ["path"]
}
}
},
{
"type": "function",
"function": {
"name": "CodeTools.compare_files",
"description": "Compare two files in VS Code",
"parameters": {
"type": "object",
"properties": {
"file1": {
"type": "string",
"description": "First file path"
},
"file2": {
"type": "string",
"description": "Second file path"
}
},
"required": ["file1", "file2"]
}
}
},
{
"type": "function",
"function": {
"name": "CodeTools.add_folder",
"description": "Add folder to active VS Code window",
"parameters": {
"type": "object",
"properties": {
"folder": {
"type": "string",
"description": "Folder path to add"
}
},
"required": ["folder"]
}
}
},
{
"type": "function",
"function": {
"name": "CodeTools.goto_file",
"description": "Open file at specific position",
"parameters": {
"type": "object",
"properties": {
"file_path": {
"type": "string",
"description": "File path to open"
},
"line": {
"type": "integer",
"description": "Line number",
"default": 1
},
"character": {
"type": "integer",
"description": "Character position",
"default": 1
}
},
"required": ["file_path"]
}
}
},
{
"type": "function",
"function": {
"name": "CodeTools.perform_merge",
"description": "Perform three-way merge",
"parameters": {
"type": "object",
"properties": {
"path1": {
"type": "string",
"description": "First version file path"
},
"path2": {
"type": "string",
"description": "Second version file path"
},
"base": {
"type": "string",
"description": "Base version file path"
},
"result": {
"type": "string",
"description": "Output file path"
}
},
"required": ["path1", "path2", "base", "result"]
}
}
},
{
"type": "function",
"function": {
"name": "CodeTools.remove_folder",
"description": "Remove folder from active VS Code window",
"parameters": {
"type": "object",
"properties": {
"folder": {
"type": "string",
"description": "Folder path to remove"
}
},
"required": ["folder"]
}
}
},
{
"type": "function",
"function": {
"name": "CodeTools.install_extension",
"description": "Install or update VS Code extension",
"parameters": {
"type": "object",
"properties": {
"extension_id": {
"type": "string",
"description": "Extension identifier"
},
"pre_release": {
"type": "boolean",
"description": "Install pre-release version",
"default": false
}
},
"required": ["extension_id"]
}
}
},
{
"type": "function",
"function": {
"name": "CodeTools.uninstall_extension",
"description": "Uninstall VS Code extension",
"parameters": {
"type": "object",
"properties": {
"extension_id": {
"type": "string",
"description": "Extension identifier"
}
},
"required": ["extension_id"]
}
}
},
{
"type": "function",
"function": {
"name": "CodeTools.list_extensions",
"description": "List installed extensions",
"parameters": {
"type": "object",
"properties": {
"show_versions": {
"type": "boolean",
"description": "Show extension versions",
"default": false
},
"category": {
"type": "string",
"description": "Filter by category"
}
}
}
}
},
{
"type": "function",
"function": {
"name": "CodeTools.update_extensions",
"description": "Update all extensions to latest version",
"parameters": {
"type": "object",
"properties": {}
}
}
},
{
"type": "function",
"function": {
"name": "CodeTools.disable_extension",
"description": "Disable extension for next VS Code instance",
"parameters": {
"type": "object",
"properties": {
"extension_id": {
"type": "string",
"description": "Extension identifier"
}
},
"required": ["extension_id"]
}
}
},
{
"type": "function",
"function": {
"name": "CodeTools.toggle_sync",
"description": "Toggle VS Code synchronization",
"parameters": {
"type": "object",
"properties": {
"state": {
"type": "string",
"description": "Sync state",
"enum": ["on", "off"]
}
},
"required": ["state"]
}
}
}
]

View File

@@ -0,0 +1,117 @@
def generate_func(json_data):
# 收集所有类名和它们的函数
class_funcs = {}
no_class_funcs = []
for item in json_data:
if item["type"] == "function":
func = item["function"]
func_parts = func["name"].split(".")
if len(func_parts) == 2:
class_name, func_name = func_parts
if class_name not in class_funcs:
class_funcs[class_name] = []
class_funcs[class_name].append(item)
else:
no_class_funcs.append(item)
code = ""
# 生成有类的函数
for class_name, funcs in class_funcs.items():
code += f"class {class_name}:\n"
for item in funcs:
func = item["function"]
func_name = func["name"].split(".")[-1]
description = func["description"]
params = func["parameters"]["properties"]
required = func["parameters"].get("required", [])
# 构建参数列表
param_list = ["cls"]
# 首先添加必需参数
for param_name in required:
param_list.append(f"{param_name}")
# 然后添加可选参数
for param_name in params:
if param_name not in required:
param_list.append(f"{param_name}") # 可选参数默认值设为None
# 构建函数定义
func_def = f" def {func_name}({', '.join(param_list)}):\n"
# 构建文档字符串
docstring = f' """\n {description}\n\n Args:\n'
if len(param_list) == 1: # 只有cls参数
docstring += " None\n"
else:
# 首先记录必需参数
for param_name in required:
param_type = params[param_name]["type"]
param_desc = params[param_name].get("description", "")
docstring += f" {param_name} ({param_type}): {param_desc}\n"
# 然后记录可选参数
for param_name in params:
if param_name not in required:
param_type = params[param_name]["type"]
param_desc = params[param_name].get("description", "")
docstring += f" {param_name} ({param_type}, optional): {param_desc}\n"
docstring += ' """\n'
code += func_def + docstring + "\n"
code += "\n"
# 生成没有类的函数
for item in no_class_funcs:
func = item["function"]
func_name = func["name"]
description = func["description"]
params = func["parameters"]["properties"]
required = func["parameters"].get("required", [])
# 构建参数列表
param_list = []
# 首先添加必需参数
for param_name in required:
param_list.append(f"{param_name}")
# 然后添加可选参数
for param_name in params:
if param_name not in required:
param_list.append(f"{param_name}")
# 构建函数定义
func_def = f"def {func_name}({', '.join(param_list)}):\n"
# 构建文档字符串
docstring = f' """\n {description}\n\n Args:\n'
if not param_list:
docstring += " None\n"
else:
# 首先记录必需参数
for param_name in required:
param_type = params[param_name]["type"]
param_desc = params[param_name].get("description", "")
docstring += f" {param_name} ({param_type}): {param_desc}\n"
# 然后记录可选参数
for param_name in params:
if param_name not in required:
param_type = params[param_name]["type"]
param_desc = params[param_name].get("description", "")
docstring += f" {param_name} ({param_type}, optional): {param_desc}\n"
docstring += ' """\n'
code += func_def + docstring + "\n"
return code.strip()
if __name__ == "__main__":
import json
with open("libreoffice_calc.json", "r") as f:
json_data = json.load(f)
print(generate_func(json_data))

View File

@@ -0,0 +1,134 @@
[
{
"type": "function",
"function": {
"name": "BrowserTools.open_profile_settings",
"description": "Opens profile settings page.",
"parameters": {
"type": "object",
"properties": {},
"required": []
}
}
},
{
"type": "function",
"function": {
"name": "BrowserTools.open_password_settings",
"description": "Opens password/autofill settings page.",
"parameters": {
"type": "object",
"properties": {},
"required": []
}
}
},
{
"type": "function",
"function": {
"name": "BrowserTools.open_privacy_settings",
"description": "Opens privacy settings page.",
"parameters": {
"type": "object",
"properties": {},
"required": []
}
}
},
{
"type": "function",
"function": {
"name": "BrowserTools.open_appearance_settings",
"description": "Opens appearance settings page.",
"parameters": {
"type": "object",
"properties": {},
"required": []
}
}
},
{
"type": "function",
"function": {
"name": "BrowserTools.open_search_engine_settings",
"description": "Opens search engine settings page.",
"parameters": {
"type": "object",
"properties": {},
"required": []
}
}
},
{
"type": "function",
"function": {
"name": "BrowserTools.bring_back_last_tab",
"description": "Restores last-closed tab (Ctrl+Shift+T).",
"parameters": {
"type": "object",
"properties": {},
"required": []
}
}
},
{
"type": "function",
"function": {
"name": "BrowserTools.print",
"description": "Opens print dialog (Ctrl+P).",
"parameters": {
"type": "object",
"properties": {},
"required": []
}
}
},
{
"type": "function",
"function": {
"name": "BrowserTools.delete_browsing_data",
"description": "Opens clear browsing data dialog (Ctrl+Shift+Del).",
"parameters": {
"type": "object",
"properties": {},
"required": []
}
}
},
{
"type": "function",
"function": {
"name": "BrowserTools.open_extensions",
"description": "Opens extensions management page.",
"parameters": {
"type": "object",
"properties": {},
"required": []
}
}
},
{
"type": "function",
"function": {
"name": "BrowserTools.bookmark_page",
"description": "Bookmarks current page (Ctrl+D).",
"parameters": {
"type": "object",
"properties": {},
"required": []
}
}
},
{
"type": "function",
"function": {
"name": "BrowserTools.open_bookmarks",
"description": "Opens bookmarks page.",
"parameters": {
"type": "object",
"properties": {},
"required": []
}
}
}
]

View File

@@ -0,0 +1,634 @@
[
{
"type": "function",
"function": {
"name": "CalcTools.get_workbook_info",
"description": "Get workbook info: file path, name, sheets, and active sheet",
"parameters": {
"type": "object",
"properties": {},
"required": []
}
}
},
{
"type": "function",
"function": {
"name": "CalcTools.save",
"description": "Save workbook to current location",
"parameters": {
"type": "object",
"properties": {},
"required": []
}
}
},
{
"type": "function",
"function": {
"name": "CalcTools.get_column_data",
"description": "Get all data from specified column",
"parameters": {
"type": "object",
"properties": {
"column_name": {
"type": "string",
"description": "Column name (e.g. 'A', 'B')"
}
},
"required": [
"column_name"
]
}
}
},
{
"type": "function",
"function": {
"name": "CalcTools.switch_active_sheet",
"description": "Switch to sheet (creates if not exists)",
"parameters": {
"type": "object",
"properties": {
"sheet_name": {
"type": "string",
"description": "Sheet name"
}
},
"required": [
"sheet_name"
]
}
}
},
{
"type": "function",
"function": {
"name": "CalcTools.set_column_values",
"description": "Set values to column (values only, not formulas)",
"parameters": {
"type": "object",
"properties": {
"column_name": {
"type": "string",
"description": "Column name (e.g. 'A', 'B')"
},
"data": {
"type": "array",
"description": "Values to write"
},
"start_index": {
"type": "integer",
"description": "First row index (default: 2)"
}
},
"required": [
"column_name",
"data"
]
}
}
},
{
"type": "function",
"function": {
"name": "CalcTools.highlight_range",
"description": "Highlight range with color",
"parameters": {
"type": "object",
"properties": {
"range_str": {
"type": "string",
"description": "Range (e.g. 'A1:B10')"
},
"color": {
"type": "integer",
"description": "Color value (default: 0xFF0000)"
}
},
"required": [
"range_str"
]
}
}
},
{
"type": "function",
"function": {
"name": "CalcTools.transpose_range",
"description": "Transpose range and paste to target cell",
"parameters": {
"type": "object",
"properties": {
"source_range": {
"type": "string",
"description": "Source range (e.g. 'A1:B10')"
},
"target_cell": {
"type": "string",
"description": "Target cell (e.g. 'A1')"
}
},
"required": [
"source_range",
"target_cell"
]
}
}
},
{
"type": "function",
"function": {
"name": "CalcTools.export_to_csv",
"description": "Export to CSV with same path/name",
"parameters": {
"type": "object",
"properties": {},
"required": []
}
}
},
{
"type": "function",
"function": {
"name": "CalcTools.sort_column",
"description": "Sort column data",
"parameters": {
"type": "object",
"properties": {
"column_name": {
"type": "string",
"description": "Column name (e.g. 'A', 'B')"
},
"ascending": {
"type": "boolean",
"description": "Sort ascending (default: true)"
},
"start_index": {
"type": "integer",
"description": "First row index (default: 2)"
}
},
"required": [
"column_name"
]
}
}
},
{
"type": "function",
"function": {
"name": "CalcTools.set_validation_list",
"description": "Set validation list for column",
"parameters": {
"type": "object",
"properties": {
"column_name": {
"type": "string",
"description": "Column name (e.g. 'A', 'B')"
},
"values": {
"type": "array",
"description": "Validation values"
}
},
"required": [
"column_name",
"values"
]
}
}
},
{
"type": "function",
"function": {
"name": "CalcTools.hide_row_data",
"description": "Hide rows containing value",
"parameters": {
"type": "object",
"properties": {
"value": {
"type": "string",
"description": "Value to hide (default: 'N/A')"
}
},
"required": []
}
}
},
{
"type": "function",
"function": {
"name": "CalcTools.reorder_columns",
"description": "Reorder columns by specified order",
"parameters": {
"type": "object",
"properties": {
"column_order": {
"type": "array",
"description": "Column names in desired order (e.g. ['A', 'B', 'C'])"
}
},
"required": [
"column_order"
]
}
}
},
{
"type": "function",
"function": {
"name": "CalcTools.create_pivot_table",
"description": "Create pivot table from source sheet",
"parameters": {
"type": "object",
"properties": {
"source_sheet": {
"type": "string",
"description": "Source sheet name"
},
"table_name": {
"type": "string",
"description": "Pivot table name"
},
"row_fields": {
"type": "array",
"description": "Row labels (e.g. ['A', 'B'])"
},
"col_fields": {
"type": "array",
"description": "Column labels (e.g. ['A', 'B'])"
},
"value_fields": {
"type": "array",
"description": "Value fields (e.g. ['A', 'B'])"
},
"aggregation_function": {
"type": "string",
"description": "Aggregation function (sum, count, average, min, max)"
},
"target_cell": {
"type": "string",
"description": "Target cell (default: 'A1')"
}
},
"required": [
"source_sheet",
"table_name",
"value_fields"
]
}
}
},
{
"type": "function",
"function": {
"name": "CalcTools.merge_cells",
"description": "Merge cells in range",
"parameters": {
"type": "object",
"properties": {
"range_str": {
"type": "string",
"description": "Cell range (e.g. 'A1:B10')"
}
},
"required": [
"range_str"
]
}
}
},
{
"type": "function",
"function": {
"name": "CalcTools.set_cell_value",
"description": "Set cell value",
"parameters": {
"type": "object",
"properties": {
"cell": {
"type": "string",
"description": "Cell reference (e.g. 'A1')"
},
"value": {
"type": "string",
"description": "Cell value"
}
},
"required": [
"cell",
"value"
]
}
}
},
{
"type": "function",
"function": {
"name": "CalcTools.format_range",
"description": "Apply formatting to range",
"parameters": {
"type": "object",
"properties": {
"range_str": {
"type": "string",
"description": "Range (e.g. 'A1:B10')"
},
"background_color": {
"type": "string",
"description": "Background color (e.g. '#0000ff')"
},
"font_color": {
"type": "string",
"description": "Font color (e.g. '#ffffff')"
},
"bold": {
"type": "boolean",
"description": "Bold text"
},
"alignment": {
"type": "string",
"description": "Text alignment (left, center, right)"
}
},
"required": [
"range_str"
]
}
}
},
{
"type": "function",
"function": {
"name": "CalcTools.create_chart",
"description": "Create chart from data range",
"parameters": {
"type": "object",
"properties": {
"chart_type": {
"type": "string",
"description": "Chart type (bar, column, line, pie, scatter, area)"
},
"data_range": {
"type": "string",
"description": "Data range (e.g. 'A1:B10')"
},
"title": {
"type": "string",
"description": "Chart title"
},
"x_axis_title": {
"type": "string",
"description": "X axis title"
},
"y_axis_title": {
"type": "string",
"description": "Y axis title"
}
},
"required": [
"chart_type",
"data_range"
]
}
}
},
{
"type": "function",
"function": {
"name": "CalcTools.freeze_panes",
"description": "Freeze rows/columns",
"parameters": {
"type": "object",
"properties": {
"rows": {
"type": "integer",
"description": "Rows to freeze from top"
},
"columns": {
"type": "integer",
"description": "Columns to freeze from left"
}
},
"required": []
}
}
},
{
"type": "function",
"function": {
"name": "CalcTools.rename_sheet",
"description": "Rename worksheet",
"parameters": {
"type": "object",
"properties": {
"old_name": {
"type": "string",
"description": "Current sheet name"
},
"new_name": {
"type": "string",
"description": "New sheet name"
}
},
"required": [
"old_name",
"new_name"
]
}
}
},
{
"type": "function",
"function": {
"name": "CalcTools.copy_sheet",
"description": "Copy worksheet",
"parameters": {
"type": "object",
"properties": {
"source_sheet": {
"type": "string",
"description": "Source sheet name"
},
"new_sheet_name": {
"type": "string",
"description": "New sheet name (optional)"
}
},
"required": [
"source_sheet"
]
}
}
},
{
"type": "function",
"function": {
"name": "CalcTools.reorder_sheets",
"description": "Change sheet order",
"parameters": {
"type": "object",
"properties": {
"sheet_name": {
"type": "string",
"description": "Sheet to move"
},
"position": {
"type": "integer",
"description": "New position (0-based)"
}
},
"required": [
"sheet_name",
"position"
]
}
}
},
{
"type": "function",
"function": {
"name": "CalcTools.set_chart_legend_position",
"description": "Set chart legend position",
"parameters": {
"type": "object",
"properties": {
"position": {
"type": "string",
"description": "Legend position (top, bottom, left, right, none)"
}
},
"required": [
"position"
]
}
}
},
{
"type": "function",
"function": {
"name": "CalcTools.set_number_format",
"description": "Apply number format to range",
"parameters": {
"type": "object",
"properties": {
"range_str": {
"type": "string",
"description": "Range (e.g. 'A1:B10')"
},
"format_type": {
"type": "string",
"description": "Format type (general, number, currency, accounting, date, time, percentage, fraction, scientific, text)"
},
"decimal_places": {
"type": "integer",
"description": "Decimal places (optional)"
}
},
"required": [
"range_str",
"format_type"
]
}
}
},
{
"type": "function",
"function": {
"name": "CalcTools.adjust_column_width",
"description": "Adjust column width",
"parameters": {
"type": "object",
"properties": {
"columns": {
"type": "string",
"description": "Column range (e.g. 'A:C')"
},
"width": {
"type": "number",
"description": "Width in characters"
},
"autofit": {
"type": "boolean",
"description": "Autofit to content"
}
},
"required": [
"columns"
]
}
}
},
{
"type": "function",
"function": {
"name": "CalcTools.adjust_row_height",
"description": "Adjust row height",
"parameters": {
"type": "object",
"properties": {
"rows": {
"type": "string",
"description": "Row range (e.g. '1:10')"
},
"height": {
"type": "number",
"description": "Height in points"
},
"autofit": {
"type": "boolean",
"description": "Autofit to content"
}
},
"required": [
"rows"
]
}
}
},
{
"type": "function",
"function": {
"name": "CalcTools.export_to_pdf",
"description": "Export to PDF",
"parameters": {
"type": "object",
"properties": {
"file_path": {
"type": "string",
"description": "PDF save path (default: same as original)"
},
"sheets": {
"type": "array",
"description": "Sheets to include (default: all)"
},
"open_after_export": {
"type": "boolean",
"description": "Open PDF after export (default: false)"
}
},
"required": []
}
}
},
{
"type": "function",
"function": {
"name": "CalcTools.set_zoom_level",
"description": "Set worksheet zoom level",
"parameters": {
"type": "object",
"properties": {
"zoom_percentage": {
"type": "integer",
"description": "Zoom percentage (10-400)"
}
},
"required": [
"zoom_percentage"
]
}
}
}
]

View File

@@ -0,0 +1,559 @@
[
{
"type": "function",
"function": {
"name": "ImpressTools.save",
"description": "Save current presentation",
"parameters": {
"type": "object",
"properties": {},
"required": []
}
}
},
{
"type": "function",
"function": {
"name": "ImpressTools.go_to_slide",
"description": "Navigate to specific slide",
"parameters": {
"type": "object",
"properties": {
"slide_index": {
"type": "integer",
"description": "Slide index (1-based)"
}
},
"required": ["slide_index"]
}
}
},
{
"type": "function",
"function": {
"name": "ImpressTools.get_slide_count",
"description": "Get total slide count",
"parameters": {
"type": "object",
"properties": {},
"required": []
}
}
},
{
"type": "function",
"function": {
"name": "ImpressTools.duplicate_slide",
"description": "Duplicate slide and place at end",
"parameters": {
"type": "object",
"properties": {
"slide_index": {
"type": "integer",
"description": "Slide index to duplicate (1-based)"
}
},
"required": ["slide_index"]
}
}
},
{
"type": "function",
"function": {
"name": "ImpressTools.set_slide_font",
"description": "Set font for all text in slide",
"parameters": {
"type": "object",
"properties": {
"slide_index": {
"type": "integer",
"description": "Slide index (1-based)"
},
"font_name": {
"type": "string",
"description": "Font name (e.g., 'Arial', 'Times New Roman')"
}
},
"required": ["slide_index", "font_name"]
}
}
},
{
"type": "function",
"function": {
"name": "ImpressTools.write_text",
"description": "Write text to textbox",
"parameters": {
"type": "object",
"properties": {
"content": {
"type": "string",
"description": "Text content"
},
"page_index": {
"type": "integer",
"description": "Slide index (1-based)"
},
"box_index": {
"type": "integer",
"description": "Textbox index (0-based)"
},
"bold": {
"type": "boolean",
"description": "Bold text (default: false)"
},
"italic": {
"type": "boolean",
"description": "Italic text (default: false)"
},
"size": {
"type": "integer",
"description": "Font size"
},
"append": {
"type": "boolean",
"description": "Append to existing text (default: false)"
}
},
"required": ["content", "page_index", "box_index"]
}
}
},
{
"type": "function",
"function": {
"name": "ImpressTools.set_style",
"description": "Set text style for textbox",
"parameters": {
"type": "object",
"properties": {
"slide_index": {
"type": "integer",
"description": "Slide index (1-based)"
},
"box_index": {
"type": "integer",
"description": "Textbox index (0-based)"
},
"bold": {
"type": "boolean",
"description": "Bold text"
},
"italic": {
"type": "boolean",
"description": "Italic text"
},
"underline": {
"type": "boolean",
"description": "Underline text"
}
},
"required": ["slide_index", "box_index"]
}
}
},
{
"type": "function",
"function": {
"name": "ImpressTools.configure_auto_save",
"description": "Configure auto-save settings",
"parameters": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean",
"description": "Enable auto-save"
},
"interval_minutes": {
"type": "number",
"description": "Auto-save interval in minutes (min: 1)"
}
},
"required": ["enabled", "interval_minutes"]
}
}
},
{
"type": "function",
"function": {
"name": "ImpressTools.set_background_color",
"description": "Set textbox background color",
"parameters": {
"type": "object",
"properties": {
"slide_index": {
"type": "integer",
"description": "Slide index (1-based)"
},
"box_index": {
"type": "integer",
"description": "Textbox index (0-based)"
},
"color": {
"type": "string",
"description": "Color name or hex code"
}
},
"required": ["slide_index", "box_index", "color"]
}
}
},
{
"type": "function",
"function": {
"name": "ImpressTools.set_text_color",
"description": "Set text color for textbox",
"parameters": {
"type": "object",
"properties": {
"slide_index": {
"type": "integer",
"description": "Slide index (1-based)"
},
"box_index": {
"type": "integer",
"description": "Textbox index (0-based)"
},
"color": {
"type": "string",
"description": "Color name or hex code"
}
},
"required": ["slide_index", "box_index", "color"]
}
}
},
{
"type": "function",
"function": {
"name": "ImpressTools.delete_content",
"description": "Delete textbox from slide",
"parameters": {
"type": "object",
"properties": {
"slide_index": {
"type": "integer",
"description": "Slide index (1-based)"
},
"box_index": {
"type": "integer",
"description": "Textbox index (0-based)"
}
},
"required": ["slide_index", "box_index"]
}
}
},
{
"type": "function",
"function": {
"name": "ImpressTools.set_slide_orientation",
"description": "Set slide orientation",
"parameters": {
"type": "object",
"properties": {
"orientation": {
"type": "string",
"description": "Slide orientation",
"enum": ["portrait", "landscape"]
}
},
"required": ["orientation"]
}
}
},
{
"type": "function",
"function": {
"name": "ImpressTools.position_box",
"description": "Position textbox or image on slide",
"parameters": {
"type": "object",
"properties": {
"slide_index": {
"type": "integer",
"description": "Slide index (1-based)"
},
"box_index": {
"type": "integer",
"description": "Box index (0-based)"
},
"position": {
"type": "string",
"description": "Position on slide",
"enum": ["left", "right", "center", "top", "bottom", "top-left", "top-right", "bottom-left", "bottom-right"]
}
},
"required": ["slide_index", "box_index", "position"]
}
}
},
{
"type": "function",
"function": {
"name": "ImpressTools.insert_file",
"description": "Insert video or audio file",
"parameters": {
"type": "object",
"properties": {
"file_path": {
"type": "string",
"description": "File path"
},
"slide_index": {
"type": "integer",
"description": "Slide index (1-based)"
},
"position": {
"type": "object",
"description": "Position coordinates",
"properties": {
"x": {
"type": "number",
"description": "X position (% of slide width)"
},
"y": {
"type": "number",
"description": "Y position (% of slide height)"
}
}
},
"size": {
"type": "object",
"description": "Size dimensions",
"properties": {
"width": {
"type": "number",
"description": "Width (% of slide width)"
},
"height": {
"type": "number",
"description": "Height (% of slide height)"
}
}
},
"autoplay": {
"type": "boolean",
"description": "Auto-play media"
}
},
"required": ["file_path"]
}
}
},
{
"type": "function",
"function": {
"name": "ImpressTools.set_slide_background",
"description": "Set slide background color or image",
"parameters": {
"type": "object",
"properties": {
"slide_index": {
"type": "integer",
"description": "Slide index (1-based). If not provided, applies to all slides"
},
"color": {
"type": "string",
"description": "Background color"
},
"image_path": {
"type": "string",
"description": "Background image path (overrides color)"
}
},
"required": []
}
}
},
{
"type": "function",
"function": {
"name": "ImpressTools.save_as",
"description": "Save document to specified location",
"parameters": {
"type": "object",
"properties": {
"file_path": {
"type": "string",
"description": "File save path with filename and extension"
},
"overwrite": {
"type": "boolean",
"description": "Overwrite existing file (default: false)"
}
},
"required": ["file_path"]
}
}
},
{
"type": "function",
"function": {
"name": "ImpressTools.insert_image",
"description": "Insert image to slide",
"parameters": {
"type": "object",
"properties": {
"slide_index": {
"type": "integer",
"description": "Slide index (1-based)"
},
"image_path": {
"type": "string",
"description": "Image file path"
},
"width": {
"type": "number",
"description": "Image width in cm"
},
"height": {
"type": "number",
"description": "Image height in cm"
},
"position": {
"type": "object",
"description": "Position coordinates",
"properties": {
"x": {
"type": "number",
"description": "X position (% of slide width)"
},
"y": {
"type": "number",
"description": "Y position (% of slide height)"
}
}
}
},
"required": ["slide_index", "image_path"]
}
}
},
{
"type": "function",
"function": {
"name": "ImpressTools.configure_display_settings",
"description": "Configure presentation display settings",
"parameters": {
"type": "object",
"properties": {
"use_presenter_view": {
"type": "boolean",
"description": "Use presenter view"
},
"primary_monitor_only": {
"type": "boolean",
"description": "Use primary monitor only"
},
"monitor_for_presentation": {
"type": "integer",
"description": "Monitor number for presentation"
}
},
"required": []
}
}
},
{
"type": "function",
"function": {
"name": "ImpressTools.set_slide_number_color",
"description": "Set slide number color",
"parameters": {
"type": "object",
"properties": {
"color": {
"type": "string",
"description": "Color name or hex code"
}
},
"required": ["color"]
}
}
},
{
"type": "function",
"function": {
"name": "ImpressTools.set_text_strikethrough",
"description": "Apply strikethrough formatting to text",
"parameters": {
"type": "object",
"properties": {
"slide_index": {
"type": "integer",
"description": "Slide index (1-based)"
},
"box_index": {
"type": "integer",
"description": "Textbox index (0-based)"
},
"line_numbers": {
"type": "array",
"items": {
"type": "integer"
},
"description": "Line numbers for strikethrough (1-based)"
},
"apply": {
"type": "boolean",
"description": "Apply or remove strikethrough"
}
},
"required": ["slide_index", "box_index", "line_numbers", "apply"]
}
}
},
{
"type": "function",
"function": {
"name": "ImpressTools.set_textbox_alignment",
"description": "Set text alignment for textbox",
"parameters": {
"type": "object",
"properties": {
"slide_index": {
"type": "integer",
"description": "Slide index (1-based)"
},
"box_index": {
"type": "integer",
"description": "Textbox index (0-based)"
},
"alignment": {
"type": "string",
"description": "Text alignment",
"enum": ["left", "center", "right", "justify"]
}
},
"required": ["slide_index", "box_index", "alignment"]
}
}
},
{
"type": "function",
"function": {
"name": "ImpressTools.export_to_image",
"description": "Export presentation or slide to image",
"parameters": {
"type": "object",
"properties": {
"file_path": {
"type": "string",
"description": "Image save path with filename and extension"
},
"format": {
"type": "string",
"description": "Image format",
"enum": ["png", "jpeg", "jpg", "gif", "bmp", "tiff"]
},
"slide_index": {
"type": "integer",
"description": "Specific slide index (1-based). If not provided, exports all slides"
}
},
"required": ["file_path", "format"]
}
}
}
]

View File

@@ -0,0 +1,412 @@
[
{
"type": "function",
"function": {
"name": "WriterTools.save",
"description": "Save document to current location",
"parameters": {
"type": "object",
"properties": {},
"required": []
}
}
},
{
"type": "function",
"function": {
"name": "WriterTools.write_text",
"description": "Write text at cursor position",
"parameters": {
"type": "object",
"properties": {
"text": {
"type": "string",
"description": "Text to write"
},
"bold": {
"type": "boolean",
"description": "Apply bold formatting"
},
"italic": {
"type": "boolean",
"description": "Apply italic formatting"
},
"size": {
"type": "number",
"description": "Font size"
}
},
"required": ["text"]
}
}
},
{
"type": "function",
"function": {
"name": "WriterTools.set_color",
"description": "Change text color using regex pattern",
"parameters": {
"type": "object",
"properties": {
"pattern": {
"type": "string",
"description": "Regex pattern to match"
},
"color": {
"type": "number",
"description": "Hex color code (e.g., 0x000000)"
},
"paragraph_indices": {
"type": "array",
"description": "Target paragraph indices (0-based). Applies to all if omitted"
}
},
"required": ["pattern", "color"]
}
}
},
{
"type": "function",
"function": {
"name": "WriterTools.find_and_replace",
"description": "Find and replace text using regex",
"parameters": {
"type": "object",
"properties": {
"pattern": {
"type": "string",
"description": "Regex pattern to find"
},
"replacement": {
"type": "string",
"description": "Replacement text"
},
"paragraph_indices": {
"type": "array",
"description": "Target paragraph indices (0-based). Applies to all if omitted"
}
},
"required": ["pattern", "replacement"]
}
}
},
{
"type": "function",
"function": {
"name": "WriterTools.set_font",
"description": "Change font family",
"parameters": {
"type": "object",
"properties": {
"font_name": {
"type": "string",
"description": "Font name (e.g., 'Arial', 'Times New Roman')"
},
"paragraph_indices": {
"type": "array",
"description": "Target paragraph indices (0-based). Applies to all if omitted"
}
},
"required": ["font_name"]
}
}
},
{
"type": "function",
"function": {
"name": "WriterTools.set_line_spacing",
"description": "Set line spacing",
"parameters": {
"type": "object",
"properties": {
"spacing_value": {
"type": "number",
"description": "Spacing value (1.0=single, 2.0=double)"
},
"paragraph_indices": {
"type": "array",
"description": "Target paragraph indices (0-based). Applies to all if omitted"
}
},
"required": ["spacing_value"]
}
}
},
{
"type": "function",
"function": {
"name": "WriterTools.remove_highlighting",
"description": "Remove text highlighting",
"parameters": {
"type": "object",
"properties": {
"paragraph_indices": {
"type": "array",
"description": "Target paragraph indices (0-based). Applies to all if omitted"
}
},
"required": []
}
}
},
{
"type": "function",
"function": {
"name": "WriterTools.find_highlighted_text",
"description": "Find text with specific highlight color",
"parameters": {
"type": "object",
"properties": {
"highlight_color": {
"type": "string",
"description": "Color name (e.g., 'yellow') or hex code"
}
},
"required": ["highlight_color"]
}
}
},
{
"type": "function",
"function": {
"name": "WriterTools.insert_formula_at_cursor",
"description": "Insert formula at cursor",
"parameters": {
"type": "object",
"properties": {
"formula": {
"type": "string",
"description": "Formula to insert"
}
},
"required": ["formula"]
}
}
},
{
"type": "function",
"function": {
"name": "WriterTools.insert_image_at_cursor",
"description": "Insert image at cursor",
"parameters": {
"type": "object",
"properties": {
"image_path": {
"type": "string",
"description": "Full path to image file"
},
"width": {
"type": "integer",
"description": "Display width in pixels"
},
"height": {
"type": "integer",
"description": "Display height in pixels"
}
},
"required": ["image_path"]
}
}
},
{
"type": "function",
"function": {
"name": "WriterTools.set_strikethrough",
"description": "Apply strikethrough formatting",
"parameters": {
"type": "object",
"properties": {
"pattern": {
"type": "string",
"description": "Regex pattern to match"
},
"paragraph_indices": {
"type": "array",
"description": "Target paragraph indices (0-based). Applies to all if omitted"
}
},
"required": ["pattern"]
}
}
},
{
"type": "function",
"function": {
"name": "WriterTools.set_font_size",
"description": "Change font size",
"parameters": {
"type": "object",
"properties": {
"font_size": {
"type": "number",
"description": "Font size in points"
},
"pattern": {
"type": "string",
"description": "Regex pattern to match"
},
"paragraph_indices": {
"type": "array",
"description": "Target paragraph indices (0-based). Applies to all if omitted"
}
},
"required": ["font_size", "pattern"]
}
}
},
{
"type": "function",
"function": {
"name": "WriterTools.export_to_pdf",
"description": "Export document to PDF",
"parameters": {
"type": "object",
"properties": {
"output_path": {
"type": "string",
"description": "PDF save path"
},
"output_filename": {
"type": "string",
"description": "PDF filename"
},
"include_comments": {
"type": "boolean",
"description": "Include comments in PDF"
},
"quality": {
"type": "string",
"description": "Export quality ('standard', 'high', 'print')"
}
},
"required": []
}
}
},
{
"type": "function",
"function": {
"name": "WriterTools.set_paragraph_alignment",
"description": "Set paragraph alignment",
"parameters": {
"type": "object",
"properties": {
"alignment": {
"type": "string",
"description": "Alignment type ('left', 'center', 'right', 'justify')"
},
"paragraph_indices": {
"type": "array",
"description": "Target paragraph indices (0-based). Applies to all if omitted"
}
},
"required": ["alignment"]
}
}
},
{
"type": "function",
"function": {
"name": "WriterTools.capitalize_words",
"description": "Capitalize first letter of each word",
"parameters": {
"type": "object",
"properties": {
"paragraph_indices": {
"type": "array",
"description": "Target paragraph indices (0-based). Applies to all if omitted"
}
},
"required": []
}
}
},
{
"type": "function",
"function": {
"name": "WriterTools.set_default_font",
"description": "Set default font for new text",
"parameters": {
"type": "object",
"properties": {
"font_name": {
"type": "string",
"description": "Default font name"
},
"font_size": {
"type": "number",
"description": "Default font size in points"
}
},
"required": ["font_name"]
}
}
},
{
"type": "function",
"function": {
"name": "WriterTools.add_page_numbers",
"description": "Add page numbers",
"parameters": {
"type": "object",
"properties": {
"position": {
"type": "string",
"description": "Position ('bottom_left', 'bottom_center', 'bottom_right', 'top_left', 'top_center', 'top_right')"
},
"start_number": {
"type": "integer",
"description": "Starting page number"
},
"format": {
"type": "string",
"description": "Number format (e.g., '1', 'Page 1', '1 of N')"
}
},
"required": ["position"]
}
}
},
{
"type": "function",
"function": {
"name": "WriterTools.insert_page_break",
"description": "Insert page break",
"parameters": {
"type": "object",
"properties": {
"position": {
"type": "string",
"description": "Insert location ('at_cursor', 'end_of_document')"
}
},
"required": []
}
}
},
{
"type": "function",
"function": {
"name": "WriterTools.change_text_case",
"description": "Change text case",
"parameters": {
"type": "object",
"properties": {
"case_type": {
"type": "string",
"description": "Case type ('lowercase', 'uppercase')"
},
"pattern": {
"type": "string",
"description": "Regex pattern to match"
},
"paragraph_indices": {
"type": "array",
"description": "Target paragraph indices (0-based). Applies to all if omitted"
}
},
"required": ["case_type", "pattern"]
}
}
}
]

View File

@@ -0,0 +1,166 @@
[
{
"type": "function",
"function": {
"name": "VLCTools.get_playlist",
"description": "Get current playlist with track info",
"parameters": {
"type": "object",
"properties": {}
}
}
},
{
"type": "function",
"function": {
"name": "VLCTools.play",
"description": "Start playing current media",
"parameters": {
"type": "object",
"properties": {}
}
}
},
{
"type": "function",
"function": {
"name": "VLCTools.pause",
"description": "Pause current media",
"parameters": {
"type": "object",
"properties": {}
}
}
},
{
"type": "function",
"function": {
"name": "VLCTools.next",
"description": "Switch to next track",
"parameters": {
"type": "object",
"properties": {}
}
}
},
{
"type": "function",
"function": {
"name": "VLCTools.previous",
"description": "Switch to previous track",
"parameters": {
"type": "object",
"properties": {}
}
}
},
{
"type": "function",
"function": {
"name": "VLCTools.add_to_playlist",
"description": "Add media file to playlist",
"parameters": {
"type": "object",
"properties": {
"uri": {
"type": "string",
"description": "Media file URI (file:// or https://)"
}
},
"required": ["uri"]
}
}
},
{
"type": "function",
"function": {
"name": "VLCTools.get_current_time",
"description": "Get current playback position in seconds",
"parameters": {
"type": "object",
"properties": {}
}
}
},
{
"type": "function",
"function": {
"name": "VLCTools.get_media_duration",
"description": "Get media duration in seconds",
"parameters": {
"type": "object",
"properties": {}
}
}
},
{
"type": "function",
"function": {
"name": "VLCTools.toggle_fullscreen",
"description": "Toggle or set fullscreen mode",
"parameters": {
"type": "object",
"properties": {
"enable": {
"type": "boolean",
"description": "Force fullscreen on/off, omit to toggle"
}
},
"required": []
}
}
},
{
"type": "function",
"function": {
"name": "VLCTools.get_settings",
"description": "Get VLC settings",
"parameters": {
"type": "object",
"properties": {}
}
}
},
{
"type": "function",
"function": {
"name": "VLCTools.set_settings",
"description": "Set VLC settings",
"parameters": {
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "Setting name (e.g. qt-max-volume, qt-minimal-view)"
},
"value": {
"type": "string",
"description": "Setting value (use 0/1 for booleans)"
}
},
"required": ["field", "value"]
}
}
},
{
"type": "function",
"function": {
"name": "VLCTools.get_media_files",
"description": "Get media files from path",
"parameters": {
"type": "object",
"properties": {
"path": {
"type": "string",
"description": "Directory path"
},
"suffix": {
"type": "array",
"description": "File extensions, default: ['mp4','avi','mkv','mov','mp3','m4a','wav']"
}
},
"required": ["path"]
}
}
}
]