Tools & Connectors
Microsoft Productivity
Microsoft Excel, Word, and PowerPoint toolsets.
#Microsoft productivity
Read and edit Office documents -- Excel workbooks, Word documents, and
PowerPoint decks -- through Microsoft Graph.
MicrosoftExcelToolSet, MicrosoftWordToolSet, andMicrosoftPowerPointToolSet wrap document-format operations on top of
Microsoft Graph. They share the auth and HTTP-client plumbing used by
`microsoft_graph` connectors. Pass drive_id to
target a specific drive instead of /me/drive.
All three toolsets are content-level editors -- they assume you already
have the Graph drive-item ID for the workbook/document/deck. To find
one by name, use
`MicrosoftFilesToolSet.search_files(include_ids=True)`
and pass the returned item dict into any of these tools. Each Excel /
Word / PowerPoint tool accepts either a raw item-ID string or a Graph
item dict and will pull the right ID out.
#MicrosoftExcelToolSet
from maivn_tools import MicrosoftExcelToolSet connector = MicrosoftExcelToolSet(token=token_cache)| Tool | Permission | Description |
|---|---|---|
list_worksheets(item_id) / get_worksheet(item_id, name) |
READ | Worksheets. |
add_worksheet(item_id, name) |
WRITE | Add a worksheet. |
delete_worksheet(item_id, name) |
DELETE (destructive) | Remove a worksheet. |
get_range(item_id, worksheet, address) / get_used_range(item_id, worksheet, values_only) |
READ | Ranges. |
update_range(item_id, worksheet, address, values, formulas, number_format) |
WRITE | Patch a range. |
clear_range(item_id, worksheet, address, apply_to) |
DELETE (destructive) | Clear cell contents. |
list_tables(item_id, worksheet) / add_table(item_id, worksheet, address, has_headers) |
READ / WRITE | Tables. |
add_table_rows(item_id, table_name, values, index) / get_table_rows(item_id, table_name) |
WRITE / READ | Table rows. |
delete_table(item_id, table_name) |
DELETE (destructive) | Remove a table. |
create_session(item_id, persist_changes) / close_session(item_id, workbook_session_id) |
WRITE | Workbook sessions. |
#Agent-ready behavior
MicrosoftExcelToolSetis a worksheet/range/table editor -- useMicrosoftFilesToolSet.search_files(include_ids=True)to locate a
workbook, then pass the returned item dict to any of these tools.
The connector readsitem_id/file_id/workbook_id/id
out of the dict.list_worksheets,get_used_range,list_tables, andget_table_rows
return the raw Graph response (e.g.{"value": [...]}); they are
small enough that no summary mode is needed. Uselist_worksheets
orget_used_rangeas a first call when you do not know a
workbook's extent.create_sessionreturns{"id": <session_id>, ...}. Pass thatidto subsequent calls via theWorkbook-Session-Idheader
for efficient batched edits, then callclose_sessionto commit
or discard.
file = files.search_files("Q4 forecast.xlsx", include_ids=True)["items"][0]excel.list_worksheets(file)excel.get_used_range(file, worksheet="Plan", values_only=True)#Destructive tools
delete_worksheet, clear_range, and delete_table are taggeddestructive and require PermissionFlag.DELETE. clear_range'sapply_to argument controls whether contents, formats, or both are
cleared ("All" by default). Filter the destructive surface off the
toolset with exclude_tags=["destructive"] for read-only / safe-edit
agents.
#MicrosoftWordToolSet
from maivn_tools import MicrosoftWordToolSet connector = MicrosoftWordToolSet(token=token_cache)Word does not expose structured editing through Microsoft Graph; this
toolset covers the surface that does exist.
| Tool | Permission | Description |
|---|---|---|
get_metadata(item_id) |
READ | DriveItem metadata. |
download_content(item_id) |
READ | Raw .docx bytes. |
convert_to(item_id, format) |
READ | Download in another format (pdf, html, jpg, glb). |
replace_content(item_id, content_bytes) |
WRITE | Overwrite the document. |
upload_new(path, content_bytes) |
WRITE | Upload a new .docx. |
#Agent-ready behavior
MicrosoftWordToolSethas no list/search of its own -- useMicrosoftFilesToolSet.search_files(include_ids=True)to locate a
document, then pass the returned item dict toget_metadata/download_content/convert_to/replace_content. The
connector readsitem_id/file_id/idout of the dict.download_contentandconvert_toreturn{"item_id": ..., "status": ..., "body": <bytes>}(withformat
onconvert_to). The body is raw bytes, not base64 -- if you need
to ship it through a JSON-only tool channel, base64-encode it
yourself.replace_contentis limited to ~4 MB; for larger files use
`MicrosoftFilesToolSet.create_upload_session`.
file = files.search_files("Launch plan.docx", include_ids=True)["items"][0]word.convert_to(file, format="pdf")#Destructive tools
MicrosoftWordToolSet does not expose any DELETE-tagged tools.replace_content does overwrite the existing document in place --
treat it as destructive in workflow even though it is tagged WRITE
(filtering on exclude_tags=["destructive"] will not remove it).
For file deletion, use
`MicrosoftFilesToolSet`.
#MicrosoftPowerPointToolSet
from maivn_tools import MicrosoftPowerPointToolSet connector = MicrosoftPowerPointToolSet(token=token_cache)| Tool | Permission | Description |
|---|---|---|
get_metadata(item_id) |
READ | DriveItem metadata. |
download_content(item_id) |
READ | Raw .pptx bytes. |
convert_to(item_id, format) |
READ | Download as PDF / JPG. |
list_thumbnails(item_id) |
READ | Slide thumbnails. |
replace_content(item_id, content_bytes) |
WRITE | Overwrite the deck. |
upload_new(path, content_bytes) |
WRITE | Upload a new .pptx. |
#Agent-ready behavior
MicrosoftPowerPointToolSethas no list/search of its own -- useMicrosoftFilesToolSet.search_files(include_ids=True)to locate a
deck, then pass the returned item dict toget_metadata/download_content/convert_to/list_thumbnails/replace_content. The connector readsitem_id/file_id/presentation_id/idout of the dict.download_contentandconvert_toreturn{"item_id": ..., "status": ..., "body": <bytes>}(withformat
onconvert_to). The body is raw bytes;convert_toacceptspdforjpgonly.replace_contentis limited to ~4 MB; for larger files use
`MicrosoftFilesToolSet.create_upload_session`.
file = files.search_files("All-hands deck.pptx", include_ids=True)["items"][0]powerpoint.list_thumbnails(file)#Destructive tools
MicrosoftPowerPointToolSet does not expose any DELETE-tagged tools.replace_content does overwrite the existing deck in place -- treat
it as destructive in workflow even though it is tagged WRITE
(filtering on exclude_tags=["destructive"] will not remove it).
For file deletion, use
`MicrosoftFilesToolSet`.