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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 253 |
{
|
| 254 |
"type": "function",
|
| 255 |
"function": {
|
|
|
|
| 250 |
}
|
| 251 |
}
|
| 252 |
},
|
| 253 |
+
{
|
| 254 |
+
"type": "function",
|
| 255 |
+
"function": {
|
| 256 |
+
"name": "microsoft_search_files",
|
| 257 |
+
"description": "Search files and documents (Word, Excel, PowerPoint, PDF) in user's Microsoft OneDrive",
|
| 258 |
+
"parameters": {
|
| 259 |
+
"type": "object",
|
| 260 |
+
"properties": {
|
| 261 |
+
"query": {"type": "string", "description": "Search keyword or filename to search in OneDrive"}
|
| 262 |
+
}
|
| 263 |
+
}
|
| 264 |
+
}
|
| 265 |
+
},
|
| 266 |
+
{
|
| 267 |
+
"type": "function",
|
| 268 |
+
"function": {
|
| 269 |
+
"name": "excel_list_worksheets",
|
| 270 |
+
"description": "List all worksheets in an Excel workbook by its OneDrive item_id",
|
| 271 |
+
"parameters": {
|
| 272 |
+
"type": "object",
|
| 273 |
+
"properties": {
|
| 274 |
+
"item_id": {"type": "string", "description": "The item ID of the Excel file in OneDrive"}
|
| 275 |
+
},
|
| 276 |
+
"required": ["item_id"]
|
| 277 |
+
}
|
| 278 |
+
}
|
| 279 |
+
},
|
| 280 |
+
{
|
| 281 |
+
"type": "function",
|
| 282 |
+
"function": {
|
| 283 |
+
"name": "excel_add_worksheet",
|
| 284 |
+
"description": "Add a new worksheet to an Excel workbook",
|
| 285 |
+
"parameters": {
|
| 286 |
+
"type": "object",
|
| 287 |
+
"properties": {
|
| 288 |
+
"item_id": {"type": "string", "description": "The item ID of the Excel file in OneDrive"},
|
| 289 |
+
"name": {"type": "string", "description": "Name for the new worksheet"}
|
| 290 |
+
},
|
| 291 |
+
"required": ["item_id", "name"]
|
| 292 |
+
}
|
| 293 |
+
}
|
| 294 |
+
},
|
| 295 |
+
{
|
| 296 |
+
"type": "function",
|
| 297 |
+
"function": {
|
| 298 |
+
"name": "excel_get_range",
|
| 299 |
+
"description": "Read cell values and range content from an Excel worksheet (e.g. 'A1:D10')",
|
| 300 |
+
"parameters": {
|
| 301 |
+
"type": "object",
|
| 302 |
+
"properties": {
|
| 303 |
+
"item_id": {"type": "string", "description": "The item ID of the Excel file in OneDrive"},
|
| 304 |
+
"worksheet_name": {"type": "string", "description": "The name of the worksheet (e.g. 'Sheet1')"},
|
| 305 |
+
"address": {"type": "string", "description": "Cell range address (e.g. 'A1:E20' or 'A1')"}
|
| 306 |
+
},
|
| 307 |
+
"required": ["item_id", "worksheet_name", "address"]
|
| 308 |
+
}
|
| 309 |
+
}
|
| 310 |
+
},
|
| 311 |
+
{
|
| 312 |
+
"type": "function",
|
| 313 |
+
"function": {
|
| 314 |
+
"name": "excel_update_range",
|
| 315 |
+
"description": "Update or insert cell values in an Excel worksheet using a 2D JSON array",
|
| 316 |
+
"parameters": {
|
| 317 |
+
"type": "object",
|
| 318 |
+
"properties": {
|
| 319 |
+
"item_id": {"type": "string", "description": "The item ID of the Excel file in OneDrive"},
|
| 320 |
+
"worksheet_name": {"type": "string", "description": "The name of the worksheet"},
|
| 321 |
+
"address": {"type": "string", "description": "Target cell range address (e.g. 'A1:C2')"},
|
| 322 |
+
"values_json": {"type": "string", "description": "2D JSON array string of values e.g. '[[\"Name\", \"Score\"], [\"John\", 95]]'"}
|
| 323 |
+
},
|
| 324 |
+
"required": ["item_id", "worksheet_name", "address", "values_json"]
|
| 325 |
+
}
|
| 326 |
+
}
|
| 327 |
+
},
|
| 328 |
+
{
|
| 329 |
+
"type": "function",
|
| 330 |
+
"function": {
|
| 331 |
+
"name": "excel_list_tables",
|
| 332 |
+
"description": "List all structured tables in an Excel workbook or specific worksheet",
|
| 333 |
+
"parameters": {
|
| 334 |
+
"type": "object",
|
| 335 |
+
"properties": {
|
| 336 |
+
"item_id": {"type": "string", "description": "The item ID of the Excel file in OneDrive"},
|
| 337 |
+
"worksheet_name": {"type": "string", "description": "Optional worksheet name filter"}
|
| 338 |
+
},
|
| 339 |
+
"required": ["item_id"]
|
| 340 |
+
}
|
| 341 |
+
}
|
| 342 |
+
},
|
| 343 |
+
{
|
| 344 |
+
"type": "function",
|
| 345 |
+
"function": {
|
| 346 |
+
"name": "excel_create_table",
|
| 347 |
+
"description": "Create a new structured data table with headers in an Excel worksheet",
|
| 348 |
+
"parameters": {
|
| 349 |
+
"type": "object",
|
| 350 |
+
"properties": {
|
| 351 |
+
"item_id": {"type": "string", "description": "The item ID of the Excel file in OneDrive"},
|
| 352 |
+
"worksheet_name": {"type": "string", "description": "The name of the worksheet"},
|
| 353 |
+
"address": {"type": "string", "description": "Cell range address for the table e.g. 'A1:D10'"},
|
| 354 |
+
"has_headers": {"type": "boolean", "description": "Whether the first row contains headers. Default: true"}
|
| 355 |
+
},
|
| 356 |
+
"required": ["item_id", "worksheet_name", "address"]
|
| 357 |
+
}
|
| 358 |
+
}
|
| 359 |
+
},
|
| 360 |
+
{
|
| 361 |
+
"type": "function",
|
| 362 |
+
"function": {
|
| 363 |
+
"name": "excel_add_table_row",
|
| 364 |
+
"description": "Append a new row of data to an existing Excel table",
|
| 365 |
+
"parameters": {
|
| 366 |
+
"type": "object",
|
| 367 |
+
"properties": {
|
| 368 |
+
"item_id": {"type": "string", "description": "The item ID of the Excel file in OneDrive"},
|
| 369 |
+
"table_name_or_id": {"type": "string", "description": "The name or ID of the table"},
|
| 370 |
+
"values_json": {"type": "string", "description": "2D JSON array string of row values e.g. '[[\"Product A\", 120, 45.5]]'"}
|
| 371 |
+
},
|
| 372 |
+
"required": ["item_id", "table_name_or_id", "values_json"]
|
| 373 |
+
}
|
| 374 |
+
}
|
| 375 |
+
},
|
| 376 |
+
{
|
| 377 |
+
"type": "function",
|
| 378 |
+
"function": {
|
| 379 |
+
"name": "excel_create_chart",
|
| 380 |
+
"description": "Create a chart (ColumnClustered, Line, Pie, BarClustered, Area) in an Excel worksheet",
|
| 381 |
+
"parameters": {
|
| 382 |
+
"type": "object",
|
| 383 |
+
"properties": {
|
| 384 |
+
"item_id": {"type": "string", "description": "The item ID of the Excel file in OneDrive"},
|
| 385 |
+
"worksheet_name": {"type": "string", "description": "The name of the worksheet"},
|
| 386 |
+
"chart_type": {"type": "string", "description": "Chart type e.g. 'ColumnClustered', 'Line', 'Pie', 'BarClustered', 'Area'"},
|
| 387 |
+
"source_data_address": {"type": "string", "description": "Cell range address of source data e.g. 'A1:B10'"},
|
| 388 |
+
"series_by": {"type": "string", "description": "Series grouping: 'Auto', 'Rows', 'Columns'. Default: 'Auto'"}
|
| 389 |
+
},
|
| 390 |
+
"required": ["item_id", "worksheet_name", "chart_type", "source_data_address"]
|
| 391 |
+
}
|
| 392 |
+
}
|
| 393 |
+
},
|
| 394 |
+
{
|
| 395 |
+
"type": "function",
|
| 396 |
+
"function": {
|
| 397 |
+
"name": "word_create_document",
|
| 398 |
+
"description": "Create a new Microsoft Word document (.docx) on OneDrive with initial text",
|
| 399 |
+
"parameters": {
|
| 400 |
+
"type": "object",
|
| 401 |
+
"properties": {
|
| 402 |
+
"file_name": {"type": "string", "description": "The name of the Word file e.g. 'ProjectReport.docx'"},
|
| 403 |
+
"initial_text": {"type": "string", "description": "Initial text content of the document"},
|
| 404 |
+
"folder_id": {"type": "string", "description": "Destination folder ID or 'root'. Default: 'root'"}
|
| 405 |
+
},
|
| 406 |
+
"required": ["file_name"]
|
| 407 |
+
}
|
| 408 |
+
}
|
| 409 |
+
},
|
| 410 |
+
{
|
| 411 |
+
"type": "function",
|
| 412 |
+
"function": {
|
| 413 |
+
"name": "word_read_document_text",
|
| 414 |
+
"description": "Read content and text of a Microsoft Word document by item_id",
|
| 415 |
+
"parameters": {
|
| 416 |
+
"type": "object",
|
| 417 |
+
"properties": {
|
| 418 |
+
"item_id": {"type": "string", "description": "The item ID of the Word document in OneDrive"}
|
| 419 |
+
},
|
| 420 |
+
"required": ["item_id"]
|
| 421 |
+
}
|
| 422 |
+
}
|
| 423 |
+
},
|
| 424 |
+
{
|
| 425 |
+
"type": "function",
|
| 426 |
+
"function": {
|
| 427 |
+
"name": "word_append_text",
|
| 428 |
+
"description": "Append paragraphs, sections, or headings to an existing Microsoft Word document",
|
| 429 |
+
"parameters": {
|
| 430 |
+
"type": "object",
|
| 431 |
+
"properties": {
|
| 432 |
+
"item_id": {"type": "string", "description": "The item ID of the Word document in OneDrive"},
|
| 433 |
+
"text": {"type": "string", "description": "The text content to append"},
|
| 434 |
+
"heading_level": {"type": "integer", "description": "Heading level: 0 for normal text, 1 for Heading 1, 2 for Heading 2. Default: 0"}
|
| 435 |
+
},
|
| 436 |
+
"required": ["item_id", "text"]
|
| 437 |
+
}
|
| 438 |
+
}
|
| 439 |
+
},
|
| 440 |
+
{
|
| 441 |
+
"type": "function",
|
| 442 |
+
"function": {
|
| 443 |
+
"name": "word_find_and_replace",
|
| 444 |
+
"description": "Find specific text and replace it with new content in a Microsoft Word document",
|
| 445 |
+
"parameters": {
|
| 446 |
+
"type": "object",
|
| 447 |
+
"properties": {
|
| 448 |
+
"item_id": {"type": "string", "description": "The item ID of the Word document in OneDrive"},
|
| 449 |
+
"find_text": {"type": "string", "description": "The text to find"},
|
| 450 |
+
"replace_text": {"type": "string", "description": "The text to replace it with"}
|
| 451 |
+
},
|
| 452 |
+
"required": ["item_id", "find_text", "replace_text"]
|
| 453 |
+
}
|
| 454 |
+
}
|
| 455 |
+
},
|
| 456 |
+
{
|
| 457 |
+
"type": "function",
|
| 458 |
+
"function": {
|
| 459 |
+
"name": "word_convert_to_pdf",
|
| 460 |
+
"description": "Get PDF conversion endpoint and direct PDF download stream for a Microsoft Word document",
|
| 461 |
+
"parameters": {
|
| 462 |
+
"type": "object",
|
| 463 |
+
"properties": {
|
| 464 |
+
"item_id": {"type": "string", "description": "The item ID of the Word document in OneDrive"}
|
| 465 |
+
},
|
| 466 |
+
"required": ["item_id"]
|
| 467 |
+
}
|
| 468 |
+
}
|
| 469 |
+
},
|
| 470 |
+
{
|
| 471 |
+
"type": "function",
|
| 472 |
+
"function": {
|
| 473 |
+
"name": "powerpoint_create_presentation",
|
| 474 |
+
"description": "Create a new Microsoft PowerPoint presentation (.pptx) on OneDrive with title slide",
|
| 475 |
+
"parameters": {
|
| 476 |
+
"type": "object",
|
| 477 |
+
"properties": {
|
| 478 |
+
"file_name": {"type": "string", "description": "The name of the presentation file e.g. 'PitchDeck.pptx'"},
|
| 479 |
+
"title": {"type": "string", "description": "Title of the presentation"},
|
| 480 |
+
"folder_id": {"type": "string", "description": "Destination folder ID or 'root'. Default: 'root'"}
|
| 481 |
+
},
|
| 482 |
+
"required": ["file_name"]
|
| 483 |
+
}
|
| 484 |
+
}
|
| 485 |
+
},
|
| 486 |
+
{
|
| 487 |
+
"type": "function",
|
| 488 |
+
"function": {
|
| 489 |
+
"name": "powerpoint_get_presentation_details",
|
| 490 |
+
"description": "Get metadata, web URL, and information about a Microsoft PowerPoint presentation",
|
| 491 |
+
"parameters": {
|
| 492 |
+
"type": "object",
|
| 493 |
+
"properties": {
|
| 494 |
+
"item_id": {"type": "string", "description": "The item ID of the PowerPoint file in OneDrive"}
|
| 495 |
+
},
|
| 496 |
+
"required": ["item_id"]
|
| 497 |
+
}
|
| 498 |
+
}
|
| 499 |
+
},
|
| 500 |
+
{
|
| 501 |
+
"type": "function",
|
| 502 |
+
"function": {
|
| 503 |
+
"name": "powerpoint_add_slide_content",
|
| 504 |
+
"description": "Add a new slide with title and bullet points to an existing PowerPoint presentation",
|
| 505 |
+
"parameters": {
|
| 506 |
+
"type": "object",
|
| 507 |
+
"properties": {
|
| 508 |
+
"item_id": {"type": "string", "description": "The item ID of the PowerPoint file in OneDrive"},
|
| 509 |
+
"slide_title": {"type": "string", "description": "Title for the slide"},
|
| 510 |
+
"bullet_points_json": {"type": "string", "description": "JSON array string of bullet points e.g. '[\"Point 1\", \"Point 2\"]'"}
|
| 511 |
+
},
|
| 512 |
+
"required": ["item_id", "slide_title"]
|
| 513 |
+
}
|
| 514 |
+
}
|
| 515 |
+
},
|
| 516 |
+
{
|
| 517 |
+
"type": "function",
|
| 518 |
+
"function": {
|
| 519 |
+
"name": "powerpoint_convert_to_pdf",
|
| 520 |
+
"description": "Get PDF conversion endpoint and direct PDF download stream for a Microsoft PowerPoint presentation",
|
| 521 |
+
"parameters": {
|
| 522 |
+
"type": "object",
|
| 523 |
+
"properties": {
|
| 524 |
+
"item_id": {"type": "string", "description": "The item ID of the PowerPoint presentation in OneDrive"}
|
| 525 |
+
},
|
| 526 |
+
"required": ["item_id"]
|
| 527 |
+
}
|
| 528 |
+
}
|
| 529 |
+
},
|
| 530 |
{
|
| 531 |
"type": "function",
|
| 532 |
"function": {
|