-
Notifications
You must be signed in to change notification settings - Fork 1
refactor: Optimize sharepoint_excel tool description #63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -549,26 +549,21 @@ def register_tools(): | |||||
| if config.is_tool_enabled("sharepoint_excel"): | ||||||
| mcp.tool( | ||||||
| description=( | ||||||
| "Read or search Excel files in SharePoint. " | ||||||
| "Search mode: use 'query' parameter to find cells containing specific text (returns cell locations and optionally row data). " | ||||||
| "Read mode: use 'sheet' and 'cell_range' parameters to retrieve data from specific sections. " | ||||||
| "When cell_range is specified with include_frozen_rows=True (default), frozen rows are automatically " | ||||||
| "included even if they are outside the specified range. frozen_rows indicates the number of header rows " | ||||||
| "frozen at the top of the sheet (typically column headers). " | ||||||
| "Response includes cell data in 'rows' (value and coordinate) and structural information " | ||||||
| "(sheet name, dimensions, frozen_rows, frozen_cols, freeze_panes when present, merged_ranges when merged cells exist). " | ||||||
| "Cell styles (include_cell_styles, default: false): background colors and sizes. Use only for color-coded data extraction. " | ||||||
| "Header detection: For sheets with frozen_rows > 0, headers are automatically included with include_frozen_rows=True (default). " | ||||||
| "For sheets with frozen_rows=0, headers are not automatically included and context may be unclear. " | ||||||
| "ALWAYS read exactly 5 rows for header check: 'A1:Z5' (NOT 'A1:Z50' or more). " | ||||||
| "IMPORTANT: include_row_data=True returns matched row data only (not headers), same-row matches duplicate data. " | ||||||
| "Always read 'A1:Z5' first for header context. Effective for <200 matches. " | ||||||
| "Prefer 'query' search when possible to locate data first. " | ||||||
| "Workflow: 1) Read 'A1:Z5' for header check (REQUIRED for understanding column structure), " | ||||||
| "2) Search with query (optionally with include_row_data=True to get matched row data), " | ||||||
| "3) Read specific range if needed (include_frozen_rows adds frozen headers automatically), " | ||||||
| "4) If frozen_rows=0 and header context is unclear, retry with expand_axis_range=True " | ||||||
| "to auto-include row 1 (for columns) or column A (for rows)." | ||||||
| "ALWAYS start by reading 'A1:Z5' to understand column structure (required for both modes). " | ||||||
| "Two modes: 1) Search mode (query parameter) finds cells containing text and returns locations with optional row data. " | ||||||
| "2) Read mode (sheet + cell_range) retrieves specific sections. " | ||||||
| "Key parameters: " | ||||||
| "- include_frozen_rows (default: true): Auto-includes frozen header rows even if outside specified range. " | ||||||
| "frozen_rows = header row count " | ||||||
| "- include_cell_styles (default: false): Adds background colors and sizes (20% more tokens) - use for color-coded data only " | ||||||
| "- expand_axis_range (default: false): When frozen_rows=0, auto-expands ranges to include row 1/column A for headers " | ||||||
| "- include_row_data (default: false): Search mode - returns entire matched rows (headers excluded). Best for <200 matches. " | ||||||
|
||||||
| "- include_row_data (default: false): Search mode - returns entire matched rows (headers excluded). Best for <200 matches. " | |
| "- include_row_data (default: false): Search mode - for each match, returns a list of non-null cells from the matched row (header rows are included when they match). Best for <200 matches. " |
k-ibaraki marked this conversation as resolved.
k-ibaraki marked this conversation as resolved.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
「Read mode (sheet + cell_range)」とありますが、実装上は sheet や cell_range が None でも parse_to_json が動作し(全シート/シート全体を対象にする)、必須パラメータではありません。必須に読める表現だと誤った利用(不要な引数指定や動作の誤解)につながるので、任意であることが分かる書き方にしてください。