Skip to main content
Glama

ExcelMCP

AIエージェントのための生きたExcelインテリジェンスレイヤー。 OneDriveフォルダを指定するだけで、エージェントが現在の数値に基づいて、それらのスプレッドシートについて平易な英語で質問できるようになります。

Python License: MIT MCP Built with FastMCP Microsoft Graph Status PRs welcome


これが解決する問題

ほとんどのスプレッドシート連携は、データを別の場所にコピーすることで機能します。ワークブックを取り込み、チャンク化し、セルの値を埋め込み、全体をベクターデータベースに保存します。その瞬間から、エージェントはスナップショットに関する質問に答えることになります。誰かが午前9時に在庫シートを更新しても、エージェントは火曜日の数値を引用し続けます。

ExcelMCPは問題を2つに分割します。

構造はキャッシュされます。 ファイル名、シート名、列ヘッダー、ヘッダー行の開始位置、日付を保持する列、シート同士の関係、そして低カーディナリティ列ごとの個別ラベルの小さなサンプル — これが、何百ものほぼ同一のシート間でのルーティングを意味のあるものにします。これらはめったに変更されず、保存コストも安く、エージェントが何を要求すべきかを知るために必要なものです。(サンプリングされたラベルは、構造が値に触れる唯一の場所です。正確な境界はディスクに保存されるものに詳述されています。)

データは決してキャッシュされません。 数値を返すすべてのツールコールは、Microsoft Graph APIにアクセスし、ライブでデータを取得します。古くなるデータキャッシュも、遅れる同期ジョブも、ディスクから提供される回答もありません。

すべてのレスポンスには、metadata.fetched_atタイムスタンプとis_cached: falseフラグが含まれ、モデルが帯域内で最新データを見ていることを認識できるようにします。


Related MCP server: Microsoft 365 MCP Server

仕組み

自然言語の質問が埋め込まれ、コサイン類似度によってシートの説明と照合され、次に列名とサンプリングされた値との字句的な重複によって再ランク付けされます。これにより、20のワークブックが1つのスキーマを共有する場合でも、ルーティングが意味を保ちます。これらのシート、そしてそれらのシートのみがライブでフェッチされます。フィルタリングと集計は、新しくフェッチされたフレームに対してpandasで行われます。単一値の質問は行パイプラインを完全にスキップします。lookupは1つのキー列と1つの行を読み取り、その出所とともにセルを返します。


要件

  • Python 3.10 以降

  • OneDriveを使用するMicrosoft 365アカウント

  • uv、または必要に応じて通常のpip


インストール

リポジトリルートから:

git clone https://github.com/Karunya-Muddana/ExcelMCP.git
cd ExcelMCP

uv sync      # install dependencies
uv build     # build the wheel
pip install dist/excelmcp-0.3.0-py3-none-any.whl

または、ビルドせずにソースから直接インストール:

pip install .

コンパイラのステップやビルドする必要のあるネイティブ拡張はありません。ベクトル検索はhnswlibではなくNumPyのコサインスキャンで実行されるため、C++ツールチェーンのないマシンでもpip installが機能します。


セットアップ

ウィザードを一度実行します:

excelmcp-setup

以下の4つの手順を実行します:

  1. Microsoftデバイスフローサインイン。コードが発行され、ブラウザに貼り付けると、トークンキャッシュが0600パーミッションで~/.excelmcp/token.jsonに保存されます。

  2. インデックスを作成するOneDriveフォルダ(例: /ERP)。

  3. そのフォルダ内のすべての.xlsxをスキャンして、構造グラフと埋め込みを構築します。

  4. マシンに既にインストールされているAIエージェントを検出し、選択したエージェントの設定エントリを書き込みます。

自動設定可能なエージェント

エージェント

設定ファイル

Claude Code

~/.claude.json

Claude Desktop

claude_desktop_config.json

Cursor

~/.cursor/mcp.json

Windsurf

~/.codeium/windsurf/mcp_config.json

Gemini CLI

~/.gemini/settings.json

Codex CLI

~/.codex/config.toml

VS Code (Copilot)

VS Codeユーザー mcp.json

Cline

拡張機能 cline_mcp_settings.json

Continue

~/.continue/config.yaml

Goose

~/.config/goose/config.yaml

Zed

~/.config/zed/settings.json

Hermes

~/.hermes/config.yaml

既存の設定ファイルは変更前にバックアップされます。エージェントがリストにない場合、ウィザードは自分で貼り付けるための正確なJSONまたはTOMLブロックを出力します。

その他のウィザードコマンド

excelmcp-setup list-agents           # show what was detected
excelmcp-setup install --only cursor # register with one agent, skip the rescan
excelmcp-setup doctor                # diagnose a broken install
excelmcp-setup uninstall             # remove ExcelMCP from every agent config
excelmcp-setup --folder /ERP --yes   # fully non-interactive
excelmcp-setup --dry-run             # print the changes, write nothing

エージェントに公開されるツール

ツール

ネットワーク

機能

get_workspace_graph

なし

ワークスペースの完全な構造: ファイル、シート、列、テーブル領域、関係、命名バリアント、スキャン経過時間。即時。

inspect_file

なし

同上、1つのファイルに限定、最終スキャン時点のおおよその行数付き。即時。

scan_workspace

高負荷

OneDriveを再クロールし、構造、サンプリング値、関係、埋め込みを再構築。

query

ライブ

自然言語の質問。ベクトル類似度と字句的再ランク付けによってルーティング。

lookup

ライブ

1回の呼び出し → ファイル/シート/セルの出所と信頼度シグナルを含む1つのセル値。

get_cell

ライブ

1つのGraphリクエストで1つのアドレス指定されたセル。

filter_sheet

ライブ

1つのシートをフェッチし、条件に一致する行を返す。

aggregate

ライブ

1つのシートをフェッチし、グループ化して集約、having句対応。

cross_file_aggregate

ライブ

すべてのファイルから一致するシートをフェッチし、合計にまとめる。

join_sheets

ライブ

既知の関係から提案されたキー列で2つのシートをマージ。

derive

ライブ

トランザクションタイプに基づく符号付き合計 — 1回の呼び出しで正味在庫。

2つの構造ツールはローカルグラフを読み取るため、無料で即時応答です。ライブとマークされたものは、呼び出しのたびにAPIにアクセスします。


使用方法

サーバーが登録されると、通常通りエージェントと会話するだけです。内部的には、以下のような呼び出しが行われます。

まずは方向性を確認。エージェントは列名を推測する前に常にこれを行うべきです。同じ名前の会社は2つとないからです:

get_workspace_graph(folder_path="/ERP")

答えがどこにあるかわからずに質問する:

query("what are the top 10 products by sales value", folder_path="/ERP")

既知のシートをフィルタリングする:

filter_sheet(
    file_name="Inventory.xlsx",
    sheet="Stock",
    conditions={"Status": "Low", "Quantity": "<50"},
    folder_path="/ERP",
    sort_by="Quantity",
    limit=100,
)

サポートされている条件演算子(すべてAND結合):

形式

意味

{"Col": "value"}

完全一致 — 大文字小文字と空白を区別しません。厳密な場合は exact_case=True を渡します

{"Col": "~value"}

部分一致、リテラル部分文字列、正規表現ではありません

{"Col": ">100"}

より大きい(>=, <, <= も同様)

{"Col": ">=2026-01-01"}

日付境界、ISO-8601形式、検出された日付列で機能します

{"Col": {"in": ["a", "b"]}}

リストされた値のいずれか

{"Col": {"between": [10, 500]}}

包括範囲、数値または日付

{"Col": {">=": "2026-01-01", "<": "2026-04-01"}}

複合境界

{"Col": {"is_null": false}}

nullチェック — 空白と空文字列はnullとしてカウントされます

存在しない列名や演算子は、静かに0行を返すのではなくエラーを発生させます。これは、エージェントが誤った情報を自信を持って報告する原因となる障害モードです。条件が正当に何も一致しない場合、レスポンスにはzero_match_diagnosticsが含まれます — 各条件が単独で何に一致したか、問題の列に実際に存在する最大20個の値 — これにより、ニアミスが「データなし」と報告される代わりに修正されます。

1回の呼び出しで単一の数値を尋ねる:

lookup(query="contracted rate for Titanium Dioxide under the BESTEX contract",
       folder_path="/Contracts")

回答は出所(ファイル、シート、セルアドレス、一致した行)と信頼度フィールドとともに返されます。複数の一致行がある場合はambiguousとすべての行が返され、シート間で矛盾がある場合はconflictとすべてのバージョンが値なしで返され、キーのスペルミスはあいまいな提案を返します。このツールは裸の数値を返すことはありません。

1つのファイル内でグループ化して集約する:

aggregate(
    file_name="Sales.xlsx",
    sheet="Q1",
    group_by="Region",
    value_col="Revenue",
    operation="sum",
    folder_path="/ERP",
)

ワークスペース内のすべてのファイルで同じシートを合計する:

cross_file_aggregate(
    sheet="Q1",
    value_col="Revenue",
    operation="sum",
    folder_path="/ERP",
    conditions={"Status": "Closed"},
)

cross_file_aggregateは、合計とともにファイルごとの内訳を返し、ファイルが読み取れなかった場合はskipped_filesを、正確なシート名を含まないすべてのファイルに対してdid_you_mean候補を含むunmatched_filesを返します。これにより、部分的な合計が静かに間違っているのではなく、明らかに部分的であることがわかります。これは、一部のファイルでシート名がSalesであり、他のファイルでSales 2024である場合も含みます。集計する前にget_workspace_graphでsheet_name_variantsを確認して、その断片化を事前に把握してください。


エージェントプレイブック

サーバーのインストールは簡単な半分です。agents/フォルダは残りの半分をカバーしています: これらのツールを持つエージェントにプロンプトを与える方法、各ホストに配線する方法、そして動作した後に何を自動化するか。

agents/system-prompt.md

カスタムエージェント、サブエージェント、CLAUDE.md、またはCursorルールのためのドロップインシステムプロンプト。フルバージョンとトリムバージョン、および自分のワークスペースのクセを固定するためのテンプレートが含まれます。

agents/prompts.md

ジョブ別に分類されたコピペ用プロンプト:オリエンテーション、ストレートな回答、分析、検証、レポート、データ品質。最後にアンチプロンプト(もっともらしく見えて確実に間違った答えを生成する言い回し)のセットが付いています。

agents/guides/getting-started.md

チェーンがエンドツーエンドで機能することを証明する最初のセッション。データが実際にライブであることを自分で確認する方法も含みます。

agents/guides/hosts.md

12のサポートされているホスト構成のそれぞれに書き込まれる内容、確認方法、ホストごとのクセ、およびホストなしでサーバーをプログラム的に駆動する方法。

agents/guides/query-patterns.md

どのツールを手に取るか、セマンティックルーティングが実際にどのようにシートを選択するか、条件構文で表現できないこと、そして自信満々の間違った答えを生み出すデータ形状。

agents/guides/troubleshooting.md

症状の解説:PATHの問題や403エラーから、文字化けした列名や2倍になる合計値まで。

agents/routines/

4つのすぐにスケジュールできるルーチン:毎日の在庫チェック、週次売上ダイジェスト、月末調整、データ品質監査。それぞれにプロンプト、スケジュール、よくある問題が含まれています。

サーバーに組み込まれたガードレール

サーバーには、MCPインストラクションとして一連の運用ルールが同梱されており、ホストモデルが最初の呼び出しを行う前に読み取ります。これらは、LLMがスプレッドシートの質問を間違える具体的な方法に対処するために存在します。

  • ファイル名、シート名、列名を決して推測しない。グラフから発見すること。

  • ファイルをまたいだ数値を頭の中で合計しない。cross_file_aggregateを呼び出してツールに任せること。

  • openpyxl、pandas.read_excel、またはローカルファイルシステムに決してアクセスしない。ファイルはこのマシン上にありません。

  • トランザクション形式のデータで数量列を生のまま合計しない。deriveを使用し、トランザクションタイプを明示的に指定すること。

  • 日付列はISO-8601文字列として到着し、サーバーによってシリアル値から変換済みです。シリアル演算を手動で行わないこと。

  • 単一の数値の場合はlookupを呼び出し、それが返す出典情報を引用すること。ambiguousおよびconflictの結果を表示し、値を自分で選ばないこと。

  • 結果が完全であると主張する前に、truncatedおよびtotal_matchedフィールドを確認すること。

サーバーインストラクションを無視するホスト、および自分で構築するカスタムエージェントについては、この内容を独自のプロンプトに明記する必要があります。agents/system-prompt.mdを参照してください。


構成

変数

デフォルト

目的

EXCELMCP_CLIENT_ID

組み込み

Azure ADアプリケーションクライアントID

EXCELMCP_TENANT_ID

common

テナント。個人アカウントの場合はcommonを使用します。

EXCELMCP_DEFAULT_FOLDER

未設定

ツール呼び出しでfolder_pathが省略された場合に使用するフォルダ。ウィザードがこれをエージェント設定に書き込みます。

EXCELMCP_MAX_CONCURRENCY

8

すべてのコードパスにわたる、Microsoft Graphへの最大同時リクエスト数。

組み込みのクライアントIDは、デバイスコードフローに使用されるパブリッククライアントです。シークレットは含まれず、設計上すべての認証リクエストで可視であり、このリポジトリに含めても安全です。同意画面に組織名を表示したい場合は、独自のアプリ登録に置き換えてください。


ディスクに保存されるもの

~/.excelmcp/
  token.json           MSAL token cache. Auth material only, written 0600.
  graph.json           Structure graph: item IDs, sheet names, column headers,
                       used-range dimensions, date column types, per-sheet
                       table regions, inferred and formula-declared
                       relationships — and sampled values (see below).
  vectors.npy          Embedded sheet descriptions for semantic routing.
  metadata.json        Labels and lexical terms tying each embedding to a sheet.
  relationships.yaml   Optional, written by you: declared join relationships.

バージョン0.3.0時点での、キャッシュなし主張の正直なバージョン。 データの行、セルグリッド、クエリ可能な値はディスクに保存されません。すべての回答は常にライブフェッチから提供されます。意図的な例外が1つあります:graph.jsonはサンプリングされた値を保存します。これは、低カーディナリティ列(クライアント名、ステータス、材料名、単位)あたり最大50個の異なるテキストラベルで、スキャン時に取得されます。これらは、質問をルーティングする際に構造的に同一のシートを区別できるようにするため、lookupがすべてをダウンロードせずにどのシートに「BESTEX」が含まれているかを特定できるようにするため、そして関係を列名から推測するのではなく値の重複から推測できるようにするために存在します。これらはルーティングの証拠であり、データキャッシュではありません。これらから質問に答えることは決してなく、ワークスペーススキャンによって完全に更新されます。グラフはまた、シートごとの構造フィンガープリント(ヘッダー列と使用範囲アドレス)を保存し、これはドリフト検出専用です。さらに、バージョン0.3.0ではリージョンマップも保存します:シート上の各テーブル本体の行スパン。これは、シート自体のSUM/COUNT/AVERAGE数式が参照する範囲と、シート間の数式が読み取るアドレスから導出されます。これらは行番号とセルアドレスであり、内容ではありません。値を読み取って生成されることはありません。存在する場合のリージョンのlabelは、サンプリングされた値に次ぐ2番目の意図的な例外です。リージョンのすぐ上のセクションバナーセルから読み取られた数語(「NAPHTHALENE」、「OLEUM 65%」)で、モデルが行番号から推測するのではなく、どのテーブルを指しているかを名前で指定できるように保持されます。これはシートのレイアウトを記述する構造メタデータであり、行データではありません。サンプリングされた値がすでに描いているのと同じ区別です。これらがディスクに保存される以上のことを望まない場合は、そのフォルダをスキャンしないでください。境界を確認したい場合は、graph.jsonは小さくて読み取り可能なので、見てみてください。

Windowsでは、os.chmodは読み取り専用ビットのみを切り替えるため、0600モードはそこでのベストエフォートであり、実際の保護は%USERPROFILE%のデフォルトのユーザーごとのACLです。macOSとLinuxでは、モードはコンテンツが書き込まれる前に一時ファイルに適用されるため、トークンが一時的にワールドリーダブルとして存在することはありません。


テスト

# offline unit tests, no network and no credentials required
pytest tests/test_unit.py

# live integration tests against a workspace you have already scanned, opt in
EXCELMCP_TEST_FOLDER=/ERP pytest tests/test_live_integration.py -v

統合テストスイートは、EXCELMCP_TEST_FOLDERが設定されていない場合に自分自身をスキップするため、プレーンなpytestの実行はオフラインのままです。


プロジェクトレイアウト

agents/           prompts, host guides, and schedulable routines
auth.py           MSAL device flow, token cache, proactive refresh
graph_client.py   Graph API wrapper, 429 backoff, shared concurrency gate
structure.py      Structure discovery, value sampling, relationship inference
embeddings.py     FastEmbed vectors, NumPy cosine search, lexical rerank
query_engine.py   Conditions, live fetch, aggregation, joins, derive
lookup.py         Single-cell lookup pipeline and get_cell
ranges.py         A1-notation range arithmetic
main.py           FastMCP tool definitions and server entry point
cli.py            Setup wizard, agent detection, config writing
agents.py         Per agent config formats and file locations
storage.py        Atomic writes, stderr logging, config directory handling

コントリビューション

Issueとプルリクエストは歓迎します。別のエージェントのサポートを追加する場合、agents.pyだけを触る必要があります。AgentSpecを設定パス、エントリ形状、検出ヒントとともに追加してください。


ライセンス

MIT。 LICENSEを参照してください。

Available Tools

11 tools
aggregateA

Fetches a sheet LIVE and runs a grouped aggregation. Operations: sum, count, mean, min, max. group_by is one column name or a list of them. conditions filters rows before aggregating (same grammar as filter_sheet, including the object form). having filters the AGGREGATED rows afterwards, e.g. having={"Revenue": ">1000"} keeps only groups whose aggregate exceeds 1000. SINGLE FILE ONLY. For totals across multiple files you MUST use cross_file_aggregate instead — never use this tool and then manually add results across files. Get column names from get_workspace_graph first. Returns rows plus a truncated flag. If conditions matched zero rows, zero_match_diagnostics shows what each condition matched alone and the values actually present — correct the condition and retry.

Inputs: sheet (required), group_by (required), file_name (required), operation (required), +4 more. Returns: object

cross_file_aggregateA

MANDATORY for any total spanning more than one file. Fetches relevant sheets from ALL files in PARALLEL, applies filter conditions, returns the aggregate total.

WHEN YOU MUST CALL THIS:

  • Any total, sum, count, or average across multiple files

  • Any cross-file comparison or consolidation

  • Verifying a total you calculated from individual files

NEVER calculate cross-file totals by:

  • Adding individual filter_sheet results in your head

  • Using Python to sum numbers from separate tool calls

  • Guessing based on partial data

Always call this AND show per-file breakdown so the user can verify both agree. If they differ, flag it.

ONLY files whose sheet is named EXACTLY sheet are included in the total. Files without that exact sheet are listed in unmatched_files, with their actual sheet names and did_you_mean candidates — they are NEVER silently included. If the response has a warning, skipped_files, or unmatched_files, surface that to the user: the total may be incomplete. Check sheet_name_variants in get_workspace_graph first to see naming fragmentation before aggregating.

Inputs: sheet (required), operation (required), value_col (required), conditions, +1 more. Returns: object

deriveA

Computes a NET value over transaction types in one call: sum of sign * groupwise_sum(quantity_col) across the given components. This is how a stock figure like receipts + purchases − consumption − returns becomes ONE call with the arithmetic done in pandas, instead of five filter_sheet calls added up in your head (which RULE 3 forbids).

components is a list of {"conditions": {...same grammar as filter_sheet...}, "sign": 1 or -1, "label": "receipts"} conditions (optional) pre-filters the sheet before any component applies. The response includes a per-component breakdown with rows_matched. A component that matched ZERO rows is flagged and warned about — check the spelling of the transaction type before trusting the net.

Inputs: sheet (required), group_by (required), file_name (required), components (required), +3 more. Returns: object

filter_sheetA

Fetches a specific sheet LIVE from OneDrive and returns rows matching the given conditions. Always live — no cache. Use when you already know which file and sheet to query. Get column names from get_workspace_graph first.

Condition formats (string form): Exact match: {"ColumnName": "value"} Contains: {"ColumnName": "~value"} (literal, not regex) Comparisons: {"ColumnName": ">100"} (also >=, <, <=) Date bounds: {"Batch Date": ">=2026-01-01"} (ISO-8601)

Condition formats (object form, combinable): IN list: {"Status": {"in": ["Closed", "Shipped"]}} Range: {"Qty": {"between": [10, 500]}} Date range: {"Batch Date": {">=": "2026-01-01", "<": "2026-04-01"}} Null check: {"Notes": {"is_null": false}} Contains: {"Name": {"contains": "oxide"}}

Multiple conditions are ANDed together; multiple operators inside one object are ANDed too. An unknown column name or operator is an error, not an empty result.

MATCHING IS NORMALISED, NOT STRICT: exact string matches ignore case and surrounding whitespace ("closed" matches "Closed "), because Excel cells carry stray whitespace constantly. Pass exact_case=true for byte-for-byte matching. Contains (~) is case-insensitive. If zero rows match, the response includes zero_match_diagnostics showing what each condition matched on its own and the values actually present in the column — use it to correct a near-miss and retry instead of concluding the data does not exist. At most 1000 rows are returned; check the truncated and total_matched fields in the response.

Inputs: sheet (required), file_name (required), conditions (required), limit, +3 more. Returns: object

get_cellA

Reads EXACTLY ONE cell, LIVE, by address. One Graph request, tiny payload, no ambiguity. Use when the location is already known — follow-up questions, scheduled routines, anything where lookup or filter_sheet already established the address earlier. address is A1 notation ("B7") or the name of a workbook-scoped named range that resolves to one cell. Serial dates arrive converted to ISO-8601; check resolved_type. A multi-cell address is an error — use filter_sheet for ranges.

Inputs: sheet (required), address (required), file_name (required), folder_path. Returns: object

get_workspace_graphA

Returns the cached file structure — all filenames, sheet names, column headers, and cross-sheet relationships (inferred at scan time from matching column names plus overlapping sampled values, merged with any the user declared in ~/.excelmcp/relationships.yaml; each carries a confidence score and its evidence). INSTANT — makes no API call. Reads from local graph.json. ALWAYS call this first at session start to orient yourself. Shows you exactly which files exist, what sheets they have, and what columns are in each sheet. The structure varies for every company — never assume, always discover. Also returns sheet_name_variants: groups of sheet names that differ only in case or whitespace across files — check it before any cross-file operation, because those match by exact sheet name. Each sheet carries a regions list: the table bodies found in it, derived from the sheet's own SUM/COUNT formulas, in absolute sheet rows. A sheet with more than one region holds several separate tables (also listed in multi_region_sheets), so a plain aggregate over it adds up blocks that were never meant to be summed — read its unclaimed_rows and check which region you mean before totalling anything. layout_confidence is "unconfirmed" wherever the region map came from formulas alone and nothing has verified it. Use this before any filter_sheet call when unsure which file or column to query.

Inputs: folder_path. Returns: object

inspect_fileA

Returns structural metadata for one specific file — sheet names, column headers, and each sheet's approx_row_count AS OF THE LAST SCAN (this tool makes no API call, so the count is not live; treat it as an order-of-magnitude hint, not a current figure). INSTANT — reads from cached graph.json. Use before filter_sheet when you need to confirm the exact column names available in a specific file.

Inputs: file_name (required), folder_path. Returns: object

join_sheetsA

Joins two sheets LIVE on key columns and returns the merged rows, with filter_sheet's truncation contract (total_matched, truncated, limit). Omit left_on/right_on to let the server pick keys from the workspace's known relationships — it uses a declared or high-confidence inferred relationship and REFUSES with the candidate list when confidence is low, rather than guessing. The keys actually used and their source are in data.keys. Key matching is normalised (case, whitespace, 45 vs 45.0); null keys never join. join_type: inner, left, right, outer. Colliding column names get _left/_right suffixes. Use this instead of stitching filter_sheet results together yourself.

Inputs: left_file (required), left_sheet (required), right_file (required), right_sheet (required), +5 more. Returns: object

lookupA

ONE-CALL semantic lookup: finds a single cell value anywhere in the workspace and returns it WITH PROVENANCE (file, sheet, cell address, the matched row) and a confidence signal. Reads only the key column and the matched row — never whole sheets.

Two ways to call it:

  1. Natural language: lookup(query="contracted rate for Titanium Dioxide under the BESTEX contract"). The server resolves the key value against values sampled at scan time and picks the return column lexically. Works best when the query contains a literal value that appears in the data (a client, a material).

  2. Explicit: lookup(key_column="Material", key_value= "Titanium Dioxide", return_column="Contracted Rate"). Use this when the query form reports it could not parse, or for values too rare to be sampled. scope={"file": ..., "sheet": ...} narrows the search.

READ confidence BEFORE using the value: "high" — single row matched; corroborating sheets (if any) agree. provenance.corroborated_by lists them. "ambiguous" — the key matched SEVERAL ROWS. value is null; every row is in alternatives. Never pick one silently. "conflict" — several sheets DISAGREE. value is null; every version is in alternatives. Surface the conflict to the user. found=false — key not found; suggestions holds fuzzy near-misses (retry with exact spelling), or ambiguity explains why routing failed. NEVER present a value from this tool without citing provenance.file, provenance.sheet and provenance.cell.

Inputs: query, scope, key_value, key_column, +2 more. Returns: object

queryA

Natural language question with automatic RAG routing. Embeds your question, retrieves candidate sheets by vector similarity, reranks them by lexical overlap with column names and sampled values, fetches the winners LIVE from OneDrive, and returns results. Use for exploratory questions when you do not know which specific file or sheet contains the answer. n_results controls how many sheets are fetched (default 5); min_score drops weak matches. CHECK data.routing: when routing_ambiguous is true the top candidates scored within a tie margin and the choice between them is effectively arbitrary — confirm with inspect_file or ask the user instead of trusting one. Including a distinctive literal value in the question (a client name, a material) strongly improves routing. Response metadata.fetched_at confirms this is live data. For known file/sheet combinations use filter_sheet instead.

Inputs: question (required), min_score, n_results, folder_path. Returns: object

scan_workspaceA

Rescans the OneDrive folder and rebuilds the structure index and embeddings. SLOW — makes many API calls. ONLY call when: new .xlsx files have been added to OneDrive, or existing sheet names or column headers have changed. DO NOT call this at session start. DO NOT call this before every query. The workspace is already indexed from setup. Use get_workspace_graph for instant structure access.

Inputs: folder_path. Returns: object

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.7/5.0

    Scored across 11 tools

    Disambiguation5/5

    Each tool targets a distinct operation: structure discovery, metadata inspection, rescanning, natural-language query, filtered row fetch, grouped aggregation, cross-file totals, joins, signed net calculations, single-cell address reads, and semantic cell lookup. The descriptions include explicit guidance on when to use each tool and warn against alternatives (e.g., aggregate vs. cross_file_aggregate). There is no meaningful overlap or ambiguity between tool purposes.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern in snake_case: get_workspace_graph, inspect_file, scan_workspace, filter_sheet, join_sheets, get_cell, etc. Short verb-only names like query, aggregate, derive, and lookup are also consistent in style and fit the pattern of using a single verb when the object is implied. No camelCase or mixing of conventions.

    Tool Count5/5

    With 11 tools, the server is well-scoped for an Excel workspace analysis tool. Each tool serves a clear and necessary purpose, covering discovery, querying, aggregation, joining, and cell-level access. The count is comfortably within the 3-15 range and does not feel bloated or sparse.

    Completeness5/5

    The tool surface covers the full read/analysis lifecycle: workspace structure discovery (get_workspace_graph, inspect_file, scan_workspace), flexible data retrieval (query, filter_sheet, get_cell, lookup), grouped aggregation (aggregate), multi-file totals (cross_file_aggregate), complex net computations (derive), and joins (join_sheets). There are no obvious missing operations for the apparent purpose of reading and analyzing Excel data.

    Related MCP Connectors

    Related MCP Servers