@univerjs-pro/sheets-mcp 0.10.6-experimental.20250904-44da50e

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,47 @@
1
+ import { IMCPTool } from '@univerjs-pro/mcp';
2
+ import { z } from 'zod';
3
+ export declare const renameSheetOperationSchema: z.ZodObject<{
4
+ old_name: z.ZodString;
5
+ new_name: z.ZodString;
6
+ }, z.core.$strip>;
7
+ export declare const sheetDisplayStatusOperationSchema: z.ZodObject<{
8
+ sheet_name: z.ZodString;
9
+ visible: z.ZodBoolean;
10
+ }, z.core.$strip>;
11
+ export type RenameSheetOperation = z.infer<typeof renameSheetOperationSchema>;
12
+ export type SheetDisplayStatusOperation = z.infer<typeof sheetDisplayStatusOperationSchema>;
13
+ /**
14
+ * Create multiple new worksheets
15
+ */
16
+ export declare function createSheet(sheet_names: string[]): Promise<Record<string, any>>;
17
+ /**
18
+ * Delete multiple worksheets by names
19
+ */
20
+ export declare function deleteSheet(sheet_names: string[]): Promise<Record<string, any>>;
21
+ /**
22
+ * Rename multiple worksheets
23
+ */
24
+ export declare function renameSheet(operations: RenameSheetOperation[]): Promise<Record<string, any>>;
25
+ /**
26
+ * Activate worksheet with the given name
27
+ */
28
+ export declare function activateSheet(sheet_name: string): Promise<string>;
29
+ /**
30
+ * Move worksheet to specified index
31
+ */
32
+ export declare function moveSheet(sheet_name: string, to_index: string | number): Promise<string>;
33
+ /**
34
+ * Show or hide multiple worksheets
35
+ */
36
+ export declare function setSheetDisplayStatus(operations: SheetDisplayStatusOperation[]): Promise<Record<string, any>>;
37
+ /**
38
+ * Get all sheets in current workbook
39
+ */
40
+ export declare function getSheets(): Promise<Array<{
41
+ name: string;
42
+ }>>;
43
+ /**
44
+ * Get active unit ID
45
+ */
46
+ export declare function getActiveUnitId(): Promise<string>;
47
+ export declare const sheetManagementTools: IMCPTool[];
@@ -0,0 +1,10 @@
1
+ import { IStyleBase } from '@univerjs/core';
2
+ /**
3
+ * Generate a unique hash for a style object based on specified properties
4
+ * Only considers: fontSize(fs), italic(it), bold(bl), background(bg.rgb), color(cl.rgb), numberFormat(n.pattern)
5
+ */
6
+ export declare function getStyleHash(style: IStyleBase | null | undefined): string;
7
+ /**
8
+ * Generate a short unique hash (7 chars) for a style object, with collision avoidance and cache.
9
+ */
10
+ export declare function getStyleHash2(style: IStyleBase | null | undefined, dict?: Map<string, string>): string;
@@ -0,0 +1,37 @@
1
+ import { IMCPTool } from '@univerjs-pro/mcp';
2
+ import { z } from 'zod';
3
+ export declare const cellDimensionRequestSchema: z.ZodObject<{
4
+ range: z.ZodString;
5
+ width: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodArray<z.ZodNumber>]>>;
6
+ height: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodArray<z.ZodNumber>]>>;
7
+ }, z.core.$strip>;
8
+ export type CellDimensionRequest = z.infer<typeof cellDimensionRequestSchema>;
9
+ /**
10
+ * Search cells in workbook by keyword and findBy type
11
+ */
12
+ export declare function searchCells(keyword: string, find_by: string): Promise<Record<string, any>>;
13
+ /**
14
+ * Auto fill data from source range to target range using pattern detection
15
+ */
16
+ export declare function autoFill(source_range: string, target_range: string): Promise<string>;
17
+ /**
18
+ * Copy formatting from source_range to target_range using Univer's format painter commands
19
+ */
20
+ export declare function formatBrush(source_range: string, target_range: string): Promise<string>;
21
+ /**
22
+ * Set cell dimensions (column width/row height) using internal commands
23
+ */
24
+ export declare function setCellDimensions(requests: CellDimensionRequest[]): Promise<string>;
25
+ /**
26
+ * Get workbook UI status with optional screenshot
27
+ */
28
+ export declare function getActivityStatus(screenshot?: boolean): Promise<any[]>;
29
+ /**
30
+ * Get range data with optional screenshot and style information
31
+ */
32
+ export declare function getRangeData(range_a1: string | string[], return_screenshot?: boolean, return_style?: boolean): Promise<any[]>;
33
+ /**
34
+ * Scroll to a cell and take screenshot
35
+ */
36
+ export declare function scrollAndScreenshot(cell_a1: string): Promise<any[]>;
37
+ export declare const utilityTools: IMCPTool[];