The stability-guaranteed subset of the xlsx-for-ai HTTP API. Each path is a stateless base64-in / base64-out tool. Request schemas and examples are generated from the live server routes; a breaking change to any schema below requires an anchored SPM sign-off (see the change-review gate, scripts/public-contract-gate.mts). Auth: Authorization: Bearer <xfa_… key from POST /api/v1/clients>. Free tier: a monthly allowance of files you can process, no card required.
Every call is authenticated with a bearer API key. Call POST /api/v1/clients with no credentials to get a client_id / api_key pair at once, then send that key back as an Authorization: Bearer <api_key> header on every tool call. If that call answers 401 (registration needs sign-in here), follow the device-flow steps at https://api.xlsx-for-ai.dev/api/v1/reference#sign-in instead.
curl -sX POST https://api.xlsx-for-ai.dev/api/v1/clients \
-H 'content-type: application/json' \
-d '{"client_version":"1.0.0","platform":"cli"}'The response is a JSON object shaped { "client_id": "...", "api_key": "xfa_..." }. Store the api_key — it is not shown again.
Then call a tool with that key. This example reads a tiny two-column CSV (sent base64-encoded in file_b64) and returns its rows as JSON; replace <api_key> with the key you just got:
curl -sX POST https://api.xlsx-for-ai.dev/api/v1/tools/xlsx_read \
-H 'content-type: application/json' \
-H 'Authorization: Bearer <api_key>' \
-d '{"file_b64":"YSxiCjEsMgo=","options":{"format":"json"}}'Free tier: a monthly allowance of files you can process, no card required.
Registration may require sign-in. The device flow needs only curl here and a
browser on any device. Step 1 registers a device client, step 2 starts the flow and returns a
verification_uri_complete to open on any device and sign in with, step 3 swaps
the device_code for an access token (repeat it every few seconds until it stops
answering authorization_pending), and step 4 trades the access token for your API key.
A Google account is needed to sign in. If you do not have one, you can make one with any email address at accounts.google.com.
curl -sX POST https://api.xlsx-for-ai.dev/oauth/reg \
-H 'content-type: application/json' \
-d '{"application_type":"native","token_endpoint_auth_method":"none","grant_types":["urn:ietf:params:oauth:grant-type:device_code"],"response_types":[]}'curl -sX POST https://api.xlsx-for-ai.dev/oauth/device/auth \
-d 'client_id=<oauth_client_id>&scope=mcp:tools&resource=https://api.xlsx-for-ai.dev/mcp'curl -sX POST https://api.xlsx-for-ai.dev/oauth/token \
-d 'grant_type=urn:ietf:params:oauth:grant-type:device_code&device_code=<device_code>&client_id=<oauth_client_id>'curl -sX POST https://api.xlsx-for-ai.dev/api/v1/clients \
-H 'content-type: application/json' \
-H 'Authorization: Bearer <access_token>' \
-d '{"client_version":"1.0.0","platform":"cli"}'The last response carries your api_key; use it as in the tool call above.
If a key you got through sign-in leaks, sign in again (the steps above) and call
POST /api/v1/clients/key/replace with the fresh access token as
Authorization: Bearer <access_token>. It issues a brand-new
api_key and immediately revokes every key previously issued to that
sign-in, so the leaked one stops working at once. The response is shaped
{ "client_id": "...", "api_key": "xfa_..." } — shown once, exactly
like the step above.
CLI sign-in only: this door and the key step above take an access token from the
xlsx-for-ai CLI sign-in (the device flow) and nothing else. A token a connector got
for Claude, ChatGPT or another app is refused with 403 insufficient_scope
and no key is made or revoked.
The public OAuth discovery documents — /.well-known/oauth-protected-resource
(and its /mcp form), the authorization-server and OpenID metadata, and the JWKS
— answer every origin with Access-Control-Allow-Origin: *. They carry no
user data and need no auth, so any browser MCP client can read them before it signs in.
Everything else — /mcp, /oauth/* and the tool API — answers
the CORS preflight only for a fixed allowlist of origins: https://claude.ai, https://claude.com, https://copilot.microsoft.com, https://outlook.office.com, https://outlook.office365.com, https://xlsx-for-ai.dev, https://www.xlsx-for-ai.dev, https://grok.com, https://x.com, https://gemini.google.com, https://chatgpt.com, https://www.perplexity.ai, https://perplexity.ai, and
any host ending in .claude.ai, .claude.com, .anthropic.com, .cloud.microsoft, .bing.com, .office.com, .office365.com, .teams.microsoft.com. A page served from one of those origins can call
api.xlsx-for-ai.dev directly with fetch or
XMLHttpRequest and will get back the usual CORS response headers —
Access-Control-Allow-Origin echoing its own origin,
Access-Control-Allow-Methods, and
Access-Control-Expose-Headers: Retry-After, WWW-Authenticate, Mcp-Session-Id,
so script can read a 429 response's retry hint, the 401 challenge
that points to the protected-resource metadata, and the MCP session id.
Auth here is always a bearer Authorization header, never a cookie, so
credentials are not used: no Access-Control-Allow-Credentials header is sent
— do not send credentials: 'include'.
A page on any other origin gets no CORS headers on those paths: the preflight for a non-simple call
is answered with no Access-Control-Allow-Origin (and a plain JSON body naming
origin_not_allowed, readable in your network panel or via curl
even though the page's own script can never read it — that is what CORS blocked the
request for), so the browser blocks the real call before it reaches this API. A simple
(non-preflighted) request still completes, but the response is opaque to the page's script
for the same reason. If your app runs on an origin that is not on this list, call this API
from your own backend instead of the browser.
csv_checkxlsx_aggregatexlsx_chartsxlsx_checkxlsx_commentsxlsx_conditional_formatsxlsx_convertxlsx_data_cleanxlsx_data_validationsxlsx_describexlsx_diffxlsx_doctorxlsx_evalxlsx_external_linksxlsx_filterxlsx_form_controlsxlsx_formulasxlsx_healer_curexlsx_healer_diagnosexlsx_healer_intentxlsx_healer_simulatexlsx_hyperlinksxlsx_imagesxlsx_list_sheetsxlsx_macrosxlsx_merged_cellsxlsx_named_rangesxlsx_pii_cleanxlsx_pii_job_statusxlsx_pii_scanxlsx_pivotxlsx_pivot_tablesxlsx_post_slackxlsx_post_teamsxlsx_print_settingsxlsx_propertiesxlsx_protectionxlsx_readxlsx_read_handlexlsx_receiptxlsx_redactxlsx_schemaxlsx_session_set_validationsxlsx_slicers_timelinesxlsx_sortxlsx_stampxlsx_stylesxlsx_tablesxlsx_topologyxlsx_upload_linkxlsx_validatexlsx_value_countsxlsx_vault_curexlsx_vault_scanxlsx_verify_receiptxlsx_verify_stampxlsx_workbook_viewsxlsx_writecsv_checkPOST /api/v1/tools/csv_check — Use this when you need to verify CSV structure and injection safety before it is imported anywhere else.
Auth: Authorization: Bearer <api_key> (required)
file object optional The spreadsheet file, handed off by a host that fills in the OpenAI file-parameter convention (openai/fileParams) from an uploaded or attached file. The server downloads download_url once, server-side; never a local sandbox path.
download_url string required Temporary https URL to download the file. Valid only for this call.
file_id string required Host file identifier.
file_name string optional Original file name (advisory only; never used as a path).
mime_type string optional Declared MIME type (advisory only).
file_b64 string required{
"properties": {
"file": {
"additionalProperties": false,
"description": "The spreadsheet file, handed off by a host that fills in the OpenAI file-parameter convention (openai/fileParams) from an uploaded or attached file. The server downloads download_url once, server-side; never a local sandbox path.",
"properties": {
"download_url": {
"description": "Temporary https URL to download the file. Valid only for this call.",
"maxLength": 8192,
"minLength": 1,
"type": "string"
},
"file_id": {
"description": "Host file identifier.",
"maxLength": 256,
"type": "string"
},
"file_name": {
"description": "Original file name (advisory only; never used as a path).",
"maxLength": 256,
"type": "string"
},
"mime_type": {
"description": "Declared MIME type (advisory only).",
"maxLength": 256,
"type": "string"
}
},
"required": [
"download_url",
"file_id"
],
"type": "object"
},
"file_b64": {
"type": "string"
}
},
"required": [
"file_b64"
],
"type": "object"
}REST (curl):
curl -sX POST https://api.xlsx-for-ai.dev/api/v1/tools/csv_check \
-H 'content-type: application/json' \
-H 'Authorization: Bearer <api_key>' \
-d '{"file_b64":"<BASE64_ENCODED_FILE_BYTES>"}'MCP (tools/call):
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "csv_check",
"arguments": {
"file_url": "https://example.com/placeholder.xlsx"
}
}
}200 — Tool result (base64-in / base64-out; stateless).400 — Bad request. `error.code` is one of: `bad_request` (malformed or oversized JSON body, invalid base64, or a missing/invalid field), `hardening_rejected` (the upload failed an ingest safety guard — e.g. an encrypted workbook, a non-OOXML zip, a truncated file, or a legacy .xls on a route that does not accept it), `unparseable_input` (no readable CSV header row), `malformed_csv` (a structurally broken CSV — an unclosed or mid-field quote), or `unsupported_output_format` (`xlsx_convert` was asked to write old binary .xls — Excel 97-2003 is read-only here; request `xlsx` or `csv`). A sheet- or column-not-found request also carries `available_sheets` / `available_columns`. A `file_url` that could not be fetched keeps `error.code` `bad_request` and adds `error.reason`, one of: `google_not_shared` (a Google link not shared publicly), `url_download_failed_4xx` (the host answered a 4xx: 404 is a dead link, 401/403 a private one), `url_download_failed_5xx`, `url_download_failed_network` (no answer, e.g. DNS), `url_download_timeout`, `url_returned_html` (a web page, not a spreadsheet), `url_empty`, `url_refused`, `url_redirect_blocked` or `file_input_url_not_https`.401 — Missing or invalid API key. `error.code`: `unauthorized`.402 — Payment required. `error.code`: `tier_upgrade_required`. A forward-compatible response for a capability gated to a paid subscription; it is driven by the account/consent surface (POST /api/v1/consent), not by the stateless tool inputs. No action is needed for standard tool calls on the free tier.413 — Payload too large. `error.code`: `file_too_large` (the input exceeds the per-format upload ceiling, or expands past the content-processing ceiling once parsed) or `write_output_too_large` (the requested output would exceed the format write cap). These are capacity ceilings — identical for every caller, never a paywall lever.429 — Free-tier file allowance reached for the current period. `error.code`: `rate_limit_exceeded`.500 — Internal server error — an unexpected fault on our side. `error.code`: `internal_error`.503 — Service temporarily unavailable — retryable; a `Retry-After` header is sent when known. `error.code` is one of: `service_unavailable` (a backing service is down, or parse capacity is momentarily saturated), `rate_limit_backend_unavailable`, or `cache_backend_unavailable`.xlsx_aggregatePOST /api/v1/tools/xlsx_aggregate — Use this when you need to group and aggregate (sum/mean/min/max/count/count_distinct) values on a spreadsheet — reshape rows into per-group summaries.
Auth: Authorization: Bearer <api_key> (required)
aggs array required as string optionalcolumn string requiredfunc string required file object optional The spreadsheet file, handed off by a host that fills in the OpenAI file-parameter convention (openai/fileParams) from an uploaded or attached file. The server downloads download_url once, server-side; never a local sandbox path.
download_url string required Temporary https URL to download the file. Valid only for this call.
file_id string required Host file identifier.
file_name string optional Original file name (advisory only; never used as a path).
mime_type string optional Declared MIME type (advisory only).
file_b64 string requiredgroup_by array required options object optionalheader_row integer optional limit integer optional sheet string optionalsort string optional {
"properties": {
"aggs": {
"items": {
"properties": {
"as": {
"type": "string"
},
"column": {
"type": "string"
},
"func": {
"enum": [
"sum",
"mean",
"min",
"max",
"count",
"count_distinct"
],
"type": "string"
}
},
"required": [
"column",
"func"
],
"type": "object"
},
"maxItems": 16,
"minItems": 1,
"type": "array"
},
"file": {
"additionalProperties": false,
"description": "The spreadsheet file, handed off by a host that fills in the OpenAI file-parameter convention (openai/fileParams) from an uploaded or attached file. The server downloads download_url once, server-side; never a local sandbox path.",
"properties": {
"download_url": {
"description": "Temporary https URL to download the file. Valid only for this call.",
"maxLength": 8192,
"minLength": 1,
"type": "string"
},
"file_id": {
"description": "Host file identifier.",
"maxLength": 256,
"type": "string"
},
"file_name": {
"description": "Original file name (advisory only; never used as a path).",
"maxLength": 256,
"type": "string"
},
"mime_type": {
"description": "Declared MIME type (advisory only).",
"maxLength": 256,
"type": "string"
}
},
"required": [
"download_url",
"file_id"
],
"type": "object"
},
"file_b64": {
"type": "string"
},
"group_by": {
"items": {
"oneOf": [
{
"type": "string"
},
{
"additionalProperties": false,
"properties": {
"column": {
"type": "string"
},
"date_part": {
"enum": [
"year",
"quarter",
"month",
"week"
],
"type": "string"
}
},
"required": [
"column",
"date_part"
],
"type": "object"
}
]
},
"maxItems": 6,
"minItems": 1,
"type": "array"
},
"options": {
"properties": {
"header_row": {
"minimum": 0,
"type": "integer"
},
"limit": {
"maximum": 1000,
"minimum": 1,
"type": "integer"
},
"sheet": {
"type": "string"
},
"sort": {
"enum": [
"asc",
"desc",
"none"
],
"type": "string"
}
},
"type": "object"
}
},
"required": [
"aggs",
"file_b64",
"group_by"
],
"type": "object"
}REST (curl):
curl -sX POST https://api.xlsx-for-ai.dev/api/v1/tools/xlsx_aggregate \
-H 'content-type: application/json' \
-H 'Authorization: Bearer <api_key>' \
-d '{"aggs":[{"column":"example-value","func":"sum"}],"file_b64":"<BASE64_ENCODED_FILE_BYTES>","group_by":["example-value"]}'MCP (tools/call):
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "xlsx_aggregate",
"arguments": {
"aggs": [
{
"column": "example-value",
"func": "sum"
}
],
"group_by": [
"example-value"
],
"file_url": "https://example.com/placeholder.xlsx"
}
}
}200 — Tool result (base64-in / base64-out; stateless).400 — Bad request. `error.code` is one of: `bad_request` (malformed or oversized JSON body, invalid base64, or a missing/invalid field), `hardening_rejected` (the upload failed an ingest safety guard — e.g. an encrypted workbook, a non-OOXML zip, a truncated file, or a legacy .xls on a route that does not accept it), `unparseable_input` (no readable CSV header row), `malformed_csv` (a structurally broken CSV — an unclosed or mid-field quote), or `unsupported_output_format` (`xlsx_convert` was asked to write old binary .xls — Excel 97-2003 is read-only here; request `xlsx` or `csv`). A sheet- or column-not-found request also carries `available_sheets` / `available_columns`. A `file_url` that could not be fetched keeps `error.code` `bad_request` and adds `error.reason`, one of: `google_not_shared` (a Google link not shared publicly), `url_download_failed_4xx` (the host answered a 4xx: 404 is a dead link, 401/403 a private one), `url_download_failed_5xx`, `url_download_failed_network` (no answer, e.g. DNS), `url_download_timeout`, `url_returned_html` (a web page, not a spreadsheet), `url_empty`, `url_refused`, `url_redirect_blocked` or `file_input_url_not_https`.401 — Missing or invalid API key. `error.code`: `unauthorized`.402 — Payment required. `error.code`: `tier_upgrade_required`. A forward-compatible response for a capability gated to a paid subscription; it is driven by the account/consent surface (POST /api/v1/consent), not by the stateless tool inputs. No action is needed for standard tool calls on the free tier.413 — Payload too large. `error.code`: `file_too_large` (the input exceeds the per-format upload ceiling, or expands past the content-processing ceiling once parsed) or `write_output_too_large` (the requested output would exceed the format write cap). These are capacity ceilings — identical for every caller, never a paywall lever.429 — Free-tier file allowance reached for the current period. `error.code`: `rate_limit_exceeded`.500 — Internal server error — an unexpected fault on our side. `error.code`: `internal_error`.503 — Service temporarily unavailable — retryable; a `Retry-After` header is sent when known. `error.code` is one of: `service_unavailable` (a backing service is down, or parse capacity is momentarily saturated), `rate_limit_backend_unavailable`, or `cache_backend_unavailable`.xlsx_chartsPOST /api/v1/tools/xlsx_charts — Use this when you need to list every chart in a workbook — type, title, axis titles, and the cell ranges each series pulls from.
Auth: Authorization: Bearer <api_key> (required)
file object optional The spreadsheet file, handed off by a host that fills in the OpenAI file-parameter convention (openai/fileParams) from an uploaded or attached file. The server downloads download_url once, server-side; never a local sandbox path.
download_url string required Temporary https URL to download the file. Valid only for this call.
file_id string required Host file identifier.
file_name string optional Original file name (advisory only; never used as a path).
mime_type string optional Declared MIME type (advisory only).
file_b64 string requiredoptions object optionallimit integer optional sheet string optional{
"properties": {
"file": {
"additionalProperties": false,
"description": "The spreadsheet file, handed off by a host that fills in the OpenAI file-parameter convention (openai/fileParams) from an uploaded or attached file. The server downloads download_url once, server-side; never a local sandbox path.",
"properties": {
"download_url": {
"description": "Temporary https URL to download the file. Valid only for this call.",
"maxLength": 8192,
"minLength": 1,
"type": "string"
},
"file_id": {
"description": "Host file identifier.",
"maxLength": 256,
"type": "string"
},
"file_name": {
"description": "Original file name (advisory only; never used as a path).",
"maxLength": 256,
"type": "string"
},
"mime_type": {
"description": "Declared MIME type (advisory only).",
"maxLength": 256,
"type": "string"
}
},
"required": [
"download_url",
"file_id"
],
"type": "object"
},
"file_b64": {
"type": "string"
},
"options": {
"properties": {
"limit": {
"maximum": 500,
"minimum": 1,
"type": "integer"
},
"sheet": {
"type": "string"
}
},
"type": "object"
}
},
"required": [
"file_b64"
],
"type": "object"
}REST (curl):
curl -sX POST https://api.xlsx-for-ai.dev/api/v1/tools/xlsx_charts \
-H 'content-type: application/json' \
-H 'Authorization: Bearer <api_key>' \
-d '{"file_b64":"<BASE64_ENCODED_FILE_BYTES>"}'MCP (tools/call):
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "xlsx_charts",
"arguments": {
"file_url": "https://example.com/placeholder.xlsx"
}
}
}200 — Tool result (base64-in / base64-out; stateless).400 — Bad request. `error.code` is one of: `bad_request` (malformed or oversized JSON body, invalid base64, or a missing/invalid field), `hardening_rejected` (the upload failed an ingest safety guard — e.g. an encrypted workbook, a non-OOXML zip, a truncated file, or a legacy .xls on a route that does not accept it), `unparseable_input` (no readable CSV header row), `malformed_csv` (a structurally broken CSV — an unclosed or mid-field quote), or `unsupported_output_format` (`xlsx_convert` was asked to write old binary .xls — Excel 97-2003 is read-only here; request `xlsx` or `csv`). A sheet- or column-not-found request also carries `available_sheets` / `available_columns`. A `file_url` that could not be fetched keeps `error.code` `bad_request` and adds `error.reason`, one of: `google_not_shared` (a Google link not shared publicly), `url_download_failed_4xx` (the host answered a 4xx: 404 is a dead link, 401/403 a private one), `url_download_failed_5xx`, `url_download_failed_network` (no answer, e.g. DNS), `url_download_timeout`, `url_returned_html` (a web page, not a spreadsheet), `url_empty`, `url_refused`, `url_redirect_blocked` or `file_input_url_not_https`.401 — Missing or invalid API key. `error.code`: `unauthorized`.402 — Payment required. `error.code`: `tier_upgrade_required`. A forward-compatible response for a capability gated to a paid subscription; it is driven by the account/consent surface (POST /api/v1/consent), not by the stateless tool inputs. No action is needed for standard tool calls on the free tier.413 — Payload too large. `error.code`: `file_too_large` (the input exceeds the per-format upload ceiling, or expands past the content-processing ceiling once parsed) or `write_output_too_large` (the requested output would exceed the format write cap). These are capacity ceilings — identical for every caller, never a paywall lever.429 — Free-tier file allowance reached for the current period. `error.code`: `rate_limit_exceeded`.500 — Internal server error — an unexpected fault on our side. `error.code`: `internal_error`.503 — Service temporarily unavailable — retryable; a `Retry-After` header is sent when known. `error.code` is one of: `service_unavailable` (a backing service is down, or parse capacity is momentarily saturated), `rate_limit_backend_unavailable`, or `cache_backend_unavailable`.xlsx_checkPOST /api/v1/tools/xlsx_check — Use this when you need to know if the numbers are right: workbook structural validity, error cells, stale cached values (formulas recomputed by the server's own engine and compared with the stored values; cells the engine does not model are skipped), ranges that stop short of contiguous data, and hygiene findings.
Auth: Authorization: Bearer <api_key> (required)
file object optional The spreadsheet file, handed off by a host that fills in the OpenAI file-parameter convention (openai/fileParams) from an uploaded or attached file. The server downloads download_url once, server-side; never a local sandbox path.
download_url string required Temporary https URL to download the file. Valid only for this call.
file_id string required Host file identifier.
file_name string optional Original file name (advisory only; never used as a path).
mime_type string optional Declared MIME type (advisory only).
file_b64 string required{
"properties": {
"file": {
"additionalProperties": false,
"description": "The spreadsheet file, handed off by a host that fills in the OpenAI file-parameter convention (openai/fileParams) from an uploaded or attached file. The server downloads download_url once, server-side; never a local sandbox path.",
"properties": {
"download_url": {
"description": "Temporary https URL to download the file. Valid only for this call.",
"maxLength": 8192,
"minLength": 1,
"type": "string"
},
"file_id": {
"description": "Host file identifier.",
"maxLength": 256,
"type": "string"
},
"file_name": {
"description": "Original file name (advisory only; never used as a path).",
"maxLength": 256,
"type": "string"
},
"mime_type": {
"description": "Declared MIME type (advisory only).",
"maxLength": 256,
"type": "string"
}
},
"required": [
"download_url",
"file_id"
],
"type": "object"
},
"file_b64": {
"type": "string"
}
},
"required": [
"file_b64"
],
"type": "object"
}REST (curl):
curl -sX POST https://api.xlsx-for-ai.dev/api/v1/tools/xlsx_check \
-H 'content-type: application/json' \
-H 'Authorization: Bearer <api_key>' \
-d '{"file_b64":"<BASE64_ENCODED_FILE_BYTES>"}'MCP (tools/call):
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "xlsx_check",
"arguments": {
"file_url": "https://example.com/placeholder.xlsx"
}
}
}200 — Tool result (base64-in / base64-out; stateless).400 — Bad request. `error.code` is one of: `bad_request` (malformed or oversized JSON body, invalid base64, or a missing/invalid field), `hardening_rejected` (the upload failed an ingest safety guard — e.g. an encrypted workbook, a non-OOXML zip, a truncated file, or a legacy .xls on a route that does not accept it), `unparseable_input` (no readable CSV header row), `malformed_csv` (a structurally broken CSV — an unclosed or mid-field quote), or `unsupported_output_format` (`xlsx_convert` was asked to write old binary .xls — Excel 97-2003 is read-only here; request `xlsx` or `csv`). A sheet- or column-not-found request also carries `available_sheets` / `available_columns`. A `file_url` that could not be fetched keeps `error.code` `bad_request` and adds `error.reason`, one of: `google_not_shared` (a Google link not shared publicly), `url_download_failed_4xx` (the host answered a 4xx: 404 is a dead link, 401/403 a private one), `url_download_failed_5xx`, `url_download_failed_network` (no answer, e.g. DNS), `url_download_timeout`, `url_returned_html` (a web page, not a spreadsheet), `url_empty`, `url_refused`, `url_redirect_blocked` or `file_input_url_not_https`.401 — Missing or invalid API key. `error.code`: `unauthorized`.402 — Payment required. `error.code`: `tier_upgrade_required`. A forward-compatible response for a capability gated to a paid subscription; it is driven by the account/consent surface (POST /api/v1/consent), not by the stateless tool inputs. No action is needed for standard tool calls on the free tier.413 — Payload too large. `error.code`: `file_too_large` (the input exceeds the per-format upload ceiling, or expands past the content-processing ceiling once parsed) or `write_output_too_large` (the requested output would exceed the format write cap). These are capacity ceilings — identical for every caller, never a paywall lever.429 — Free-tier file allowance reached for the current period. `error.code`: `rate_limit_exceeded`.500 — Internal server error — an unexpected fault on our side. `error.code`: `internal_error`.503 — Service temporarily unavailable — retryable; a `Retry-After` header is sent when known. `error.code` is one of: `service_unavailable` (a backing service is down, or parse capacity is momentarily saturated), `rate_limit_backend_unavailable`, or `cache_backend_unavailable`.xlsx_commentsPOST /api/v1/tools/xlsx_comments — Use this when you need to list every cell comment — legacy notes and modern threaded comments — with author, text, and reply thread.
Auth: Authorization: Bearer <api_key> (required)
file object optional The spreadsheet file, handed off by a host that fills in the OpenAI file-parameter convention (openai/fileParams) from an uploaded or attached file. The server downloads download_url once, server-side; never a local sandbox path.
download_url string required Temporary https URL to download the file. Valid only for this call.
file_id string required Host file identifier.
file_name string optional Original file name (advisory only; never used as a path).
mime_type string optional Declared MIME type (advisory only).
file_b64 string optionalSend exactly one file source: file_b64 (this field), file_url, file_handle, or file_text together with file_name.
file_handle string optional Handle returned by xlsx_upload_link, once the user has uploaded the spreadsheet file on that page. Use this when the user attached the file in chat or has no link. Provide this OR file_url.
file_name string optional File name with its extension (.csv, .tsv or .json), used with file_text.
file_sha256 string optional Hex SHA-256 of the exact file_text UTF-8 text. Optional; checked when given.
file_text string optional Use only for a small CSV, TSV or JSON file whose full text you already have. Practical limit about 2,000 cells or 40 KB (the server hard cap is 256 KB); above that use file_url, or xlsx_upload_link and file_handle. Requires file_name. Never encode or retype a binary file by hand. Provide this OR file_url OR file_handle.
file_url string optional https URL of the spreadsheet file (e.g. a shared Google Drive, Google Sheets, Dropbox, OneDrive or S3 link; must be viewable by anyone with the link). The server downloads it directly. Provide this OR file_handle.
options object optionallimit integer optional sheet string optional{
"properties": {
"file": {
"additionalProperties": false,
"description": "The spreadsheet file, handed off by a host that fills in the OpenAI file-parameter convention (openai/fileParams) from an uploaded or attached file. The server downloads download_url once, server-side; never a local sandbox path.",
"properties": {
"download_url": {
"description": "Temporary https URL to download the file. Valid only for this call.",
"maxLength": 8192,
"minLength": 1,
"type": "string"
},
"file_id": {
"description": "Host file identifier.",
"maxLength": 256,
"type": "string"
},
"file_name": {
"description": "Original file name (advisory only; never used as a path).",
"maxLength": 256,
"type": "string"
},
"mime_type": {
"description": "Declared MIME type (advisory only).",
"maxLength": 256,
"type": "string"
}
},
"required": [
"download_url",
"file_id"
],
"type": "object"
},
"file_b64": {
"description": "Send exactly one file source: file_b64 (this field), file_url, file_handle, or file_text together with file_name.",
"type": "string"
},
"file_handle": {
"description": "Handle returned by xlsx_upload_link, once the user has uploaded the spreadsheet file on that page. Use this when the user attached the file in chat or has no link. Provide this OR file_url.",
"maxLength": 128,
"minLength": 1,
"type": "string"
},
"file_name": {
"description": "File name with its extension (.csv, .tsv or .json), used with file_text.",
"maxLength": 200,
"minLength": 1,
"type": "string"
},
"file_sha256": {
"description": "Hex SHA-256 of the exact file_text UTF-8 text. Optional; checked when given.",
"maxLength": 64,
"minLength": 64,
"type": "string"
},
"file_text": {
"description": "Use only for a small CSV, TSV or JSON file whose full text you already have. Practical limit about 2,000 cells or 40 KB (the server hard cap is 256 KB); above that use file_url, or xlsx_upload_link and file_handle. Requires file_name. Never encode or retype a binary file by hand. Provide this OR file_url OR file_handle.",
"maxLength": 262144,
"minLength": 1,
"type": "string"
},
"file_url": {
"description": "https URL of the spreadsheet file (e.g. a shared Google Drive, Google Sheets, Dropbox, OneDrive or S3 link; must be viewable by anyone with the link). The server downloads it directly. Provide this OR file_handle.",
"maxLength": 8192,
"minLength": 1,
"type": "string"
},
"options": {
"properties": {
"limit": {
"maximum": 5000,
"minimum": 1,
"type": "integer"
},
"sheet": {
"type": "string"
}
},
"type": "object"
}
},
"required": [],
"type": "object",
"oneOf": [
{
"required": [
"file_b64"
]
},
{
"required": [
"file_url"
]
},
{
"required": [
"file_handle"
]
},
{
"required": [
"file_text",
"file_name"
]
},
{
"required": [
"file"
]
}
]
}REST (curl):
curl -sX POST https://api.xlsx-for-ai.dev/api/v1/tools/xlsx_comments \
-H 'content-type: application/json' \
-H 'Authorization: Bearer <api_key>' \
-d '{"file_b64":"<BASE64_ENCODED_FILE_BYTES>"}'MCP (tools/call):
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "xlsx_comments",
"arguments": {
"file_url": "https://example.com/placeholder.xlsx"
}
}
}200 — Tool result (base64-in / base64-out; stateless). A `file_text` whose `file_name` ends in .xlsx, .xlsm, .xls, .xlsb, .ods, .xltx, .xltm or .xlam computes nothing: the reply is still 200, with `status` `workbook_text_retired`, `computed` false, `upload_url` (send the file there with one PUT), `upload_page` (the page a person opens to drop the file in), `file_handle` (pass it to the same tool once the file is uploaded) and `expires_at`. A text copy loses defined names, styles, merged cells, validations and macros, so a workbook is never sent as text.400 — Bad request. `error.code` is one of: `bad_request` (malformed or oversized JSON body, invalid base64, or a missing/invalid field), `hardening_rejected` (the upload failed an ingest safety guard — e.g. an encrypted workbook, a non-OOXML zip, a truncated file, or a legacy .xls on a route that does not accept it), `unparseable_input` (no readable CSV header row), `malformed_csv` (a structurally broken CSV — an unclosed or mid-field quote), or `unsupported_output_format` (`xlsx_convert` was asked to write old binary .xls — Excel 97-2003 is read-only here; request `xlsx` or `csv`). A sheet- or column-not-found request also carries `available_sheets` / `available_columns`. A `file_url` that could not be fetched keeps `error.code` `bad_request` and adds `error.reason`, one of: `google_not_shared` (a Google link not shared publicly), `url_download_failed_4xx` (the host answered a 4xx: 404 is a dead link, 401/403 a private one), `url_download_failed_5xx`, `url_download_failed_network` (no answer, e.g. DNS), `url_download_timeout`, `url_returned_html` (a web page, not a spreadsheet), `url_empty`, `url_refused`, `url_redirect_blocked` or `file_input_url_not_https`.401 — Missing or invalid API key. `error.code`: `unauthorized`.402 — Payment required. `error.code`: `tier_upgrade_required`. A forward-compatible response for a capability gated to a paid subscription; it is driven by the account/consent surface (POST /api/v1/consent), not by the stateless tool inputs. No action is needed for standard tool calls on the free tier.413 — Payload too large. `error.code`: `file_too_large` (the input exceeds the per-format upload ceiling, or expands past the content-processing ceiling once parsed) or `write_output_too_large` (the requested output would exceed the format write cap). These are capacity ceilings — identical for every caller, never a paywall lever.429 — Free-tier file allowance reached for the current period. `error.code`: `rate_limit_exceeded`.500 — Internal server error — an unexpected fault on our side. `error.code`: `internal_error`.503 — Service temporarily unavailable — retryable; a `Retry-After` header is sent when known. `error.code` is one of: `service_unavailable` (a backing service is down, or parse capacity is momentarily saturated), `rate_limit_backend_unavailable`, or `cache_backend_unavailable`.xlsx_conditional_formatsPOST /api/v1/tools/xlsx_conditional_formats — Use this when you need to list every conditional formatting rule (color scales, data bars, icon sets, formula-based highlights, …) with range, type, and priority.
Auth: Authorization: Bearer <api_key> (required)
file object optional The spreadsheet file, handed off by a host that fills in the OpenAI file-parameter convention (openai/fileParams) from an uploaded or attached file. The server downloads download_url once, server-side; never a local sandbox path.
download_url string required Temporary https URL to download the file. Valid only for this call.
file_id string required Host file identifier.
file_name string optional Original file name (advisory only; never used as a path).
mime_type string optional Declared MIME type (advisory only).
file_b64 string requiredoptions object optionallimit integer optional sheet string optional{
"properties": {
"file": {
"additionalProperties": false,
"description": "The spreadsheet file, handed off by a host that fills in the OpenAI file-parameter convention (openai/fileParams) from an uploaded or attached file. The server downloads download_url once, server-side; never a local sandbox path.",
"properties": {
"download_url": {
"description": "Temporary https URL to download the file. Valid only for this call.",
"maxLength": 8192,
"minLength": 1,
"type": "string"
},
"file_id": {
"description": "Host file identifier.",
"maxLength": 256,
"type": "string"
},
"file_name": {
"description": "Original file name (advisory only; never used as a path).",
"maxLength": 256,
"type": "string"
},
"mime_type": {
"description": "Declared MIME type (advisory only).",
"maxLength": 256,
"type": "string"
}
},
"required": [
"download_url",
"file_id"
],
"type": "object"
},
"file_b64": {
"type": "string"
},
"options": {
"properties": {
"limit": {
"maximum": 5000,
"minimum": 1,
"type": "integer"
},
"sheet": {
"type": "string"
}
},
"type": "object"
}
},
"required": [
"file_b64"
],
"type": "object"
}REST (curl):
curl -sX POST https://api.xlsx-for-ai.dev/api/v1/tools/xlsx_conditional_formats \
-H 'content-type: application/json' \
-H 'Authorization: Bearer <api_key>' \
-d '{"file_b64":"<BASE64_ENCODED_FILE_BYTES>"}'MCP (tools/call):
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "xlsx_conditional_formats",
"arguments": {
"file_url": "https://example.com/placeholder.xlsx"
}
}
}200 — Tool result (base64-in / base64-out; stateless).400 — Bad request. `error.code` is one of: `bad_request` (malformed or oversized JSON body, invalid base64, or a missing/invalid field), `hardening_rejected` (the upload failed an ingest safety guard — e.g. an encrypted workbook, a non-OOXML zip, a truncated file, or a legacy .xls on a route that does not accept it), `unparseable_input` (no readable CSV header row), `malformed_csv` (a structurally broken CSV — an unclosed or mid-field quote), or `unsupported_output_format` (`xlsx_convert` was asked to write old binary .xls — Excel 97-2003 is read-only here; request `xlsx` or `csv`). A sheet- or column-not-found request also carries `available_sheets` / `available_columns`. A `file_url` that could not be fetched keeps `error.code` `bad_request` and adds `error.reason`, one of: `google_not_shared` (a Google link not shared publicly), `url_download_failed_4xx` (the host answered a 4xx: 404 is a dead link, 401/403 a private one), `url_download_failed_5xx`, `url_download_failed_network` (no answer, e.g. DNS), `url_download_timeout`, `url_returned_html` (a web page, not a spreadsheet), `url_empty`, `url_refused`, `url_redirect_blocked` or `file_input_url_not_https`.401 — Missing or invalid API key. `error.code`: `unauthorized`.402 — Payment required. `error.code`: `tier_upgrade_required`. A forward-compatible response for a capability gated to a paid subscription; it is driven by the account/consent surface (POST /api/v1/consent), not by the stateless tool inputs. No action is needed for standard tool calls on the free tier.413 — Payload too large. `error.code`: `file_too_large` (the input exceeds the per-format upload ceiling, or expands past the content-processing ceiling once parsed) or `write_output_too_large` (the requested output would exceed the format write cap). These are capacity ceilings — identical for every caller, never a paywall lever.429 — Free-tier file allowance reached for the current period. `error.code`: `rate_limit_exceeded`.500 — Internal server error — an unexpected fault on our side. `error.code`: `internal_error`.503 — Service temporarily unavailable — retryable; a `Retry-After` header is sent when known. `error.code` is one of: `service_unavailable` (a backing service is down, or parse capacity is momentarily saturated), `rate_limit_backend_unavailable`, or `cache_backend_unavailable`.xlsx_convertPOST /api/v1/tools/xlsx_convert — Use this when you need to convert a spreadsheet between formats — reads xlsx, xls, xlsb, ods/fods, csv/tsv, dbf, sylk, dif and prn (25+ inputs), plus a file exported or downloaded from Google Sheets; emits xlsx, csv, tsv, json, md, or html. Old binary .xls is read-only: it is accepted as input but never written, so to=xls is refused with a typed 400 unsupported_output_format (an isError result on MCP) — ask for xlsx or csv. Often the only way to get a legacy .xls or .dbf into an agent that can't upload one directly. Deterministic and structural, no LLM mapping; exact formula/structure preservation holds on the own-engine path only, so check served_engine in the response (and decline_reason if it reads "incumbent") — a compatibility-engine fallback may not preserve charts, pivots, or other advanced features. For xlsx, xls, csv and json inputs there is no compatibility-engine fallback: if our own writer declines, the call fails with a typed HTTP 501 capability_gap (an isError result on MCP) and retrying the same file does not help. .json is a peer format in both directions: an uploaded .json (JSONL, a bare array of objects, a {"data":[…]} envelope, or a single object) is read into rows and converts to=json, to=csv or to=xlsx, and any supported input converts to=json as one object per row keyed by the header row. A JSON hop carries values only — styles and number formats are dropped, a formula cell emits its computed value rather than the formula text, dates become ISO-8601 strings, and nested fields arrive as flattened dotted column names.
Auth: Authorization: Bearer <api_key> (required)
access_token string optionalfile_b64 string optionalfile_handle string optional Handle returned by xlsx_upload_link, once the user has uploaded the spreadsheet file on that page. Use this when the user attached the file in chat or has no link. Provide this OR file_url.
file_name string optional File name with its extension (.csv, .tsv or .json), used with file_text.
file_sha256 string optional Hex SHA-256 of the exact file_text UTF-8 text. Optional; checked when given.
file_text string optional Use only for a small CSV, TSV or JSON file whose full text you already have. Practical limit about 2,000 cells or 40 KB (the server hard cap is 256 KB); above that use file_url, or xlsx_upload_link and file_handle. Requires file_name. Never encode or retype a binary file by hand. Provide this OR file_url OR file_handle.
file_url string optional https URL of the spreadsheet file (e.g. a shared Google Drive, Google Sheets, Dropbox, OneDrive or S3 link; must be viewable by anyone with the link). The server downloads it directly. Provide this OR file_handle.
options object optionalflatten string optional JSON input only: how to flatten a nested array into columns — "dot" (default) stringifies it into one cell, "index" gives one column per array position, "explode" repeats the record across one output row per element.
sheet string optionalRender only this sheet (text outputs only).
sheets string optional source string optional Build the .xlsx from a live Google Sheet instead of a file. Needs spreadsheet_id, access_token and to:"xlsx".
spreadsheet_id string optionalto string required Target format. Binary formats return bytes in _meta.file_b64; text formats render in body. Old binary .xls (Excel 97-2003) is read-only: it is accepted as input but never written, and to=xls is refused with 400 unsupported_output_format; use xlsx or csv.
{
"properties": {
"access_token": {
"type": "string"
},
"file_b64": {
"type": "string"
},
"file_handle": {
"description": "Handle returned by xlsx_upload_link, once the user has uploaded the spreadsheet file on that page. Use this when the user attached the file in chat or has no link. Provide this OR file_url.",
"maxLength": 128,
"minLength": 1,
"type": "string"
},
"file_name": {
"description": "File name with its extension (.csv, .tsv or .json), used with file_text.",
"maxLength": 200,
"minLength": 1,
"type": "string"
},
"file_sha256": {
"description": "Hex SHA-256 of the exact file_text UTF-8 text. Optional; checked when given.",
"maxLength": 64,
"minLength": 64,
"type": "string"
},
"file_text": {
"description": "Use only for a small CSV, TSV or JSON file whose full text you already have. Practical limit about 2,000 cells or 40 KB (the server hard cap is 256 KB); above that use file_url, or xlsx_upload_link and file_handle. Requires file_name. Never encode or retype a binary file by hand. Provide this OR file_url OR file_handle.",
"maxLength": 262144,
"minLength": 1,
"type": "string"
},
"file_url": {
"description": "https URL of the spreadsheet file (e.g. a shared Google Drive, Google Sheets, Dropbox, OneDrive or S3 link; must be viewable by anyone with the link). The server downloads it directly. Provide this OR file_handle.",
"maxLength": 8192,
"minLength": 1,
"type": "string"
},
"options": {
"properties": {
"flatten": {
"description": "JSON input only: how to flatten a nested array into columns — \"dot\" (default) stringifies it into one cell, \"index\" gives one column per array position, \"explode\" repeats the record across one output row per element.",
"enum": [
"dot",
"index",
"explode"
],
"type": "string"
},
"sheet": {
"description": "Render only this sheet (text outputs only).",
"type": "string"
},
"sheets": {
"enum": [
"all",
"first"
],
"type": "string"
}
},
"type": "object"
},
"source": {
"description": "Build the .xlsx from a live Google Sheet instead of a file. Needs spreadsheet_id, access_token and to:\"xlsx\".",
"enum": [
"gsheets"
],
"type": "string"
},
"spreadsheet_id": {
"type": "string"
},
"to": {
"description": "Target format. Binary formats return bytes in _meta.file_b64; text formats render in body. Old binary .xls (Excel 97-2003) is read-only: it is accepted as input but never written, and to=xls is refused with 400 unsupported_output_format; use xlsx or csv.",
"enum": [
"csv",
"tsv",
"txt",
"html",
"md",
"json",
"dif",
"sylk",
"eth",
"prn",
"rtf",
"xlsx",
"xlsb",
"xlsm",
"ods",
"fods",
"dbf"
],
"type": "string"
}
},
"required": [
"to"
],
"type": "object"
}REST (curl):
curl -sX POST https://api.xlsx-for-ai.dev/api/v1/tools/xlsx_convert \
-H 'content-type: application/json' \
-H 'Authorization: Bearer <api_key>' \
-d '{"to":"csv","file_b64":"<BASE64_ENCODED_FILE_BYTES>"}'MCP (tools/call):
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "xlsx_convert",
"arguments": {
"to": "csv",
"file_url": "https://example.com/placeholder.xlsx"
}
}
}200 — Tool result (base64-in / base64-out; stateless). A `file_text` whose `file_name` ends in .xlsx, .xlsm, .xls, .xlsb, .ods, .xltx, .xltm or .xlam computes nothing: the reply is still 200, with `status` `workbook_text_retired`, `computed` false, `upload_url` (send the file there with one PUT), `upload_page` (the page a person opens to drop the file in), `file_handle` (pass it to the same tool once the file is uploaded) and `expires_at`. A text copy loses defined names, styles, merged cells, validations and macros, so a workbook is never sent as text.400 — Bad request. `error.code` is one of: `bad_request` (malformed or oversized JSON body, invalid base64, or a missing/invalid field), `hardening_rejected` (the upload failed an ingest safety guard — e.g. an encrypted workbook, a non-OOXML zip, a truncated file, or a legacy .xls on a route that does not accept it), `unparseable_input` (no readable CSV header row), `malformed_csv` (a structurally broken CSV — an unclosed or mid-field quote), or `unsupported_output_format` (`xlsx_convert` was asked to write old binary .xls — Excel 97-2003 is read-only here; request `xlsx` or `csv`). A sheet- or column-not-found request also carries `available_sheets` / `available_columns`. A `file_url` that could not be fetched keeps `error.code` `bad_request` and adds `error.reason`, one of: `google_not_shared` (a Google link not shared publicly), `url_download_failed_4xx` (the host answered a 4xx: 404 is a dead link, 401/403 a private one), `url_download_failed_5xx`, `url_download_failed_network` (no answer, e.g. DNS), `url_download_timeout`, `url_returned_html` (a web page, not a spreadsheet), `url_empty`, `url_refused`, `url_redirect_blocked` or `file_input_url_not_https`.401 — Missing or invalid API key. `error.code`: `unauthorized`.402 — Payment required. `error.code`: `tier_upgrade_required`. A forward-compatible response for a capability gated to a paid subscription; it is driven by the account/consent surface (POST /api/v1/consent), not by the stateless tool inputs. No action is needed for standard tool calls on the free tier.413 — Payload too large. `error.code`: `file_too_large` (the input exceeds the per-format upload ceiling, or expands past the content-processing ceiling once parsed) or `write_output_too_large` (the requested output would exceed the format write cap). These are capacity ceilings — identical for every caller, never a paywall lever.429 — Free-tier file allowance reached for the current period. `error.code`: `rate_limit_exceeded`.500 — Internal server error — an unexpected fault on our side. `error.code`: `internal_error`.501 — Not implemented by our own engine. `error.code`: `capability_gap`. For `xlsx_convert` on an xlsx, xls, csv or json input, an own-writer decline (most notably `to=xlsx`) returns this typed refusal instead of falling back to a compatibility library. It is not a client error and not transient: retrying the same file does not help. Exotic formats (ods, xlsb, fods) are unaffected.503 — Service temporarily unavailable — retryable; a `Retry-After` header is sent when known. `error.code` is one of: `service_unavailable` (a backing service is down, or parse capacity is momentarily saturated), `rate_limit_backend_unavailable`, or `cache_backend_unavailable`.xlsx_data_cleanPOST /api/v1/tools/xlsx_data_clean — Use this when you need to scan for the common data-grime issues (NA variants, merged-cell residue, type-coercion mistakes, stray header/footer rows, mojibake, duplicate headers) and either flag or fix them.
Auth: Authorization: Bearer <api_key> (required)
accept_findings array optional detectors array optional file object optional The spreadsheet file, handed off by a host that fills in the OpenAI file-parameter convention (openai/fileParams) from an uploaded or attached file. The server downloads download_url once, server-side; never a local sandbox path.
download_url string required Temporary https URL to download the file. Valid only for this call.
file_id string required Host file identifier.
file_name string optional Original file name (advisory only; never used as a path).
mime_type string optional Declared MIME type (advisory only).
file_b64 string optionalSend exactly one file source: file_b64 (this field), file_url, file_handle, or file_text together with file_name.
file_handle string optional Handle returned by xlsx_upload_link, once the user has uploaded the spreadsheet file on that page. Use this when the user attached the file in chat or has no link. Provide this OR file_url.
file_name string optional File name with its extension (.csv, .tsv or .json), used with file_text.
file_sha256 string optional Hex SHA-256 of the exact file_text UTF-8 text. Optional; checked when given.
file_text string optional Use only for a small CSV, TSV or JSON file whose full text you already have. Practical limit about 2,000 cells or 40 KB (the server hard cap is 256 KB); above that use file_url, or xlsx_upload_link and file_handle. Requires file_name. Never encode or retype a binary file by hand. Provide this OR file_url OR file_handle.
file_url string optional https URL of the spreadsheet file (e.g. a shared Google Drive, Google Sheets, Dropbox, OneDrive or S3 link; must be viewable by anyone with the link). The server downloads it directly. Provide this OR file_handle.
mode string optional options object optional auto_accept_above number optional column_roles object optional Caller-forced column roles, keyed "<sheet>!<COL>" where <COL> is a column LETTER (header names are not accepted here).
date_ratio_threshold number optional dedup_compare_columns array optional duplicate_data_row: restrict the duplicate comparison to these columns. Each entry is a column letter ("A", "B", ..., "XFD") or the exact header text of the sheet's header row ("Vendor"); header names are matched after trimming and resolved once the header row is found. A name that matches no column, or two columns, is a 400 invalid_option_value that lists the headers seen (use a letter to pick one of two same-named columns). Omit to compare every column.
dedup_ignore_case boolean optionalheader_scan_depth integer optional identity_uniqueness_threshold number optional impute_fixed_value number optionalimpute_strategy string optional na_canonical string optionalnumeric_ratio_threshold number optional trailing_threshold integer optional overrides array optional action string required detector string requiredparams object optionalscope object required {
"additionalProperties": false,
"properties": {
"column_letter": {
"description": "A column LETTER (\"A\", \"B\", ..., \"XFD\"); header names are not accepted here.",
"type": "string"
},
"region": {
"additionalProperties": false,
"properties": {
"bottom_right": {
"type": "string"
},
"top_left": {
"type": "string"
}
},
"required": [
"bottom_right",
"top_left"
],
"type": "object"
},
"sheet": {
"type": "string"
}
},
"required": [
"sheet"
],
"type": "object"
}reject_findings array optional sheets array optional {
"properties": {
"accept_findings": {
"items": {
"type": "string"
},
"type": "array"
},
"detectors": {
"items": {
"type": "string"
},
"type": "array"
},
"file": {
"additionalProperties": false,
"description": "The spreadsheet file, handed off by a host that fills in the OpenAI file-parameter convention (openai/fileParams) from an uploaded or attached file. The server downloads download_url once, server-side; never a local sandbox path.",
"properties": {
"download_url": {
"description": "Temporary https URL to download the file. Valid only for this call.",
"maxLength": 8192,
"minLength": 1,
"type": "string"
},
"file_id": {
"description": "Host file identifier.",
"maxLength": 256,
"type": "string"
},
"file_name": {
"description": "Original file name (advisory only; never used as a path).",
"maxLength": 256,
"type": "string"
},
"mime_type": {
"description": "Declared MIME type (advisory only).",
"maxLength": 256,
"type": "string"
}
},
"required": [
"download_url",
"file_id"
],
"type": "object"
},
"file_b64": {
"description": "Send exactly one file source: file_b64 (this field), file_url, file_handle, or file_text together with file_name.",
"type": "string"
},
"file_handle": {
"description": "Handle returned by xlsx_upload_link, once the user has uploaded the spreadsheet file on that page. Use this when the user attached the file in chat or has no link. Provide this OR file_url.",
"maxLength": 128,
"minLength": 1,
"type": "string"
},
"file_name": {
"description": "File name with its extension (.csv, .tsv or .json), used with file_text.",
"maxLength": 200,
"minLength": 1,
"type": "string"
},
"file_sha256": {
"description": "Hex SHA-256 of the exact file_text UTF-8 text. Optional; checked when given.",
"maxLength": 64,
"minLength": 64,
"type": "string"
},
"file_text": {
"description": "Use only for a small CSV, TSV or JSON file whose full text you already have. Practical limit about 2,000 cells or 40 KB (the server hard cap is 256 KB); above that use file_url, or xlsx_upload_link and file_handle. Requires file_name. Never encode or retype a binary file by hand. Provide this OR file_url OR file_handle.",
"maxLength": 262144,
"minLength": 1,
"type": "string"
},
"file_url": {
"description": "https URL of the spreadsheet file (e.g. a shared Google Drive, Google Sheets, Dropbox, OneDrive or S3 link; must be viewable by anyone with the link). The server downloads it directly. Provide this OR file_handle.",
"maxLength": 8192,
"minLength": 1,
"type": "string"
},
"mode": {
"enum": [
"diagnose",
"execute"
],
"type": "string"
},
"options": {
"additionalProperties": false,
"properties": {
"auto_accept_above": {
"maximum": 1,
"minimum": 0,
"type": "number"
},
"column_roles": {
"additionalProperties": {
"enum": [
"numeric_measurement",
"categorical",
"identity_pii",
"date",
"free_text"
],
"type": "string"
},
"description": "Caller-forced column roles, keyed \"<sheet>!<COL>\" where <COL> is a column LETTER (header names are not accepted here).",
"type": "object"
},
"date_ratio_threshold": {
"maximum": 1,
"minimum": 0,
"type": "number"
},
"dedup_compare_columns": {
"description": "duplicate_data_row: restrict the duplicate comparison to these columns. Each entry is a column letter (\"A\", \"B\", ..., \"XFD\") or the exact header text of the sheet's header row (\"Vendor\"); header names are matched after trimming and resolved once the header row is found. A name that matches no column, or two columns, is a 400 invalid_option_value that lists the headers seen (use a letter to pick one of two same-named columns). Omit to compare every column.",
"items": {
"type": "string"
},
"type": "array"
},
"dedup_ignore_case": {
"type": "boolean"
},
"header_scan_depth": {
"maximum": 50,
"minimum": 2,
"type": "integer"
},
"identity_uniqueness_threshold": {
"maximum": 1,
"minimum": 0,
"type": "number"
},
"impute_fixed_value": {
"type": "number"
},
"impute_strategy": {
"enum": [
"mean",
"median",
"mode",
"fixed"
],
"type": "string"
},
"na_canonical": {
"type": "string"
},
"numeric_ratio_threshold": {
"maximum": 1,
"minimum": 0,
"type": "number"
},
"trailing_threshold": {
"maximum": 100,
"minimum": 1,
"type": "integer"
}
},
"type": "object"
},
"overrides": {
"items": {
"additionalProperties": false,
"properties": {
"action": {
"enum": [
"skip",
"flag_only",
"force",
"accept"
],
"type": "string"
},
"detector": {
"type": "string"
},
"params": {
"type": "object"
},
"scope": {
"additionalProperties": false,
"properties": {
"column_letter": {
"description": "A column LETTER (\"A\", \"B\", ..., \"XFD\"); header names are not accepted here.",
"type": "string"
},
"region": {
"additionalProperties": false,
"properties": {
"bottom_right": {
"type": "string"
},
"top_left": {
"type": "string"
}
},
"required": [
"bottom_right",
"top_left"
],
"type": "object"
},
"sheet": {
"type": "string"
}
},
"required": [
"sheet"
],
"type": "object"
}
},
"required": [
"action",
"detector",
"scope"
],
"type": "object"
},
"type": "array"
},
"reject_findings": {
"items": {
"type": "string"
},
"type": "array"
},
"sheets": {
"items": {
"type": "string"
},
"type": "array"
}
},
"required": [],
"type": "object",
"oneOf": [
{
"required": [
"file_b64"
]
},
{
"required": [
"file_url"
]
},
{
"required": [
"file_handle"
]
},
{
"required": [
"file_text",
"file_name"
]
},
{
"required": [
"file"
]
}
]
}REST (curl):
curl -sX POST https://api.xlsx-for-ai.dev/api/v1/tools/xlsx_data_clean \
-H 'content-type: application/json' \
-H 'Authorization: Bearer <api_key>' \
-d '{"file_b64":"<BASE64_ENCODED_FILE_BYTES>"}'MCP (tools/call):
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "xlsx_data_clean",
"arguments": {
"file_url": "https://example.com/placeholder.xlsx"
}
}
}200 — Tool result (base64-in / base64-out; stateless). A `file_text` whose `file_name` ends in .xlsx, .xlsm, .xls, .xlsb, .ods, .xltx, .xltm or .xlam computes nothing: the reply is still 200, with `status` `workbook_text_retired`, `computed` false, `upload_url` (send the file there with one PUT), `upload_page` (the page a person opens to drop the file in), `file_handle` (pass it to the same tool once the file is uploaded) and `expires_at`. A text copy loses defined names, styles, merged cells, validations and macros, so a workbook is never sent as text.400 — Bad request. `error.code` is one of: `bad_request` (malformed or oversized JSON body, invalid base64, or a missing/invalid field), `hardening_rejected` (the upload failed an ingest safety guard — e.g. an encrypted workbook, a non-OOXML zip, a truncated file, or a legacy .xls on a route that does not accept it), `unparseable_input` (no readable CSV header row), `malformed_csv` (a structurally broken CSV — an unclosed or mid-field quote), or `unsupported_output_format` (`xlsx_convert` was asked to write old binary .xls — Excel 97-2003 is read-only here; request `xlsx` or `csv`). A sheet- or column-not-found request also carries `available_sheets` / `available_columns`. A `file_url` that could not be fetched keeps `error.code` `bad_request` and adds `error.reason`, one of: `google_not_shared` (a Google link not shared publicly), `url_download_failed_4xx` (the host answered a 4xx: 404 is a dead link, 401/403 a private one), `url_download_failed_5xx`, `url_download_failed_network` (no answer, e.g. DNS), `url_download_timeout`, `url_returned_html` (a web page, not a spreadsheet), `url_empty`, `url_refused`, `url_redirect_blocked` or `file_input_url_not_https`.401 — Missing or invalid API key. `error.code`: `unauthorized`.402 — Payment required. `error.code`: `tier_upgrade_required`. A forward-compatible response for a capability gated to a paid subscription; it is driven by the account/consent surface (POST /api/v1/consent), not by the stateless tool inputs. No action is needed for standard tool calls on the free tier.413 — Payload too large. `error.code`: `file_too_large` (the input exceeds the per-format upload ceiling, or expands past the content-processing ceiling once parsed) or `write_output_too_large` (the requested output would exceed the format write cap). These are capacity ceilings — identical for every caller, never a paywall lever.429 — Free-tier file allowance reached for the current period. `error.code`: `rate_limit_exceeded`.500 — Internal server error — an unexpected fault on our side. `error.code`: `internal_error`.503 — Service temporarily unavailable — retryable; a `Retry-After` header is sent when known. `error.code` is one of: `service_unavailable` (a backing service is down, or parse capacity is momentarily saturated), `rate_limit_backend_unavailable`, or `cache_backend_unavailable`.xlsx_data_validationsPOST /api/v1/tools/xlsx_data_validations — Use this when you need to list every cell-level data validation rule (dropdowns, numeric/date bounds, text-length caps, custom formulas) Excel enforces on entry.
Auth: Authorization: Bearer <api_key> (required)
file object optional The spreadsheet file, handed off by a host that fills in the OpenAI file-parameter convention (openai/fileParams) from an uploaded or attached file. The server downloads download_url once, server-side; never a local sandbox path.
download_url string required Temporary https URL to download the file. Valid only for this call.
file_id string required Host file identifier.
file_name string optional Original file name (advisory only; never used as a path).
mime_type string optional Declared MIME type (advisory only).
file_b64 string requiredoptions object optionalsheet string optional{
"properties": {
"file": {
"additionalProperties": false,
"description": "The spreadsheet file, handed off by a host that fills in the OpenAI file-parameter convention (openai/fileParams) from an uploaded or attached file. The server downloads download_url once, server-side; never a local sandbox path.",
"properties": {
"download_url": {
"description": "Temporary https URL to download the file. Valid only for this call.",
"maxLength": 8192,
"minLength": 1,
"type": "string"
},
"file_id": {
"description": "Host file identifier.",
"maxLength": 256,
"type": "string"
},
"file_name": {
"description": "Original file name (advisory only; never used as a path).",
"maxLength": 256,
"type": "string"
},
"mime_type": {
"description": "Declared MIME type (advisory only).",
"maxLength": 256,
"type": "string"
}
},
"required": [
"download_url",
"file_id"
],
"type": "object"
},
"file_b64": {
"type": "string"
},
"options": {
"properties": {
"sheet": {
"type": "string"
}
},
"type": "object"
}
},
"required": [
"file_b64"
],
"type": "object"
}REST (curl):
curl -sX POST https://api.xlsx-for-ai.dev/api/v1/tools/xlsx_data_validations \
-H 'content-type: application/json' \
-H 'Authorization: Bearer <api_key>' \
-d '{"file_b64":"<BASE64_ENCODED_FILE_BYTES>"}'MCP (tools/call):
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "xlsx_data_validations",
"arguments": {
"file_url": "https://example.com/placeholder.xlsx"
}
}
}200 — Tool result (base64-in / base64-out; stateless).400 — Bad request. `error.code` is one of: `bad_request` (malformed or oversized JSON body, invalid base64, or a missing/invalid field), `hardening_rejected` (the upload failed an ingest safety guard — e.g. an encrypted workbook, a non-OOXML zip, a truncated file, or a legacy .xls on a route that does not accept it), `unparseable_input` (no readable CSV header row), `malformed_csv` (a structurally broken CSV — an unclosed or mid-field quote), or `unsupported_output_format` (`xlsx_convert` was asked to write old binary .xls — Excel 97-2003 is read-only here; request `xlsx` or `csv`). A sheet- or column-not-found request also carries `available_sheets` / `available_columns`. A `file_url` that could not be fetched keeps `error.code` `bad_request` and adds `error.reason`, one of: `google_not_shared` (a Google link not shared publicly), `url_download_failed_4xx` (the host answered a 4xx: 404 is a dead link, 401/403 a private one), `url_download_failed_5xx`, `url_download_failed_network` (no answer, e.g. DNS), `url_download_timeout`, `url_returned_html` (a web page, not a spreadsheet), `url_empty`, `url_refused`, `url_redirect_blocked` or `file_input_url_not_https`.401 — Missing or invalid API key. `error.code`: `unauthorized`.402 — Payment required. `error.code`: `tier_upgrade_required`. A forward-compatible response for a capability gated to a paid subscription; it is driven by the account/consent surface (POST /api/v1/consent), not by the stateless tool inputs. No action is needed for standard tool calls on the free tier.413 — Payload too large. `error.code`: `file_too_large` (the input exceeds the per-format upload ceiling, or expands past the content-processing ceiling once parsed) or `write_output_too_large` (the requested output would exceed the format write cap). These are capacity ceilings — identical for every caller, never a paywall lever.429 — Free-tier file allowance reached for the current period. `error.code`: `rate_limit_exceeded`.500 — Internal server error — an unexpected fault on our side. `error.code`: `internal_error`.503 — Service temporarily unavailable — retryable; a `Retry-After` header is sent when known. `error.code` is one of: `service_unavailable` (a backing service is down, or parse capacity is momentarily saturated), `rate_limit_backend_unavailable`, or `cache_backend_unavailable`.xlsx_describePOST /api/v1/tools/xlsx_describe — Use this when you need pandas-style summary statistics per column: count, nulls, unique, min/max/mean/std for numerics.
Auth: Authorization: Bearer <api_key> (required)
file_b64 string optionalSend exactly one file source: file_b64 (this field), file_url, file_handle, or file_text together with file_name.
file_handle string optional Handle returned by xlsx_upload_link, once the user has uploaded the spreadsheet file on that page. Use this when the user attached the file in chat or has no link. Provide this OR file_url.
file_name string optional File name with its extension (.csv, .tsv or .json), used with file_text.
file_sha256 string optional Hex SHA-256 of the exact file_text UTF-8 text. Optional; checked when given.
file_text string optional Use only for a small CSV, TSV or JSON file whose full text you already have. Practical limit about 2,000 cells or 40 KB (the server hard cap is 256 KB); above that use file_url, or xlsx_upload_link and file_handle. Requires file_name. Never encode or retype a binary file by hand. Provide this OR file_url OR file_handle.
file_url string optional https URL of the spreadsheet file (e.g. a shared Google Drive, Google Sheets, Dropbox, OneDrive or S3 link; must be viewable by anyone with the link). The server downloads it directly. Provide this OR file_handle.
options object optionalheader_row integer optional max_rows integer optional offset integer optional sheet string optional{
"properties": {
"file_b64": {
"description": "Send exactly one file source: file_b64 (this field), file_url, file_handle, or file_text together with file_name.",
"type": "string"
},
"file_handle": {
"description": "Handle returned by xlsx_upload_link, once the user has uploaded the spreadsheet file on that page. Use this when the user attached the file in chat or has no link. Provide this OR file_url.",
"maxLength": 128,
"minLength": 1,
"type": "string"
},
"file_name": {
"description": "File name with its extension (.csv, .tsv or .json), used with file_text.",
"maxLength": 200,
"minLength": 1,
"type": "string"
},
"file_sha256": {
"description": "Hex SHA-256 of the exact file_text UTF-8 text. Optional; checked when given.",
"maxLength": 64,
"minLength": 64,
"type": "string"
},
"file_text": {
"description": "Use only for a small CSV, TSV or JSON file whose full text you already have. Practical limit about 2,000 cells or 40 KB (the server hard cap is 256 KB); above that use file_url, or xlsx_upload_link and file_handle. Requires file_name. Never encode or retype a binary file by hand. Provide this OR file_url OR file_handle.",
"maxLength": 262144,
"minLength": 1,
"type": "string"
},
"file_url": {
"description": "https URL of the spreadsheet file (e.g. a shared Google Drive, Google Sheets, Dropbox, OneDrive or S3 link; must be viewable by anyone with the link). The server downloads it directly. Provide this OR file_handle.",
"maxLength": 8192,
"minLength": 1,
"type": "string"
},
"options": {
"properties": {
"header_row": {
"minimum": 0,
"type": "integer"
},
"max_rows": {
"maximum": 100000,
"minimum": 1,
"type": "integer"
},
"offset": {
"minimum": 0,
"type": "integer"
},
"sheet": {
"type": "string"
}
},
"type": "object"
}
},
"required": [],
"type": "object",
"oneOf": [
{
"required": [
"file_b64"
]
},
{
"required": [
"file_url"
]
},
{
"required": [
"file_handle"
]
},
{
"required": [
"file_text",
"file_name"
]
}
]
}REST (curl):
curl -sX POST https://api.xlsx-for-ai.dev/api/v1/tools/xlsx_describe \
-H 'content-type: application/json' \
-H 'Authorization: Bearer <api_key>' \
-d '{"file_b64":"<BASE64_ENCODED_FILE_BYTES>"}'MCP (tools/call):
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "xlsx_describe",
"arguments": {
"file_url": "https://example.com/placeholder.xlsx"
}
}
}200 — Tool result (base64-in / base64-out; stateless). A `file_text` whose `file_name` ends in .xlsx, .xlsm, .xls, .xlsb, .ods, .xltx, .xltm or .xlam computes nothing: the reply is still 200, with `status` `workbook_text_retired`, `computed` false, `upload_url` (send the file there with one PUT), `upload_page` (the page a person opens to drop the file in), `file_handle` (pass it to the same tool once the file is uploaded) and `expires_at`. A text copy loses defined names, styles, merged cells, validations and macros, so a workbook is never sent as text.400 — Bad request. `error.code` is one of: `bad_request` (malformed or oversized JSON body, invalid base64, or a missing/invalid field), `hardening_rejected` (the upload failed an ingest safety guard — e.g. an encrypted workbook, a non-OOXML zip, a truncated file, or a legacy .xls on a route that does not accept it), `unparseable_input` (no readable CSV header row), `malformed_csv` (a structurally broken CSV — an unclosed or mid-field quote), or `unsupported_output_format` (`xlsx_convert` was asked to write old binary .xls — Excel 97-2003 is read-only here; request `xlsx` or `csv`). A sheet- or column-not-found request also carries `available_sheets` / `available_columns`. A `file_url` that could not be fetched keeps `error.code` `bad_request` and adds `error.reason`, one of: `google_not_shared` (a Google link not shared publicly), `url_download_failed_4xx` (the host answered a 4xx: 404 is a dead link, 401/403 a private one), `url_download_failed_5xx`, `url_download_failed_network` (no answer, e.g. DNS), `url_download_timeout`, `url_returned_html` (a web page, not a spreadsheet), `url_empty`, `url_refused`, `url_redirect_blocked` or `file_input_url_not_https`.401 — Missing or invalid API key. `error.code`: `unauthorized`.402 — Payment required. `error.code`: `tier_upgrade_required`. A forward-compatible response for a capability gated to a paid subscription; it is driven by the account/consent surface (POST /api/v1/consent), not by the stateless tool inputs. No action is needed for standard tool calls on the free tier.413 — Payload too large. `error.code`: `file_too_large` (the input exceeds the per-format upload ceiling, or expands past the content-processing ceiling once parsed) or `write_output_too_large` (the requested output would exceed the format write cap). These are capacity ceilings — identical for every caller, never a paywall lever.429 — Free-tier file allowance reached for the current period. `error.code`: `rate_limit_exceeded`.500 — Internal server error — an unexpected fault on our side. `error.code`: `internal_error`.503 — Service temporarily unavailable — retryable; a `Retry-After` header is sent when known. `error.code` is one of: `service_unavailable` (a backing service is down, or parse capacity is momentarily saturated), `rate_limit_backend_unavailable`, or `cache_backend_unavailable`.xlsx_diffPOST /api/v1/tools/xlsx_diff — Use this when you need to compute a deterministic semantic diff between two workbooks — cell-level deltas, formula changes, added/removed rows.
Auth: Authorization: Bearer <api_key> (required)
file_a object optional The first (A) file, handed off by a host that fills in the OpenAI file-parameter convention (openai/fileParams) from an uploaded or attached file. The server downloads download_url once, server-side; never a local sandbox path.
download_url string required Temporary https URL to download the file. Valid only for this call.
file_id string required Host file identifier.
file_name string optional Original file name (advisory only; never used as a path).
mime_type string optional Declared MIME type (advisory only).
file_a_b64 string requiredfile_b object optional The second (B) file, handed off by a host that fills in the OpenAI file-parameter convention (openai/fileParams) from an uploaded or attached file. The server downloads download_url once, server-side; never a local sandbox path.
download_url string required Temporary https URL to download the file. Valid only for this call.
file_id string required Host file identifier.
file_name string optional Original file name (advisory only; never used as a path).
mime_type string optional Declared MIME type (advisory only).
file_b_b64 string requiredoptions object optionalsheet string optional{
"properties": {
"file_a": {
"additionalProperties": false,
"description": "The first (A) file, handed off by a host that fills in the OpenAI file-parameter convention (openai/fileParams) from an uploaded or attached file. The server downloads download_url once, server-side; never a local sandbox path.",
"properties": {
"download_url": {
"description": "Temporary https URL to download the file. Valid only for this call.",
"maxLength": 8192,
"minLength": 1,
"type": "string"
},
"file_id": {
"description": "Host file identifier.",
"maxLength": 256,
"type": "string"
},
"file_name": {
"description": "Original file name (advisory only; never used as a path).",
"maxLength": 256,
"type": "string"
},
"mime_type": {
"description": "Declared MIME type (advisory only).",
"maxLength": 256,
"type": "string"
}
},
"required": [
"download_url",
"file_id"
],
"type": "object"
},
"file_a_b64": {
"type": "string"
},
"file_b": {
"additionalProperties": false,
"description": "The second (B) file, handed off by a host that fills in the OpenAI file-parameter convention (openai/fileParams) from an uploaded or attached file. The server downloads download_url once, server-side; never a local sandbox path.",
"properties": {
"download_url": {
"description": "Temporary https URL to download the file. Valid only for this call.",
"maxLength": 8192,
"minLength": 1,
"type": "string"
},
"file_id": {
"description": "Host file identifier.",
"maxLength": 256,
"type": "string"
},
"file_name": {
"description": "Original file name (advisory only; never used as a path).",
"maxLength": 256,
"type": "string"
},
"mime_type": {
"description": "Declared MIME type (advisory only).",
"maxLength": 256,
"type": "string"
}
},
"required": [
"download_url",
"file_id"
],
"type": "object"
},
"file_b_b64": {
"type": "string"
},
"options": {
"properties": {
"sheet": {
"type": "string"
}
},
"type": "object"
}
},
"required": [
"file_a_b64",
"file_b_b64"
],
"type": "object"
}REST (curl):
curl -sX POST https://api.xlsx-for-ai.dev/api/v1/tools/xlsx_diff \
-H 'content-type: application/json' \
-H 'Authorization: Bearer <api_key>' \
-d '{"file_a_b64":"<BASE64_ENCODED_FILE_BYTES>","file_b_b64":"<BASE64_ENCODED_FILE_BYTES>"}'MCP (tools/call):
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "xlsx_diff",
"arguments": {
"file_a_url": "https://example.com/placeholder.xlsx",
"file_b_url": "https://example.com/placeholder.xlsx"
}
}
}200 — Tool result (base64-in / base64-out; stateless).400 — Bad request. `error.code` is one of: `bad_request` (malformed or oversized JSON body, invalid base64, or a missing/invalid field), `hardening_rejected` (the upload failed an ingest safety guard — e.g. an encrypted workbook, a non-OOXML zip, a truncated file, or a legacy .xls on a route that does not accept it), `unparseable_input` (no readable CSV header row), `malformed_csv` (a structurally broken CSV — an unclosed or mid-field quote), or `unsupported_output_format` (`xlsx_convert` was asked to write old binary .xls — Excel 97-2003 is read-only here; request `xlsx` or `csv`). A sheet- or column-not-found request also carries `available_sheets` / `available_columns`. A `file_url` that could not be fetched keeps `error.code` `bad_request` and adds `error.reason`, one of: `google_not_shared` (a Google link not shared publicly), `url_download_failed_4xx` (the host answered a 4xx: 404 is a dead link, 401/403 a private one), `url_download_failed_5xx`, `url_download_failed_network` (no answer, e.g. DNS), `url_download_timeout`, `url_returned_html` (a web page, not a spreadsheet), `url_empty`, `url_refused`, `url_redirect_blocked` or `file_input_url_not_https`.401 — Missing or invalid API key. `error.code`: `unauthorized`.402 — Payment required. `error.code`: `tier_upgrade_required`. A forward-compatible response for a capability gated to a paid subscription; it is driven by the account/consent surface (POST /api/v1/consent), not by the stateless tool inputs. No action is needed for standard tool calls on the free tier.413 — Payload too large. `error.code`: `file_too_large` (the input exceeds the per-format upload ceiling, or expands past the content-processing ceiling once parsed) or `write_output_too_large` (the requested output would exceed the format write cap). These are capacity ceilings — identical for every caller, never a paywall lever.429 — Free-tier file allowance reached for the current period. `error.code`: `rate_limit_exceeded`.500 — Internal server error — an unexpected fault on our side. `error.code`: `internal_error`.503 — Service temporarily unavailable — retryable; a `Retry-After` header is sent when known. `error.code` is one of: `service_unavailable` (a backing service is down, or parse capacity is momentarily saturated), `rate_limit_backend_unavailable`, or `cache_backend_unavailable`.xlsx_doctorPOST /api/v1/tools/xlsx_doctor — Use this when you need to know the risks before sharing a workbook: a one-call health report covering macros, external refs, hidden sheets, missing metadata, oversized images, ranked HIGH/MEDIUM/LOW findings.
Auth: Authorization: Bearer <api_key> (required)
file object optional The spreadsheet file, handed off by a host that fills in the OpenAI file-parameter convention (openai/fileParams) from an uploaded or attached file. The server downloads download_url once, server-side; never a local sandbox path.
download_url string required Temporary https URL to download the file. Valid only for this call.
file_id string required Host file identifier.
file_name string optional Original file name (advisory only; never used as a path).
mime_type string optional Declared MIME type (advisory only).
file_b64 string required{
"properties": {
"file": {
"additionalProperties": false,
"description": "The spreadsheet file, handed off by a host that fills in the OpenAI file-parameter convention (openai/fileParams) from an uploaded or attached file. The server downloads download_url once, server-side; never a local sandbox path.",
"properties": {
"download_url": {
"description": "Temporary https URL to download the file. Valid only for this call.",
"maxLength": 8192,
"minLength": 1,
"type": "string"
},
"file_id": {
"description": "Host file identifier.",
"maxLength": 256,
"type": "string"
},
"file_name": {
"description": "Original file name (advisory only; never used as a path).",
"maxLength": 256,
"type": "string"
},
"mime_type": {
"description": "Declared MIME type (advisory only).",
"maxLength": 256,
"type": "string"
}
},
"required": [
"download_url",
"file_id"
],
"type": "object"
},
"file_b64": {
"type": "string"
}
},
"required": [
"file_b64"
],
"type": "object"
}REST (curl):
curl -sX POST https://api.xlsx-for-ai.dev/api/v1/tools/xlsx_doctor \
-H 'content-type: application/json' \
-H 'Authorization: Bearer <api_key>' \
-d '{"file_b64":"<BASE64_ENCODED_FILE_BYTES>"}'MCP (tools/call):
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "xlsx_doctor",
"arguments": {
"file_url": "https://example.com/placeholder.xlsx"
}
}
}200 — Tool result (base64-in / base64-out; stateless).400 — Bad request. `error.code` is one of: `bad_request` (malformed or oversized JSON body, invalid base64, or a missing/invalid field), `hardening_rejected` (the upload failed an ingest safety guard — e.g. an encrypted workbook, a non-OOXML zip, a truncated file, or a legacy .xls on a route that does not accept it), `unparseable_input` (no readable CSV header row), `malformed_csv` (a structurally broken CSV — an unclosed or mid-field quote), or `unsupported_output_format` (`xlsx_convert` was asked to write old binary .xls — Excel 97-2003 is read-only here; request `xlsx` or `csv`). A sheet- or column-not-found request also carries `available_sheets` / `available_columns`. A `file_url` that could not be fetched keeps `error.code` `bad_request` and adds `error.reason`, one of: `google_not_shared` (a Google link not shared publicly), `url_download_failed_4xx` (the host answered a 4xx: 404 is a dead link, 401/403 a private one), `url_download_failed_5xx`, `url_download_failed_network` (no answer, e.g. DNS), `url_download_timeout`, `url_returned_html` (a web page, not a spreadsheet), `url_empty`, `url_refused`, `url_redirect_blocked` or `file_input_url_not_https`.401 — Missing or invalid API key. `error.code`: `unauthorized`.402 — Payment required. `error.code`: `tier_upgrade_required`. A forward-compatible response for a capability gated to a paid subscription; it is driven by the account/consent surface (POST /api/v1/consent), not by the stateless tool inputs. No action is needed for standard tool calls on the free tier.413 — Payload too large. `error.code`: `file_too_large` (the input exceeds the per-format upload ceiling, or expands past the content-processing ceiling once parsed) or `write_output_too_large` (the requested output would exceed the format write cap). These are capacity ceilings — identical for every caller, never a paywall lever.429 — Free-tier file allowance reached for the current period. `error.code`: `rate_limit_exceeded`.500 — Internal server error — an unexpected fault on our side. `error.code`: `internal_error`.503 — Service temporarily unavailable — retryable; a `Retry-After` header is sent when known. `error.code` is one of: `service_unavailable` (a backing service is down, or parse capacity is momentarily saturated), `rate_limit_backend_unavailable`, or `cache_backend_unavailable`.xlsx_evalPOST /api/v1/tools/xlsx_eval — Use this when you need to evaluate Excel formulas against a workbook via a formula engine (over 350 Excel functions, plus the functions only Google Sheets has) — pass ad-hoc formulas or re-evaluate specific cell refs, never trusting a stale cached value. Formulas that name no cell need no file; cell refs need the file. A call takes up to 5,000 cells or formulas when it builds its workbook from a spec, and up to 100 when it carries a file; over the cap it answers 400 too_many_cells. Date text is read under a fixed en-US convention: numeric dates are M/D/Y, ISO-8601 (YYYY-MM-DD) and month names are accepted, and a trailing time part is ignored. Exception: external-data/AI functions (IMPORTRANGE, IMPORTXML, IMPORTHTML, IMPORTDATA, IMPORTFEED, GOOGLEFINANCE, GOOGLETRANSLATE, AI, COPILOT, PY) are never fetched/run — the last value Excel/Sheets cached for that cell is served instead, or the platform's documented error (#N/A / #CONNECT! / #BUSY!) when no cached value exists.
Auth: Authorization: Bearer <api_key> (required)
cache_handle string optional Handle of a workbook already stored on the server (a finalized chunked upload, or a tool's saved output), evaluated in place of a sent file, file_text or spec. Send exactly one of these. An unknown or expired handle answers 400.
cells array optional Cell refs to re-evaluate. Up to 5,000 cells or formulas per call when the call carries a spec; 100 when it carries a file. Over the cap answers 400 too_many_cells naming the cap.
file object optional The spreadsheet file, handed off by a host that fills in the OpenAI file-parameter convention (openai/fileParams) from an uploaded or attached file. The server downloads download_url once, server-side; never a local sandbox path.
download_url string required Temporary https URL to download the file. Valid only for this call.
file_id string required Host file identifier.
file_name string optional Original file name (advisory only; never used as a path).
mime_type string optional Declared MIME type (advisory only).
file_b64 string optionalfile_handle string optional Not read on this route: a call that carries it is refused (send file_b64 or file_text instead).
file_name string optional File name with its extension (.csv or .tsv), used with file_text.
file_sha256 string optional Hex SHA-256 of the exact file_text UTF-8 text. Optional; checked when given.
file_text string optional Small CSV or TSV text, used with file_name, in place of a workbook file. Send only one workbook source.
file_url string optional Not read on this route: a call that carries it is refused (send file_b64 or file_text instead).
formulas array optional Formulas to evaluate. Up to 5,000 cells or formulas per call when the call carries a spec; 100 when it carries a file. Over the cap answers 400 too_many_cells naming the cap.
options object optionalsheet string optionalvalue_format string optionaltyped (default) or text. typed: the reply's _meta.cell_values holds one {ref or index, type, value} entry per requested cell or formula (type number, string, boolean, error or blank; a date is its serial number in the 1900 date system; a spilled array adds spill.values). text: leave cell_values out. The text table is the same either way.
spec object optionalBuild a workbook on the fly instead of sending a file or file_text: {sheets: [{name, cells: [{address, value?, formula?}]}]}.
{
"properties": {
"cache_handle": {
"description": "Handle of a workbook already stored on the server (a finalized chunked upload, or a tool's saved output), evaluated in place of a sent file, file_text or spec. Send exactly one of these. An unknown or expired handle answers 400.",
"maxLength": 128,
"minLength": 1,
"pattern": "^[^\\u0000-\\u001f\\u007f\\s:*?\\[\\]]+$",
"type": "string"
},
"cells": {
"description": "Cell refs to re-evaluate. Up to 5,000 cells or formulas per call when the call carries a spec; 100 when it carries a file. Over the cap answers 400 too_many_cells naming the cap.",
"items": {
"maxLength": 64,
"minLength": 1,
"type": "string"
},
"type": "array"
},
"file": {
"additionalProperties": false,
"description": "The spreadsheet file, handed off by a host that fills in the OpenAI file-parameter convention (openai/fileParams) from an uploaded or attached file. The server downloads download_url once, server-side; never a local sandbox path.",
"properties": {
"download_url": {
"description": "Temporary https URL to download the file. Valid only for this call.",
"maxLength": 8192,
"minLength": 1,
"type": "string"
},
"file_id": {
"description": "Host file identifier.",
"maxLength": 256,
"type": "string"
},
"file_name": {
"description": "Original file name (advisory only; never used as a path).",
"maxLength": 256,
"type": "string"
},
"mime_type": {
"description": "Declared MIME type (advisory only).",
"maxLength": 256,
"type": "string"
}
},
"required": [
"download_url",
"file_id"
],
"type": "object"
},
"file_b64": {
"type": "string"
},
"file_handle": {
"description": "Not read on this route: a call that carries it is refused (send file_b64 or file_text instead).",
"maxLength": 128,
"type": "string"
},
"file_name": {
"description": "File name with its extension (.csv or .tsv), used with file_text.",
"maxLength": 200,
"minLength": 1,
"type": "string"
},
"file_sha256": {
"description": "Hex SHA-256 of the exact file_text UTF-8 text. Optional; checked when given.",
"maxLength": 64,
"minLength": 64,
"type": "string"
},
"file_text": {
"description": "Small CSV or TSV text, used with file_name, in place of a workbook file. Send only one workbook source.",
"maxLength": 262144,
"minLength": 1,
"type": "string"
},
"file_url": {
"description": "Not read on this route: a call that carries it is refused (send file_b64 or file_text instead).",
"maxLength": 8192,
"type": "string"
},
"formulas": {
"description": "Formulas to evaluate. Up to 5,000 cells or formulas per call when the call carries a spec; 100 when it carries a file. Over the cap answers 400 too_many_cells naming the cap.",
"items": {
"maxLength": 4096,
"minLength": 1,
"type": "string"
},
"type": "array"
},
"options": {
"properties": {
"sheet": {
"type": "string"
},
"value_format": {
"description": "typed (default) or text. typed: the reply's _meta.cell_values holds one {ref or index, type, value} entry per requested cell or formula (type number, string, boolean, error or blank; a date is its serial number in the 1900 date system; a spilled array adds spill.values). text: leave cell_values out. The text table is the same either way.",
"type": "string"
}
},
"type": "object"
},
"spec": {
"description": "Build a workbook on the fly instead of sending a file or file_text: {sheets: [{name, cells: [{address, value?, formula?}]}]}.",
"type": "object"
}
},
"type": "object"
}REST (curl):
curl -sX POST https://api.xlsx-for-ai.dev/api/v1/tools/xlsx_eval \
-H 'content-type: application/json' \
-H 'Authorization: Bearer <api_key>' \
-d '{"file_b64":"<BASE64_ENCODED_FILE_BYTES>"}'MCP (tools/call):
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "xlsx_eval",
"arguments": {
"file_url": "https://example.com/placeholder.xlsx"
}
}
}200 — Tool result (base64-in / base64-out; stateless). A `file_text` whose `file_name` ends in .xlsx, .xlsm, .xls, .xlsb, .ods, .xltx, .xltm or .xlam computes nothing: the reply is still 200, with `status` `workbook_text_retired`, `computed` false, `upload_url` (send the file there with one PUT), `upload_page` (the page a person opens to drop the file in), `file_handle` (pass it to the same tool once the file is uploaded) and `expires_at`. A text copy loses defined names, styles, merged cells, validations and macros, so a workbook is never sent as text.400 — Bad request. `error.code` is one of: `bad_request` (malformed or oversized JSON body, invalid base64, or a missing/invalid field), `hardening_rejected` (the upload failed an ingest safety guard — e.g. an encrypted workbook, a non-OOXML zip, a truncated file, or a legacy .xls on a route that does not accept it), `unparseable_input` (no readable CSV header row), `malformed_csv` (a structurally broken CSV — an unclosed or mid-field quote), or `unsupported_output_format` (`xlsx_convert` was asked to write old binary .xls — Excel 97-2003 is read-only here; request `xlsx` or `csv`). A sheet- or column-not-found request also carries `available_sheets` / `available_columns`. A `file_url` that could not be fetched keeps `error.code` `bad_request` and adds `error.reason`, one of: `google_not_shared` (a Google link not shared publicly), `url_download_failed_4xx` (the host answered a 4xx: 404 is a dead link, 401/403 a private one), `url_download_failed_5xx`, `url_download_failed_network` (no answer, e.g. DNS), `url_download_timeout`, `url_returned_html` (a web page, not a spreadsheet), `url_empty`, `url_refused`, `url_redirect_blocked` or `file_input_url_not_https`.401 — Missing or invalid API key. `error.code`: `unauthorized`.402 — Payment required. `error.code`: `tier_upgrade_required`. A forward-compatible response for a capability gated to a paid subscription; it is driven by the account/consent surface (POST /api/v1/consent), not by the stateless tool inputs. No action is needed for standard tool calls on the free tier.413 — Payload too large. `error.code`: `file_too_large` (the input exceeds the per-format upload ceiling, or expands past the content-processing ceiling once parsed) or `write_output_too_large` (the requested output would exceed the format write cap). These are capacity ceilings — identical for every caller, never a paywall lever.429 — Free-tier file allowance reached for the current period. `error.code`: `rate_limit_exceeded`.500 — Internal server error — an unexpected fault on our side. `error.code`: `internal_error`.503 — Service temporarily unavailable — retryable; a `Retry-After` header is sent when known. `error.code` is one of: `service_unavailable` (a backing service is down, or parse capacity is momentarily saturated), `rate_limit_backend_unavailable`, or `cache_backend_unavailable`.xlsx_external_linksPOST /api/v1/tools/xlsx_external_links — Use this when you need to list every external workbook reference this file depends on, classified (http / network share / absolute / relative) with cached-value counts.
Auth: Authorization: Bearer <api_key> (required)
file object optional The spreadsheet file, handed off by a host that fills in the OpenAI file-parameter convention (openai/fileParams) from an uploaded or attached file. The server downloads download_url once, server-side; never a local sandbox path.
download_url string required Temporary https URL to download the file. Valid only for this call.
file_id string required Host file identifier.
file_name string optional Original file name (advisory only; never used as a path).
mime_type string optional Declared MIME type (advisory only).
file_b64 string required{
"properties": {
"file": {
"additionalProperties": false,
"description": "The spreadsheet file, handed off by a host that fills in the OpenAI file-parameter convention (openai/fileParams) from an uploaded or attached file. The server downloads download_url once, server-side; never a local sandbox path.",
"properties": {
"download_url": {
"description": "Temporary https URL to download the file. Valid only for this call.",
"maxLength": 8192,
"minLength": 1,
"type": "string"
},
"file_id": {
"description": "Host file identifier.",
"maxLength": 256,
"type": "string"
},
"file_name": {
"description": "Original file name (advisory only; never used as a path).",
"maxLength": 256,
"type": "string"
},
"mime_type": {
"description": "Declared MIME type (advisory only).",
"maxLength": 256,
"type": "string"
}
},
"required": [
"download_url",
"file_id"
],
"type": "object"
},
"file_b64": {
"type": "string"
}
},
"required": [
"file_b64"
],
"type": "object"
}REST (curl):
curl -sX POST https://api.xlsx-for-ai.dev/api/v1/tools/xlsx_external_links \
-H 'content-type: application/json' \
-H 'Authorization: Bearer <api_key>' \
-d '{"file_b64":"<BASE64_ENCODED_FILE_BYTES>"}'MCP (tools/call):
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "xlsx_external_links",
"arguments": {
"file_url": "https://example.com/placeholder.xlsx"
}
}
}200 — Tool result (base64-in / base64-out; stateless).400 — Bad request. `error.code` is one of: `bad_request` (malformed or oversized JSON body, invalid base64, or a missing/invalid field), `hardening_rejected` (the upload failed an ingest safety guard — e.g. an encrypted workbook, a non-OOXML zip, a truncated file, or a legacy .xls on a route that does not accept it), `unparseable_input` (no readable CSV header row), `malformed_csv` (a structurally broken CSV — an unclosed or mid-field quote), or `unsupported_output_format` (`xlsx_convert` was asked to write old binary .xls — Excel 97-2003 is read-only here; request `xlsx` or `csv`). A sheet- or column-not-found request also carries `available_sheets` / `available_columns`. A `file_url` that could not be fetched keeps `error.code` `bad_request` and adds `error.reason`, one of: `google_not_shared` (a Google link not shared publicly), `url_download_failed_4xx` (the host answered a 4xx: 404 is a dead link, 401/403 a private one), `url_download_failed_5xx`, `url_download_failed_network` (no answer, e.g. DNS), `url_download_timeout`, `url_returned_html` (a web page, not a spreadsheet), `url_empty`, `url_refused`, `url_redirect_blocked` or `file_input_url_not_https`.401 — Missing or invalid API key. `error.code`: `unauthorized`.402 — Payment required. `error.code`: `tier_upgrade_required`. A forward-compatible response for a capability gated to a paid subscription; it is driven by the account/consent surface (POST /api/v1/consent), not by the stateless tool inputs. No action is needed for standard tool calls on the free tier.413 — Payload too large. `error.code`: `file_too_large` (the input exceeds the per-format upload ceiling, or expands past the content-processing ceiling once parsed) or `write_output_too_large` (the requested output would exceed the format write cap). These are capacity ceilings — identical for every caller, never a paywall lever.429 — Free-tier file allowance reached for the current period. `error.code`: `rate_limit_exceeded`.500 — Internal server error — an unexpected fault on our side. `error.code`: `internal_error`.503 — Service temporarily unavailable — retryable; a `Retry-After` header is sent when known. `error.code` is one of: `service_unavailable` (a backing service is down, or parse capacity is momentarily saturated), `rate_limit_backend_unavailable`, or `cache_backend_unavailable`.xlsx_filterPOST /api/v1/tools/xlsx_filter — Use this when you need a row filter with AND-combined predicates (eq/ne/gt/gte/lt/lte/contains/in/is_null/not_null, or criteria: an Excel criterion matched exactly as COUNTIF does) on real, formula-evaluated cell values. output row_numbers returns the matching sheet rows; rows_handle writes the matching rows as NDJSON to a new cache handle; json returns a page in the xlsx_read json shape.
Auth: Authorization: Bearer <api_key> (required)
file object optional The spreadsheet file, handed off by a host that fills in the OpenAI file-parameter convention (openai/fileParams) from an uploaded or attached file. The server downloads download_url once, server-side; never a local sandbox path.
download_url string required Temporary https URL to download the file. Valid only for this call.
file_id string required Host file identifier.
file_name string optional Original file name (advisory only; never used as a path).
mime_type string optional Declared MIME type (advisory only).
file_b64 string requiredoptions object optionalheader_row integer optional limit integer optional offset integer optional output string optional sheet string optionalpredicates array required column string requiredop string required value any optional{
"properties": {
"file": {
"additionalProperties": false,
"description": "The spreadsheet file, handed off by a host that fills in the OpenAI file-parameter convention (openai/fileParams) from an uploaded or attached file. The server downloads download_url once, server-side; never a local sandbox path.",
"properties": {
"download_url": {
"description": "Temporary https URL to download the file. Valid only for this call.",
"maxLength": 8192,
"minLength": 1,
"type": "string"
},
"file_id": {
"description": "Host file identifier.",
"maxLength": 256,
"type": "string"
},
"file_name": {
"description": "Original file name (advisory only; never used as a path).",
"maxLength": 256,
"type": "string"
},
"mime_type": {
"description": "Declared MIME type (advisory only).",
"maxLength": 256,
"type": "string"
}
},
"required": [
"download_url",
"file_id"
],
"type": "object"
},
"file_b64": {
"type": "string"
},
"options": {
"properties": {
"header_row": {
"minimum": 0,
"type": "integer"
},
"limit": {
"maximum": 1000,
"minimum": 1,
"type": "integer"
},
"offset": {
"minimum": 0,
"type": "integer"
},
"output": {
"enum": [
"rows",
"row_numbers",
"rows_handle",
"json"
],
"type": "string"
},
"sheet": {
"type": "string"
}
},
"type": "object"
},
"predicates": {
"items": {
"properties": {
"column": {
"type": "string"
},
"op": {
"enum": [
"eq",
"ne",
"gt",
"gte",
"lt",
"lte",
"contains",
"not_contains",
"in",
"not_in",
"is_null",
"not_null",
"criteria"
],
"type": "string"
},
"value": {}
},
"required": [
"column",
"op"
],
"type": "object"
},
"maxItems": 16,
"minItems": 1,
"type": "array"
}
},
"required": [
"file_b64",
"predicates"
],
"type": "object"
}REST (curl):
curl -sX POST https://api.xlsx-for-ai.dev/api/v1/tools/xlsx_filter \
-H 'content-type: application/json' \
-H 'Authorization: Bearer <api_key>' \
-d '{"file_b64":"<BASE64_ENCODED_FILE_BYTES>","predicates":[{"column":"example-value","op":"eq"}]}'MCP (tools/call):
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "xlsx_filter",
"arguments": {
"predicates": [
{
"column": "example-value",
"op": "eq"
}
],
"file_url": "https://example.com/placeholder.xlsx"
}
}
}200 — Tool result (base64-in / base64-out; stateless).400 — Bad request. `error.code` is one of: `bad_request` (malformed or oversized JSON body, invalid base64, or a missing/invalid field), `hardening_rejected` (the upload failed an ingest safety guard — e.g. an encrypted workbook, a non-OOXML zip, a truncated file, or a legacy .xls on a route that does not accept it), `unparseable_input` (no readable CSV header row), `malformed_csv` (a structurally broken CSV — an unclosed or mid-field quote), or `unsupported_output_format` (`xlsx_convert` was asked to write old binary .xls — Excel 97-2003 is read-only here; request `xlsx` or `csv`). A sheet- or column-not-found request also carries `available_sheets` / `available_columns`. A `file_url` that could not be fetched keeps `error.code` `bad_request` and adds `error.reason`, one of: `google_not_shared` (a Google link not shared publicly), `url_download_failed_4xx` (the host answered a 4xx: 404 is a dead link, 401/403 a private one), `url_download_failed_5xx`, `url_download_failed_network` (no answer, e.g. DNS), `url_download_timeout`, `url_returned_html` (a web page, not a spreadsheet), `url_empty`, `url_refused`, `url_redirect_blocked` or `file_input_url_not_https`.401 — Missing or invalid API key. `error.code`: `unauthorized`.402 — Payment required. `error.code`: `tier_upgrade_required`. A forward-compatible response for a capability gated to a paid subscription; it is driven by the account/consent surface (POST /api/v1/consent), not by the stateless tool inputs. No action is needed for standard tool calls on the free tier.413 — Payload too large. `error.code`: `file_too_large` (the input exceeds the per-format upload ceiling, or expands past the content-processing ceiling once parsed) or `write_output_too_large` (the requested output would exceed the format write cap). These are capacity ceilings — identical for every caller, never a paywall lever.429 — Free-tier file allowance reached for the current period. `error.code`: `rate_limit_exceeded`.500 — Internal server error — an unexpected fault on our side. `error.code`: `internal_error`.501 — Not served yet. `error.code`: `capability_gap`; `error.message` names the criterion: a `criteria` predicate whose criterion the COUNTIF criteria engine does not serve yet (an ordered text operand such as ">apple", a logical operand such as TRUE or "<>false", a formatted number such as "$100", "50%" or "1,000", or a time or date-time such as "11:00" or "1/1/2026 11:00"). The engine declines instead of guessing. Not transient: retrying the same input does not help. With `options.output` `rows_handle` on a workbook, `error.message` can also say a kept column mixes numbers, texts and dates (one NDJSON column kind cannot type it) or a kept cell holds an error value: use `output` `json` or `row_numbers` for that sheet (XLS-10381).503 — Service temporarily unavailable — retryable; a `Retry-After` header is sent when known. `error.code` is one of: `service_unavailable` (a backing service is down, or parse capacity is momentarily saturated), `rate_limit_backend_unavailable`, or `cache_backend_unavailable`.xlsx_form_controlsPOST /api/v1/tools/xlsx_form_controls — Use this when you need to list every form control (checkbox, button, dropdown, list box, option button, scroll bar, spinner, …) with its linked cell and current value.
Auth: Authorization: Bearer <api_key> (required)
file object optional The spreadsheet file, handed off by a host that fills in the OpenAI file-parameter convention (openai/fileParams) from an uploaded or attached file. The server downloads download_url once, server-side; never a local sandbox path.
download_url string required Temporary https URL to download the file. Valid only for this call.
file_id string required Host file identifier.
file_name string optional Original file name (advisory only; never used as a path).
mime_type string optional Declared MIME type (advisory only).
file_b64 string requiredoptions object optionalsheet string optional{
"properties": {
"file": {
"additionalProperties": false,
"description": "The spreadsheet file, handed off by a host that fills in the OpenAI file-parameter convention (openai/fileParams) from an uploaded or attached file. The server downloads download_url once, server-side; never a local sandbox path.",
"properties": {
"download_url": {
"description": "Temporary https URL to download the file. Valid only for this call.",
"maxLength": 8192,
"minLength": 1,
"type": "string"
},
"file_id": {
"description": "Host file identifier.",
"maxLength": 256,
"type": "string"
},
"file_name": {
"description": "Original file name (advisory only; never used as a path).",
"maxLength": 256,
"type": "string"
},
"mime_type": {
"description": "Declared MIME type (advisory only).",
"maxLength": 256,
"type": "string"
}
},
"required": [
"download_url",
"file_id"
],
"type": "object"
},
"file_b64": {
"type": "string"
},
"options": {
"properties": {
"sheet": {
"type": "string"
}
},
"type": "object"
}
},
"required": [
"file_b64"
],
"type": "object"
}REST (curl):
curl -sX POST https://api.xlsx-for-ai.dev/api/v1/tools/xlsx_form_controls \
-H 'content-type: application/json' \
-H 'Authorization: Bearer <api_key>' \
-d '{"file_b64":"<BASE64_ENCODED_FILE_BYTES>"}'MCP (tools/call):
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "xlsx_form_controls",
"arguments": {
"file_url": "https://example.com/placeholder.xlsx"
}
}
}200 — Tool result (base64-in / base64-out; stateless).400 — Bad request. `error.code` is one of: `bad_request` (malformed or oversized JSON body, invalid base64, or a missing/invalid field), `hardening_rejected` (the upload failed an ingest safety guard — e.g. an encrypted workbook, a non-OOXML zip, a truncated file, or a legacy .xls on a route that does not accept it), `unparseable_input` (no readable CSV header row), `malformed_csv` (a structurally broken CSV — an unclosed or mid-field quote), or `unsupported_output_format` (`xlsx_convert` was asked to write old binary .xls — Excel 97-2003 is read-only here; request `xlsx` or `csv`). A sheet- or column-not-found request also carries `available_sheets` / `available_columns`. A `file_url` that could not be fetched keeps `error.code` `bad_request` and adds `error.reason`, one of: `google_not_shared` (a Google link not shared publicly), `url_download_failed_4xx` (the host answered a 4xx: 404 is a dead link, 401/403 a private one), `url_download_failed_5xx`, `url_download_failed_network` (no answer, e.g. DNS), `url_download_timeout`, `url_returned_html` (a web page, not a spreadsheet), `url_empty`, `url_refused`, `url_redirect_blocked` or `file_input_url_not_https`.401 — Missing or invalid API key. `error.code`: `unauthorized`.402 — Payment required. `error.code`: `tier_upgrade_required`. A forward-compatible response for a capability gated to a paid subscription; it is driven by the account/consent surface (POST /api/v1/consent), not by the stateless tool inputs. No action is needed for standard tool calls on the free tier.413 — Payload too large. `error.code`: `file_too_large` (the input exceeds the per-format upload ceiling, or expands past the content-processing ceiling once parsed) or `write_output_too_large` (the requested output would exceed the format write cap). These are capacity ceilings — identical for every caller, never a paywall lever.429 — Free-tier file allowance reached for the current period. `error.code`: `rate_limit_exceeded`.500 — Internal server error — an unexpected fault on our side. `error.code`: `internal_error`.503 — Service temporarily unavailable — retryable; a `Retry-After` header is sent when known. `error.code` is one of: `service_unavailable` (a backing service is down, or parse capacity is momentarily saturated), `rate_limit_backend_unavailable`, or `cache_backend_unavailable`.xlsx_formulasPOST /api/v1/tools/xlsx_formulas — Use this when you need to extract every formula in a workbook — cell coordinate, formula text, cached result — for auditing or bulk transformation.
Auth: Authorization: Bearer <api_key> (required)
file object optional The spreadsheet file, handed off by a host that fills in the OpenAI file-parameter convention (openai/fileParams) from an uploaded or attached file. The server downloads download_url once, server-side; never a local sandbox path.
download_url string required Temporary https URL to download the file. Valid only for this call.
file_id string required Host file identifier.
file_name string optional Original file name (advisory only; never used as a path).
mime_type string optional Declared MIME type (advisory only).
file_b64 string requiredoptions object optionalinclude_results boolean optionallimit integer optional sheet string optional{
"properties": {
"file": {
"additionalProperties": false,
"description": "The spreadsheet file, handed off by a host that fills in the OpenAI file-parameter convention (openai/fileParams) from an uploaded or attached file. The server downloads download_url once, server-side; never a local sandbox path.",
"properties": {
"download_url": {
"description": "Temporary https URL to download the file. Valid only for this call.",
"maxLength": 8192,
"minLength": 1,
"type": "string"
},
"file_id": {
"description": "Host file identifier.",
"maxLength": 256,
"type": "string"
},
"file_name": {
"description": "Original file name (advisory only; never used as a path).",
"maxLength": 256,
"type": "string"
},
"mime_type": {
"description": "Declared MIME type (advisory only).",
"maxLength": 256,
"type": "string"
}
},
"required": [
"download_url",
"file_id"
],
"type": "object"
},
"file_b64": {
"type": "string"
},
"options": {
"properties": {
"include_results": {
"type": "boolean"
},
"limit": {
"maximum": 5000,
"minimum": 1,
"type": "integer"
},
"sheet": {
"type": "string"
}
},
"type": "object"
}
},
"required": [
"file_b64"
],
"type": "object"
}REST (curl):
curl -sX POST https://api.xlsx-for-ai.dev/api/v1/tools/xlsx_formulas \
-H 'content-type: application/json' \
-H 'Authorization: Bearer <api_key>' \
-d '{"file_b64":"<BASE64_ENCODED_FILE_BYTES>"}'MCP (tools/call):
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "xlsx_formulas",
"arguments": {
"file_url": "https://example.com/placeholder.xlsx"
}
}
}200 — Tool result (base64-in / base64-out; stateless).400 — Bad request. `error.code` is one of: `bad_request` (malformed or oversized JSON body, invalid base64, or a missing/invalid field), `hardening_rejected` (the upload failed an ingest safety guard — e.g. an encrypted workbook, a non-OOXML zip, a truncated file, or a legacy .xls on a route that does not accept it), `unparseable_input` (no readable CSV header row), `malformed_csv` (a structurally broken CSV — an unclosed or mid-field quote), or `unsupported_output_format` (`xlsx_convert` was asked to write old binary .xls — Excel 97-2003 is read-only here; request `xlsx` or `csv`). A sheet- or column-not-found request also carries `available_sheets` / `available_columns`. A `file_url` that could not be fetched keeps `error.code` `bad_request` and adds `error.reason`, one of: `google_not_shared` (a Google link not shared publicly), `url_download_failed_4xx` (the host answered a 4xx: 404 is a dead link, 401/403 a private one), `url_download_failed_5xx`, `url_download_failed_network` (no answer, e.g. DNS), `url_download_timeout`, `url_returned_html` (a web page, not a spreadsheet), `url_empty`, `url_refused`, `url_redirect_blocked` or `file_input_url_not_https`.401 — Missing or invalid API key. `error.code`: `unauthorized`.402 — Payment required. `error.code`: `tier_upgrade_required`. A forward-compatible response for a capability gated to a paid subscription; it is driven by the account/consent surface (POST /api/v1/consent), not by the stateless tool inputs. No action is needed for standard tool calls on the free tier.413 — Payload too large. `error.code`: `file_too_large` (the input exceeds the per-format upload ceiling, or expands past the content-processing ceiling once parsed) or `write_output_too_large` (the requested output would exceed the format write cap). These are capacity ceilings — identical for every caller, never a paywall lever.429 — Free-tier file allowance reached for the current period. `error.code`: `rate_limit_exceeded`.500 — Internal server error — an unexpected fault on our side. `error.code`: `internal_error`.503 — Service temporarily unavailable — retryable; a `Retry-After` header is sent when known. `error.code` is one of: `service_unavailable` (a backing service is down, or parse capacity is momentarily saturated), `rate_limit_backend_unavailable`, or `cache_backend_unavailable`.xlsx_healer_curePOST /api/v1/tools/xlsx_healer_cure — Use this when you need to apply one specific repair to a diagnosed workbook. For broken external references: rewrite ref paths, freeze / redirect / localize a deleted source, strip embedded credentials, or collapse multi-hop chains. For Google-Sheets-to-Excel export damage: flag each dead Sheets-only formula with an in-cell note so the loss is visible (it does NOT recompute the function — a Sheets-only function has no Excel equivalent to compute), trim an oversized used-range, and compact repeated formulas into Excel shared-formula form.
Auth: Authorization: Bearer <api_key> (required)
cure_params object optionalfile object optional The spreadsheet file, handed off by a host that fills in the OpenAI file-parameter convention (openai/fileParams) from an uploaded or attached file. The server downloads download_url once, server-side; never a local sandbox path.
download_url string required Temporary https URL to download the file. Valid only for this call.
file_id string required Host file identifier.
file_name string optional Original file name (advisory only; never used as a path).
mime_type string optional Declared MIME type (advisory only).
file_b64 string requiredintent string optionalmode string optional operation string required{
"additionalProperties": false,
"properties": {
"cure_params": {
"type": "object"
},
"file": {
"additionalProperties": false,
"description": "The spreadsheet file, handed off by a host that fills in the OpenAI file-parameter convention (openai/fileParams) from an uploaded or attached file. The server downloads download_url once, server-side; never a local sandbox path.",
"properties": {
"download_url": {
"description": "Temporary https URL to download the file. Valid only for this call.",
"maxLength": 8192,
"minLength": 1,
"type": "string"
},
"file_id": {
"description": "Host file identifier.",
"maxLength": 256,
"type": "string"
},
"file_name": {
"description": "Original file name (advisory only; never used as a path).",
"maxLength": 256,
"type": "string"
},
"mime_type": {
"description": "Declared MIME type (advisory only).",
"maxLength": 256,
"type": "string"
}
},
"required": [
"download_url",
"file_id"
],
"type": "object"
},
"file_b64": {
"type": "string"
},
"intent": {
"type": "string"
},
"mode": {
"enum": [
"as_copy",
"in_place"
],
"type": "string"
},
"operation": {
"type": "string"
}
},
"required": [
"file_b64",
"operation"
],
"type": "object"
}REST (curl):
curl -sX POST https://api.xlsx-for-ai.dev/api/v1/tools/xlsx_healer_cure \
-H 'content-type: application/json' \
-H 'Authorization: Bearer <api_key>' \
-d '{"file_b64":"<BASE64_ENCODED_FILE_BYTES>","operation":"example-value"}'MCP (tools/call):
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "xlsx_healer_cure",
"arguments": {
"operation": "example-value",
"file_url": "https://example.com/placeholder.xlsx"
}
}
}200 — Tool result (base64-in / base64-out; stateless).400 — Bad request. `error.code` is one of: `bad_request` (malformed or oversized JSON body, invalid base64, or a missing/invalid field), `hardening_rejected` (the upload failed an ingest safety guard — e.g. an encrypted workbook, a non-OOXML zip, a truncated file, or a legacy .xls on a route that does not accept it), `unparseable_input` (no readable CSV header row), `malformed_csv` (a structurally broken CSV — an unclosed or mid-field quote), or `unsupported_output_format` (`xlsx_convert` was asked to write old binary .xls — Excel 97-2003 is read-only here; request `xlsx` or `csv`). A sheet- or column-not-found request also carries `available_sheets` / `available_columns`. A `file_url` that could not be fetched keeps `error.code` `bad_request` and adds `error.reason`, one of: `google_not_shared` (a Google link not shared publicly), `url_download_failed_4xx` (the host answered a 4xx: 404 is a dead link, 401/403 a private one), `url_download_failed_5xx`, `url_download_failed_network` (no answer, e.g. DNS), `url_download_timeout`, `url_returned_html` (a web page, not a spreadsheet), `url_empty`, `url_refused`, `url_redirect_blocked` or `file_input_url_not_https`.401 — Missing or invalid API key. `error.code`: `unauthorized`.402 — Payment required. `error.code`: `tier_upgrade_required`. A forward-compatible response for a capability gated to a paid subscription; it is driven by the account/consent surface (POST /api/v1/consent), not by the stateless tool inputs. No action is needed for standard tool calls on the free tier.413 — Payload too large. `error.code`: `file_too_large` (the input exceeds the per-format upload ceiling, or expands past the content-processing ceiling once parsed) or `write_output_too_large` (the requested output would exceed the format write cap). These are capacity ceilings — identical for every caller, never a paywall lever.429 — Free-tier file allowance reached for the current period. `error.code`: `rate_limit_exceeded`.500 — Internal server error — an unexpected fault on our side. `error.code`: `internal_error`.503 — Service temporarily unavailable — retryable; a `Retry-After` header is sent when known. `error.code` is one of: `service_unavailable` (a backing service is down, or parse capacity is momentarily saturated), `rate_limit_backend_unavailable`, or `cache_backend_unavailable`.xlsx_healer_diagnosePOST /api/v1/tools/xlsx_healer_diagnose — Use this when you need to produce a structured report of repairable damage in a workbook, keyed to the cure operations. Two families: (1) broken or at-risk external references — moved, deleted, or permission-denied sources and #REF! chains; (2) Google-Sheets-to-Excel export damage — Sheets-only functions such as QUERY, ARRAYFORMULA, IMPORTRANGE, or GOOGLEFINANCE that Excel cannot evaluate and that arrive as dead formula text or a #NAME? error (surfaced as an unverified value to double-check), an oversized used-range, and repeated formulas left un-compacted. Every finding is reported, not altered in place.
Auth: Authorization: Bearer <api_key> (required)
file object optional The spreadsheet file, handed off by a host that fills in the OpenAI file-parameter convention (openai/fileParams) from an uploaded or attached file. The server downloads download_url once, server-side; never a local sandbox path.
download_url string required Temporary https URL to download the file. Valid only for this call.
file_id string required Host file identifier.
file_name string optional Original file name (advisory only; never used as a path).
mime_type string optional Declared MIME type (advisory only).
file_b64 string required{
"additionalProperties": false,
"properties": {
"file": {
"additionalProperties": false,
"description": "The spreadsheet file, handed off by a host that fills in the OpenAI file-parameter convention (openai/fileParams) from an uploaded or attached file. The server downloads download_url once, server-side; never a local sandbox path.",
"properties": {
"download_url": {
"description": "Temporary https URL to download the file. Valid only for this call.",
"maxLength": 8192,
"minLength": 1,
"type": "string"
},
"file_id": {
"description": "Host file identifier.",
"maxLength": 256,
"type": "string"
},
"file_name": {
"description": "Original file name (advisory only; never used as a path).",
"maxLength": 256,
"type": "string"
},
"mime_type": {
"description": "Declared MIME type (advisory only).",
"maxLength": 256,
"type": "string"
}
},
"required": [
"download_url",
"file_id"
],
"type": "object"
},
"file_b64": {
"type": "string"
}
},
"required": [
"file_b64"
],
"type": "object"
}REST (curl):
curl -sX POST https://api.xlsx-for-ai.dev/api/v1/tools/xlsx_healer_diagnose \
-H 'content-type: application/json' \
-H 'Authorization: Bearer <api_key>' \
-d '{"file_b64":"<BASE64_ENCODED_FILE_BYTES>"}'MCP (tools/call):
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "xlsx_healer_diagnose",
"arguments": {
"file_url": "https://example.com/placeholder.xlsx"
}
}
}200 — Tool result (base64-in / base64-out; stateless).400 — Bad request. `error.code` is one of: `bad_request` (malformed or oversized JSON body, invalid base64, or a missing/invalid field), `hardening_rejected` (the upload failed an ingest safety guard — e.g. an encrypted workbook, a non-OOXML zip, a truncated file, or a legacy .xls on a route that does not accept it), `unparseable_input` (no readable CSV header row), `malformed_csv` (a structurally broken CSV — an unclosed or mid-field quote), or `unsupported_output_format` (`xlsx_convert` was asked to write old binary .xls — Excel 97-2003 is read-only here; request `xlsx` or `csv`). A sheet- or column-not-found request also carries `available_sheets` / `available_columns`. A `file_url` that could not be fetched keeps `error.code` `bad_request` and adds `error.reason`, one of: `google_not_shared` (a Google link not shared publicly), `url_download_failed_4xx` (the host answered a 4xx: 404 is a dead link, 401/403 a private one), `url_download_failed_5xx`, `url_download_failed_network` (no answer, e.g. DNS), `url_download_timeout`, `url_returned_html` (a web page, not a spreadsheet), `url_empty`, `url_refused`, `url_redirect_blocked` or `file_input_url_not_https`.401 — Missing or invalid API key. `error.code`: `unauthorized`.402 — Payment required. `error.code`: `tier_upgrade_required`. A forward-compatible response for a capability gated to a paid subscription; it is driven by the account/consent surface (POST /api/v1/consent), not by the stateless tool inputs. No action is needed for standard tool calls on the free tier.413 — Payload too large. `error.code`: `file_too_large` (the input exceeds the per-format upload ceiling, or expands past the content-processing ceiling once parsed) or `write_output_too_large` (the requested output would exceed the format write cap). These are capacity ceilings — identical for every caller, never a paywall lever.429 — Free-tier file allowance reached for the current period. `error.code`: `rate_limit_exceeded`.500 — Internal server error — an unexpected fault on our side. `error.code`: `internal_error`.503 — Service temporarily unavailable — retryable; a `Retry-After` header is sent when known. `error.code` is one of: `service_unavailable` (a backing service is down, or parse capacity is momentarily saturated), `rate_limit_backend_unavailable`, or `cache_backend_unavailable`.xlsx_healer_intentPOST /api/v1/tools/xlsx_healer_intent — Use this when you need goal-driven healing: declare an intent (make-it-work / make-standalone / migrate) and let the healer plan + apply the operation sequence.
Auth: Authorization: Bearer <api_key> (required)
confirm boolean optionalfile object optional The spreadsheet file, handed off by a host that fills in the OpenAI file-parameter convention (openai/fileParams) from an uploaded or attached file. The server downloads download_url once, server-side; never a local sandbox path.
download_url string required Temporary https URL to download the file. Valid only for this call.
file_id string required Host file identifier.
file_name string optional Original file name (advisory only; never used as a path).
mime_type string optional Declared MIME type (advisory only).
file_b64 string requiredintent string requiredintent_params object optional from string optionalto string optionalmode string optional operation string optional{
"additionalProperties": false,
"properties": {
"confirm": {
"type": "boolean"
},
"file": {
"additionalProperties": false,
"description": "The spreadsheet file, handed off by a host that fills in the OpenAI file-parameter convention (openai/fileParams) from an uploaded or attached file. The server downloads download_url once, server-side; never a local sandbox path.",
"properties": {
"download_url": {
"description": "Temporary https URL to download the file. Valid only for this call.",
"maxLength": 8192,
"minLength": 1,
"type": "string"
},
"file_id": {
"description": "Host file identifier.",
"maxLength": 256,
"type": "string"
},
"file_name": {
"description": "Original file name (advisory only; never used as a path).",
"maxLength": 256,
"type": "string"
},
"mime_type": {
"description": "Declared MIME type (advisory only).",
"maxLength": 256,
"type": "string"
}
},
"required": [
"download_url",
"file_id"
],
"type": "object"
},
"file_b64": {
"type": "string"
},
"intent": {
"type": "string"
},
"intent_params": {
"additionalProperties": false,
"properties": {
"from": {
"type": "string"
},
"to": {
"type": "string"
}
},
"type": "object"
},
"mode": {
"enum": [
"as_copy",
"in_place"
],
"type": "string"
},
"operation": {
"type": "string"
}
},
"required": [
"file_b64",
"intent"
],
"type": "object"
}REST (curl):
curl -sX POST https://api.xlsx-for-ai.dev/api/v1/tools/xlsx_healer_intent \
-H 'content-type: application/json' \
-H 'Authorization: Bearer <api_key>' \
-d '{"file_b64":"<BASE64_ENCODED_FILE_BYTES>","intent":"example-value"}'MCP (tools/call):
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "xlsx_healer_intent",
"arguments": {
"intent": "example-value",
"file_url": "https://example.com/placeholder.xlsx"
}
}
}200 — Tool result (base64-in / base64-out; stateless).400 — Bad request. `error.code` is one of: `bad_request` (malformed or oversized JSON body, invalid base64, or a missing/invalid field), `hardening_rejected` (the upload failed an ingest safety guard — e.g. an encrypted workbook, a non-OOXML zip, a truncated file, or a legacy .xls on a route that does not accept it), `unparseable_input` (no readable CSV header row), `malformed_csv` (a structurally broken CSV — an unclosed or mid-field quote), or `unsupported_output_format` (`xlsx_convert` was asked to write old binary .xls — Excel 97-2003 is read-only here; request `xlsx` or `csv`). A sheet- or column-not-found request also carries `available_sheets` / `available_columns`. A `file_url` that could not be fetched keeps `error.code` `bad_request` and adds `error.reason`, one of: `google_not_shared` (a Google link not shared publicly), `url_download_failed_4xx` (the host answered a 4xx: 404 is a dead link, 401/403 a private one), `url_download_failed_5xx`, `url_download_failed_network` (no answer, e.g. DNS), `url_download_timeout`, `url_returned_html` (a web page, not a spreadsheet), `url_empty`, `url_refused`, `url_redirect_blocked` or `file_input_url_not_https`.401 — Missing or invalid API key. `error.code`: `unauthorized`.402 — Payment required. `error.code`: `tier_upgrade_required`. A forward-compatible response for a capability gated to a paid subscription; it is driven by the account/consent surface (POST /api/v1/consent), not by the stateless tool inputs. No action is needed for standard tool calls on the free tier.413 — Payload too large. `error.code`: `file_too_large` (the input exceeds the per-format upload ceiling, or expands past the content-processing ceiling once parsed) or `write_output_too_large` (the requested output would exceed the format write cap). These are capacity ceilings — identical for every caller, never a paywall lever.429 — Free-tier file allowance reached for the current period. `error.code`: `rate_limit_exceeded`.500 — Internal server error — an unexpected fault on our side. `error.code`: `internal_error`.503 — Service temporarily unavailable — retryable; a `Retry-After` header is sent when known. `error.code` is one of: `service_unavailable` (a backing service is down, or parse capacity is momentarily saturated), `rate_limit_backend_unavailable`, or `cache_backend_unavailable`.xlsx_healer_simulatePOST /api/v1/tools/xlsx_healer_simulate — Use this when you need to simulate recipient-side accessibility of a workbook's external references — read-only, no output workbook.
Auth: Authorization: Bearer <api_key> (required)
accessible_paths array required file object optional The spreadsheet file, handed off by a host that fills in the OpenAI file-parameter convention (openai/fileParams) from an uploaded or attached file. The server downloads download_url once, server-side; never a local sandbox path.
download_url string required Temporary https URL to download the file. Valid only for this call.
file_id string required Host file identifier.
file_name string optional Original file name (advisory only; never used as a path).
mime_type string optional Declared MIME type (advisory only).
file_b64 string required{
"additionalProperties": false,
"properties": {
"accessible_paths": {
"items": {
"type": "string"
},
"maxItems": 1000,
"type": "array"
},
"file": {
"additionalProperties": false,
"description": "The spreadsheet file, handed off by a host that fills in the OpenAI file-parameter convention (openai/fileParams) from an uploaded or attached file. The server downloads download_url once, server-side; never a local sandbox path.",
"properties": {
"download_url": {
"description": "Temporary https URL to download the file. Valid only for this call.",
"maxLength": 8192,
"minLength": 1,
"type": "string"
},
"file_id": {
"description": "Host file identifier.",
"maxLength": 256,
"type": "string"
},
"file_name": {
"description": "Original file name (advisory only; never used as a path).",
"maxLength": 256,
"type": "string"
},
"mime_type": {
"description": "Declared MIME type (advisory only).",
"maxLength": 256,
"type": "string"
}
},
"required": [
"download_url",
"file_id"
],
"type": "object"
},
"file_b64": {
"type": "string"
}
},
"required": [
"accessible_paths",
"file_b64"
],
"type": "object"
}REST (curl):
curl -sX POST https://api.xlsx-for-ai.dev/api/v1/tools/xlsx_healer_simulate \
-H 'content-type: application/json' \
-H 'Authorization: Bearer <api_key>' \
-d '{"accessible_paths":["example-value"],"file_b64":"<BASE64_ENCODED_FILE_BYTES>"}'MCP (tools/call):
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "xlsx_healer_simulate",
"arguments": {
"accessible_paths": [
"example-value"
],
"file_url": "https://example.com/placeholder.xlsx"
}
}
}200 — Tool result (base64-in / base64-out; stateless).400 — Bad request. `error.code` is one of: `bad_request` (malformed or oversized JSON body, invalid base64, or a missing/invalid field), `hardening_rejected` (the upload failed an ingest safety guard — e.g. an encrypted workbook, a non-OOXML zip, a truncated file, or a legacy .xls on a route that does not accept it), `unparseable_input` (no readable CSV header row), `malformed_csv` (a structurally broken CSV — an unclosed or mid-field quote), or `unsupported_output_format` (`xlsx_convert` was asked to write old binary .xls — Excel 97-2003 is read-only here; request `xlsx` or `csv`). A sheet- or column-not-found request also carries `available_sheets` / `available_columns`. A `file_url` that could not be fetched keeps `error.code` `bad_request` and adds `error.reason`, one of: `google_not_shared` (a Google link not shared publicly), `url_download_failed_4xx` (the host answered a 4xx: 404 is a dead link, 401/403 a private one), `url_download_failed_5xx`, `url_download_failed_network` (no answer, e.g. DNS), `url_download_timeout`, `url_returned_html` (a web page, not a spreadsheet), `url_empty`, `url_refused`, `url_redirect_blocked` or `file_input_url_not_https`.401 — Missing or invalid API key. `error.code`: `unauthorized`.402 — Payment required. `error.code`: `tier_upgrade_required`. A forward-compatible response for a capability gated to a paid subscription; it is driven by the account/consent surface (POST /api/v1/consent), not by the stateless tool inputs. No action is needed for standard tool calls on the free tier.413 — Payload too large. `error.code`: `file_too_large` (the input exceeds the per-format upload ceiling, or expands past the content-processing ceiling once parsed) or `write_output_too_large` (the requested output would exceed the format write cap). These are capacity ceilings — identical for every caller, never a paywall lever.429 — Free-tier file allowance reached for the current period. `error.code`: `rate_limit_exceeded`.500 — Internal server error — an unexpected fault on our side. `error.code`: `internal_error`.503 — Service temporarily unavailable — retryable; a `Retry-After` header is sent when known. `error.code` is one of: `service_unavailable` (a backing service is down, or parse capacity is momentarily saturated), `rate_limit_backend_unavailable`, or `cache_backend_unavailable`.xlsx_hyperlinksPOST /api/v1/tools/xlsx_hyperlinks — Use this when you need to list every hyperlink with its anchor cell, target, display text, tooltip, and a kind classifier (external / internal / mailto).
Auth: Authorization: Bearer <api_key> (required)
file object optional The spreadsheet file, handed off by a host that fills in the OpenAI file-parameter convention (openai/fileParams) from an uploaded or attached file. The server downloads download_url once, server-side; never a local sandbox path.
download_url string required Temporary https URL to download the file. Valid only for this call.
file_id string required Host file identifier.
file_name string optional Original file name (advisory only; never used as a path).
mime_type string optional Declared MIME type (advisory only).
file_b64 string optionalSend exactly one file source: file_b64 (this field), file_url, file_handle, or file_text together with file_name.
file_handle string optional Handle returned by xlsx_upload_link, once the user has uploaded the spreadsheet file on that page. Use this when the user attached the file in chat or has no link. Provide this OR file_url.
file_name string optional File name with its extension (.csv, .tsv or .json), used with file_text.
file_sha256 string optional Hex SHA-256 of the exact file_text UTF-8 text. Optional; checked when given.
file_text string optional Use only for a small CSV, TSV or JSON file whose full text you already have. Practical limit about 2,000 cells or 40 KB (the server hard cap is 256 KB); above that use file_url, or xlsx_upload_link and file_handle. Requires file_name. Never encode or retype a binary file by hand. Provide this OR file_url OR file_handle.
file_url string optional https URL of the spreadsheet file (e.g. a shared Google Drive, Google Sheets, Dropbox, OneDrive or S3 link; must be viewable by anyone with the link). The server downloads it directly. Provide this OR file_handle.
options object optionallimit integer optional sheet string optional{
"properties": {
"file": {
"additionalProperties": false,
"description": "The spreadsheet file, handed off by a host that fills in the OpenAI file-parameter convention (openai/fileParams) from an uploaded or attached file. The server downloads download_url once, server-side; never a local sandbox path.",
"properties": {
"download_url": {
"description": "Temporary https URL to download the file. Valid only for this call.",
"maxLength": 8192,
"minLength": 1,
"type": "string"
},
"file_id": {
"description": "Host file identifier.",
"maxLength": 256,
"type": "string"
},
"file_name": {
"description": "Original file name (advisory only; never used as a path).",
"maxLength": 256,
"type": "string"
},
"mime_type": {
"description": "Declared MIME type (advisory only).",
"maxLength": 256,
"type": "string"
}
},
"required": [
"download_url",
"file_id"
],
"type": "object"
},
"file_b64": {
"description": "Send exactly one file source: file_b64 (this field), file_url, file_handle, or file_text together with file_name.",
"type": "string"
},
"file_handle": {
"description": "Handle returned by xlsx_upload_link, once the user has uploaded the spreadsheet file on that page. Use this when the user attached the file in chat or has no link. Provide this OR file_url.",
"maxLength": 128,
"minLength": 1,
"type": "string"
},
"file_name": {
"description": "File name with its extension (.csv, .tsv or .json), used with file_text.",
"maxLength": 200,
"minLength": 1,
"type": "string"
},
"file_sha256": {
"description": "Hex SHA-256 of the exact file_text UTF-8 text. Optional; checked when given.",
"maxLength": 64,
"minLength": 64,
"type": "string"
},
"file_text": {
"description": "Use only for a small CSV, TSV or JSON file whose full text you already have. Practical limit about 2,000 cells or 40 KB (the server hard cap is 256 KB); above that use file_url, or xlsx_upload_link and file_handle. Requires file_name. Never encode or retype a binary file by hand. Provide this OR file_url OR file_handle.",
"maxLength": 262144,
"minLength": 1,
"type": "string"
},
"file_url": {
"description": "https URL of the spreadsheet file (e.g. a shared Google Drive, Google Sheets, Dropbox, OneDrive or S3 link; must be viewable by anyone with the link). The server downloads it directly. Provide this OR file_handle.",
"maxLength": 8192,
"minLength": 1,
"type": "string"
},
"options": {
"properties": {
"limit": {
"maximum": 5000,
"minimum": 1,
"type": "integer"
},
"sheet": {
"type": "string"
}
},
"type": "object"
}
},
"required": [],
"type": "object",
"oneOf": [
{
"required": [
"file_b64"
]
},
{
"required": [
"file_url"
]
},
{
"required": [
"file_handle"
]
},
{
"required": [
"file_text",
"file_name"
]
},
{
"required": [
"file"
]
}
]
}REST (curl):
curl -sX POST https://api.xlsx-for-ai.dev/api/v1/tools/xlsx_hyperlinks \
-H 'content-type: application/json' \
-H 'Authorization: Bearer <api_key>' \
-d '{"file_b64":"<BASE64_ENCODED_FILE_BYTES>"}'MCP (tools/call):
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "xlsx_hyperlinks",
"arguments": {
"file_url": "https://example.com/placeholder.xlsx"
}
}
}200 — Tool result (base64-in / base64-out; stateless). A `file_text` whose `file_name` ends in .xlsx, .xlsm, .xls, .xlsb, .ods, .xltx, .xltm or .xlam computes nothing: the reply is still 200, with `status` `workbook_text_retired`, `computed` false, `upload_url` (send the file there with one PUT), `upload_page` (the page a person opens to drop the file in), `file_handle` (pass it to the same tool once the file is uploaded) and `expires_at`. A text copy loses defined names, styles, merged cells, validations and macros, so a workbook is never sent as text.400 — Bad request. `error.code` is one of: `bad_request` (malformed or oversized JSON body, invalid base64, or a missing/invalid field), `hardening_rejected` (the upload failed an ingest safety guard — e.g. an encrypted workbook, a non-OOXML zip, a truncated file, or a legacy .xls on a route that does not accept it), `unparseable_input` (no readable CSV header row), `malformed_csv` (a structurally broken CSV — an unclosed or mid-field quote), or `unsupported_output_format` (`xlsx_convert` was asked to write old binary .xls — Excel 97-2003 is read-only here; request `xlsx` or `csv`). A sheet- or column-not-found request also carries `available_sheets` / `available_columns`. A `file_url` that could not be fetched keeps `error.code` `bad_request` and adds `error.reason`, one of: `google_not_shared` (a Google link not shared publicly), `url_download_failed_4xx` (the host answered a 4xx: 404 is a dead link, 401/403 a private one), `url_download_failed_5xx`, `url_download_failed_network` (no answer, e.g. DNS), `url_download_timeout`, `url_returned_html` (a web page, not a spreadsheet), `url_empty`, `url_refused`, `url_redirect_blocked` or `file_input_url_not_https`.401 — Missing or invalid API key. `error.code`: `unauthorized`.402 — Payment required. `error.code`: `tier_upgrade_required`. A forward-compatible response for a capability gated to a paid subscription; it is driven by the account/consent surface (POST /api/v1/consent), not by the stateless tool inputs. No action is needed for standard tool calls on the free tier.413 — Payload too large. `error.code`: `file_too_large` (the input exceeds the per-format upload ceiling, or expands past the content-processing ceiling once parsed) or `write_output_too_large` (the requested output would exceed the format write cap). These are capacity ceilings — identical for every caller, never a paywall lever.429 — Free-tier file allowance reached for the current period. `error.code`: `rate_limit_exceeded`.500 — Internal server error — an unexpected fault on our side. `error.code`: `internal_error`.503 — Service temporarily unavailable — retryable; a `Retry-After` header is sent when known. `error.code` is one of: `service_unavailable` (a backing service is down, or parse capacity is momentarily saturated), `rate_limit_backend_unavailable`, or `cache_backend_unavailable`.xlsx_imagesPOST /api/v1/tools/xlsx_images — Use this when you need to list every embedded image with format, size, sheet attribution, and the cell range it floats over.
Auth: Authorization: Bearer <api_key> (required)
file object optional The spreadsheet file, handed off by a host that fills in the OpenAI file-parameter convention (openai/fileParams) from an uploaded or attached file. The server downloads download_url once, server-side; never a local sandbox path.
download_url string required Temporary https URL to download the file. Valid only for this call.
file_id string required Host file identifier.
file_name string optional Original file name (advisory only; never used as a path).
mime_type string optional Declared MIME type (advisory only).
file_b64 string requiredoptions object optionallimit integer optional sheet string optional{
"properties": {
"file": {
"additionalProperties": false,
"description": "The spreadsheet file, handed off by a host that fills in the OpenAI file-parameter convention (openai/fileParams) from an uploaded or attached file. The server downloads download_url once, server-side; never a local sandbox path.",
"properties": {
"download_url": {
"description": "Temporary https URL to download the file. Valid only for this call.",
"maxLength": 8192,
"minLength": 1,
"type": "string"
},
"file_id": {
"description": "Host file identifier.",
"maxLength": 256,
"type": "string"
},
"file_name": {
"description": "Original file name (advisory only; never used as a path).",
"maxLength": 256,
"type": "string"
},
"mime_type": {
"description": "Declared MIME type (advisory only).",
"maxLength": 256,
"type": "string"
}
},
"required": [
"download_url",
"file_id"
],
"type": "object"
},
"file_b64": {
"type": "string"
},
"options": {
"properties": {
"limit": {
"maximum": 1000,
"minimum": 1,
"type": "integer"
},
"sheet": {
"type": "string"
}
},
"type": "object"
}
},
"required": [
"file_b64"
],
"type": "object"
}REST (curl):
curl -sX POST https://api.xlsx-for-ai.dev/api/v1/tools/xlsx_images \
-H 'content-type: application/json' \
-H 'Authorization: Bearer <api_key>' \
-d '{"file_b64":"<BASE64_ENCODED_FILE_BYTES>"}'MCP (tools/call):
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "xlsx_images",
"arguments": {
"file_url": "https://example.com/placeholder.xlsx"
}
}
}200 — Tool result (base64-in / base64-out; stateless).400 — Bad request. `error.code` is one of: `bad_request` (malformed or oversized JSON body, invalid base64, or a missing/invalid field), `hardening_rejected` (the upload failed an ingest safety guard — e.g. an encrypted workbook, a non-OOXML zip, a truncated file, or a legacy .xls on a route that does not accept it), `unparseable_input` (no readable CSV header row), `malformed_csv` (a structurally broken CSV — an unclosed or mid-field quote), or `unsupported_output_format` (`xlsx_convert` was asked to write old binary .xls — Excel 97-2003 is read-only here; request `xlsx` or `csv`). A sheet- or column-not-found request also carries `available_sheets` / `available_columns`. A `file_url` that could not be fetched keeps `error.code` `bad_request` and adds `error.reason`, one of: `google_not_shared` (a Google link not shared publicly), `url_download_failed_4xx` (the host answered a 4xx: 404 is a dead link, 401/403 a private one), `url_download_failed_5xx`, `url_download_failed_network` (no answer, e.g. DNS), `url_download_timeout`, `url_returned_html` (a web page, not a spreadsheet), `url_empty`, `url_refused`, `url_redirect_blocked` or `file_input_url_not_https`.401 — Missing or invalid API key. `error.code`: `unauthorized`.402 — Payment required. `error.code`: `tier_upgrade_required`. A forward-compatible response for a capability gated to a paid subscription; it is driven by the account/consent surface (POST /api/v1/consent), not by the stateless tool inputs. No action is needed for standard tool calls on the free tier.413 — Payload too large. `error.code`: `file_too_large` (the input exceeds the per-format upload ceiling, or expands past the content-processing ceiling once parsed) or `write_output_too_large` (the requested output would exceed the format write cap). These are capacity ceilings — identical for every caller, never a paywall lever.429 — Free-tier file allowance reached for the current period. `error.code`: `rate_limit_exceeded`.500 — Internal server error — an unexpected fault on our side. `error.code`: `internal_error`.503 — Service temporarily unavailable — retryable; a `Retry-After` header is sent when known. `error.code` is one of: `service_unavailable` (a backing service is down, or parse capacity is momentarily saturated), `rate_limit_backend_unavailable`, or `cache_backend_unavailable`.xlsx_list_sheetsPOST /api/v1/tools/xlsx_list_sheets — Use this when you need to list every sheet in a spreadsheet with its name, dimensions, and visibility.
Auth: Authorization: Bearer <api_key> (required)
file_b64 string optionalSend exactly one file source: file_b64 (this field), file_url, file_handle, or file_text together with file_name.
file_handle string optional Handle returned by xlsx_upload_link, once the user has uploaded the spreadsheet file on that page. Use this when the user attached the file in chat or has no link. Provide this OR file_url.
file_name string optional File name with its extension (.csv, .tsv or .json), used with file_text.
file_sha256 string optional Hex SHA-256 of the exact file_text UTF-8 text. Optional; checked when given.
file_text string optional Use only for a small CSV, TSV or JSON file whose full text you already have. Practical limit about 2,000 cells or 40 KB (the server hard cap is 256 KB); above that use file_url, or xlsx_upload_link and file_handle. Requires file_name. Never encode or retype a binary file by hand. Provide this OR file_url OR file_handle.
file_url string optional https URL of the spreadsheet file (e.g. a shared Google Drive, Google Sheets, Dropbox, OneDrive or S3 link; must be viewable by anyone with the link). The server downloads it directly. Provide this OR file_handle.
{
"properties": {
"file_b64": {
"description": "Send exactly one file source: file_b64 (this field), file_url, file_handle, or file_text together with file_name.",
"type": "string"
},
"file_handle": {
"description": "Handle returned by xlsx_upload_link, once the user has uploaded the spreadsheet file on that page. Use this when the user attached the file in chat or has no link. Provide this OR file_url.",
"maxLength": 128,
"minLength": 1,
"type": "string"
},
"file_name": {
"description": "File name with its extension (.csv, .tsv or .json), used with file_text.",
"maxLength": 200,
"minLength": 1,
"type": "string"
},
"file_sha256": {
"description": "Hex SHA-256 of the exact file_text UTF-8 text. Optional; checked when given.",
"maxLength": 64,
"minLength": 64,
"type": "string"
},
"file_text": {
"description": "Use only for a small CSV, TSV or JSON file whose full text you already have. Practical limit about 2,000 cells or 40 KB (the server hard cap is 256 KB); above that use file_url, or xlsx_upload_link and file_handle. Requires file_name. Never encode or retype a binary file by hand. Provide this OR file_url OR file_handle.",
"maxLength": 262144,
"minLength": 1,
"type": "string"
},
"file_url": {
"description": "https URL of the spreadsheet file (e.g. a shared Google Drive, Google Sheets, Dropbox, OneDrive or S3 link; must be viewable by anyone with the link). The server downloads it directly. Provide this OR file_handle.",
"maxLength": 8192,
"minLength": 1,
"type": "string"
}
},
"required": [],
"type": "object",
"oneOf": [
{
"required": [
"file_b64"
]
},
{
"required": [
"file_url"
]
},
{
"required": [
"file_handle"
]
},
{
"required": [
"file_text",
"file_name"
]
}
]
}REST (curl):
curl -sX POST https://api.xlsx-for-ai.dev/api/v1/tools/xlsx_list_sheets \
-H 'content-type: application/json' \
-H 'Authorization: Bearer <api_key>' \
-d '{"file_b64":"<BASE64_ENCODED_FILE_BYTES>"}'MCP (tools/call):
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "xlsx_list_sheets",
"arguments": {
"file_url": "https://example.com/placeholder.xlsx"
}
}
}200 — Tool result (base64-in / base64-out; stateless). A `file_text` whose `file_name` ends in .xlsx, .xlsm, .xls, .xlsb, .ods, .xltx, .xltm or .xlam computes nothing: the reply is still 200, with `status` `workbook_text_retired`, `computed` false, `upload_url` (send the file there with one PUT), `upload_page` (the page a person opens to drop the file in), `file_handle` (pass it to the same tool once the file is uploaded) and `expires_at`. A text copy loses defined names, styles, merged cells, validations and macros, so a workbook is never sent as text.400 — Bad request. `error.code` is one of: `bad_request` (malformed or oversized JSON body, invalid base64, or a missing/invalid field), `hardening_rejected` (the upload failed an ingest safety guard — e.g. an encrypted workbook, a non-OOXML zip, a truncated file, or a legacy .xls on a route that does not accept it), `unparseable_input` (no readable CSV header row), `malformed_csv` (a structurally broken CSV — an unclosed or mid-field quote), or `unsupported_output_format` (`xlsx_convert` was asked to write old binary .xls — Excel 97-2003 is read-only here; request `xlsx` or `csv`). A sheet- or column-not-found request also carries `available_sheets` / `available_columns`. A `file_url` that could not be fetched keeps `error.code` `bad_request` and adds `error.reason`, one of: `google_not_shared` (a Google link not shared publicly), `url_download_failed_4xx` (the host answered a 4xx: 404 is a dead link, 401/403 a private one), `url_download_failed_5xx`, `url_download_failed_network` (no answer, e.g. DNS), `url_download_timeout`, `url_returned_html` (a web page, not a spreadsheet), `url_empty`, `url_refused`, `url_redirect_blocked` or `file_input_url_not_https`.401 — Missing or invalid API key. `error.code`: `unauthorized`.402 — Payment required. `error.code`: `tier_upgrade_required`. A forward-compatible response for a capability gated to a paid subscription; it is driven by the account/consent surface (POST /api/v1/consent), not by the stateless tool inputs. No action is needed for standard tool calls on the free tier.413 — Payload too large. `error.code`: `file_too_large` (the input exceeds the per-format upload ceiling, or expands past the content-processing ceiling once parsed) or `write_output_too_large` (the requested output would exceed the format write cap). These are capacity ceilings — identical for every caller, never a paywall lever.429 — Free-tier file allowance reached for the current period. `error.code`: `rate_limit_exceeded`.500 — Internal server error — an unexpected fault on our side. `error.code`: `internal_error`.503 — Service temporarily unavailable — retryable; a `Retry-After` header is sent when known. `error.code` is one of: `service_unavailable` (a backing service is down, or parse capacity is momentarily saturated), `rate_limit_backend_unavailable`, or `cache_backend_unavailable`.xlsx_macrosPOST /api/v1/tools/xlsx_macros — Use this when you need to inspect an xlsm/xlsb workbook for VBA macro presence, module size, and likely module names, with a short safety note.
Auth: Authorization: Bearer <api_key> (required)
file object optional The spreadsheet file, handed off by a host that fills in the OpenAI file-parameter convention (openai/fileParams) from an uploaded or attached file. The server downloads download_url once, server-side; never a local sandbox path.
download_url string required Temporary https URL to download the file. Valid only for this call.
file_id string required Host file identifier.
file_name string optional Original file name (advisory only; never used as a path).
mime_type string optional Declared MIME type (advisory only).
file_b64 string required{
"properties": {
"file": {
"additionalProperties": false,
"description": "The spreadsheet file, handed off by a host that fills in the OpenAI file-parameter convention (openai/fileParams) from an uploaded or attached file. The server downloads download_url once, server-side; never a local sandbox path.",
"properties": {
"download_url": {
"description": "Temporary https URL to download the file. Valid only for this call.",
"maxLength": 8192,
"minLength": 1,
"type": "string"
},
"file_id": {
"description": "Host file identifier.",
"maxLength": 256,
"type": "string"
},
"file_name": {
"description": "Original file name (advisory only; never used as a path).",
"maxLength": 256,
"type": "string"
},
"mime_type": {
"description": "Declared MIME type (advisory only).",
"maxLength": 256,
"type": "string"
}
},
"required": [
"download_url",
"file_id"
],
"type": "object"
},
"file_b64": {
"type": "string"
}
},
"required": [
"file_b64"
],
"type": "object"
}REST (curl):
curl -sX POST https://api.xlsx-for-ai.dev/api/v1/tools/xlsx_macros \
-H 'content-type: application/json' \
-H 'Authorization: Bearer <api_key>' \
-d '{"file_b64":"<BASE64_ENCODED_FILE_BYTES>"}'MCP (tools/call):
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "xlsx_macros",
"arguments": {
"file_url": "https://example.com/placeholder.xlsx"
}
}
}200 — Tool result (base64-in / base64-out; stateless).400 — Bad request. `error.code` is one of: `bad_request` (malformed or oversized JSON body, invalid base64, or a missing/invalid field), `hardening_rejected` (the upload failed an ingest safety guard — e.g. an encrypted workbook, a non-OOXML zip, a truncated file, or a legacy .xls on a route that does not accept it), `unparseable_input` (no readable CSV header row), `malformed_csv` (a structurally broken CSV — an unclosed or mid-field quote), or `unsupported_output_format` (`xlsx_convert` was asked to write old binary .xls — Excel 97-2003 is read-only here; request `xlsx` or `csv`). A sheet- or column-not-found request also carries `available_sheets` / `available_columns`. A `file_url` that could not be fetched keeps `error.code` `bad_request` and adds `error.reason`, one of: `google_not_shared` (a Google link not shared publicly), `url_download_failed_4xx` (the host answered a 4xx: 404 is a dead link, 401/403 a private one), `url_download_failed_5xx`, `url_download_failed_network` (no answer, e.g. DNS), `url_download_timeout`, `url_returned_html` (a web page, not a spreadsheet), `url_empty`, `url_refused`, `url_redirect_blocked` or `file_input_url_not_https`.401 — Missing or invalid API key. `error.code`: `unauthorized`.402 — Payment required. `error.code`: `tier_upgrade_required`. A forward-compatible response for a capability gated to a paid subscription; it is driven by the account/consent surface (POST /api/v1/consent), not by the stateless tool inputs. No action is needed for standard tool calls on the free tier.413 — Payload too large. `error.code`: `file_too_large` (the input exceeds the per-format upload ceiling, or expands past the content-processing ceiling once parsed) or `write_output_too_large` (the requested output would exceed the format write cap). These are capacity ceilings — identical for every caller, never a paywall lever.429 — Free-tier file allowance reached for the current period. `error.code`: `rate_limit_exceeded`.500 — Internal server error — an unexpected fault on our side. `error.code`: `internal_error`.503 — Service temporarily unavailable — retryable; a `Retry-After` header is sent when known. `error.code` is one of: `service_unavailable` (a backing service is down, or parse capacity is momentarily saturated), `rate_limit_backend_unavailable`, or `cache_backend_unavailable`.xlsx_merged_cellsPOST /api/v1/tools/xlsx_merged_cells — Use this when you need to list every merged-cell region with its master value, range, and a layout-kind heuristic (header / horizontal / vertical / block).
Auth: Authorization: Bearer <api_key> (required)
file object optional The spreadsheet file, handed off by a host that fills in the OpenAI file-parameter convention (openai/fileParams) from an uploaded or attached file. The server downloads download_url once, server-side; never a local sandbox path.
download_url string required Temporary https URL to download the file. Valid only for this call.
file_id string required Host file identifier.
file_name string optional Original file name (advisory only; never used as a path).
mime_type string optional Declared MIME type (advisory only).
file_b64 string optionalSend exactly one file source: file_b64 (this field), file_url, file_handle, or file_text together with file_name.
file_handle string optional Handle returned by xlsx_upload_link, once the user has uploaded the spreadsheet file on that page. Use this when the user attached the file in chat or has no link. Provide this OR file_url.
file_name string optional File name with its extension (.csv, .tsv or .json), used with file_text.
file_sha256 string optional Hex SHA-256 of the exact file_text UTF-8 text. Optional; checked when given.
file_text string optional Use only for a small CSV, TSV or JSON file whose full text you already have. Practical limit about 2,000 cells or 40 KB (the server hard cap is 256 KB); above that use file_url, or xlsx_upload_link and file_handle. Requires file_name. Never encode or retype a binary file by hand. Provide this OR file_url OR file_handle.
file_url string optional https URL of the spreadsheet file (e.g. a shared Google Drive, Google Sheets, Dropbox, OneDrive or S3 link; must be viewable by anyone with the link). The server downloads it directly. Provide this OR file_handle.
options object optionallimit integer optional sheet string optional{
"properties": {
"file": {
"additionalProperties": false,
"description": "The spreadsheet file, handed off by a host that fills in the OpenAI file-parameter convention (openai/fileParams) from an uploaded or attached file. The server downloads download_url once, server-side; never a local sandbox path.",
"properties": {
"download_url": {
"description": "Temporary https URL to download the file. Valid only for this call.",
"maxLength": 8192,
"minLength": 1,
"type": "string"
},
"file_id": {
"description": "Host file identifier.",
"maxLength": 256,
"type": "string"
},
"file_name": {
"description": "Original file name (advisory only; never used as a path).",
"maxLength": 256,
"type": "string"
},
"mime_type": {
"description": "Declared MIME type (advisory only).",
"maxLength": 256,
"type": "string"
}
},
"required": [
"download_url",
"file_id"
],
"type": "object"
},
"file_b64": {
"description": "Send exactly one file source: file_b64 (this field), file_url, file_handle, or file_text together with file_name.",
"type": "string"
},
"file_handle": {
"description": "Handle returned by xlsx_upload_link, once the user has uploaded the spreadsheet file on that page. Use this when the user attached the file in chat or has no link. Provide this OR file_url.",
"maxLength": 128,
"minLength": 1,
"type": "string"
},
"file_name": {
"description": "File name with its extension (.csv, .tsv or .json), used with file_text.",
"maxLength": 200,
"minLength": 1,
"type": "string"
},
"file_sha256": {
"description": "Hex SHA-256 of the exact file_text UTF-8 text. Optional; checked when given.",
"maxLength": 64,
"minLength": 64,
"type": "string"
},
"file_text": {
"description": "Use only for a small CSV, TSV or JSON file whose full text you already have. Practical limit about 2,000 cells or 40 KB (the server hard cap is 256 KB); above that use file_url, or xlsx_upload_link and file_handle. Requires file_name. Never encode or retype a binary file by hand. Provide this OR file_url OR file_handle.",
"maxLength": 262144,
"minLength": 1,
"type": "string"
},
"file_url": {
"description": "https URL of the spreadsheet file (e.g. a shared Google Drive, Google Sheets, Dropbox, OneDrive or S3 link; must be viewable by anyone with the link). The server downloads it directly. Provide this OR file_handle.",
"maxLength": 8192,
"minLength": 1,
"type": "string"
},
"options": {
"properties": {
"limit": {
"maximum": 5000,
"minimum": 1,
"type": "integer"
},
"sheet": {
"type": "string"
}
},
"type": "object"
}
},
"required": [],
"type": "object",
"oneOf": [
{
"required": [
"file_b64"
]
},
{
"required": [
"file_url"
]
},
{
"required": [
"file_handle"
]
},
{
"required": [
"file_text",
"file_name"
]
},
{
"required": [
"file"
]
}
]
}REST (curl):
curl -sX POST https://api.xlsx-for-ai.dev/api/v1/tools/xlsx_merged_cells \
-H 'content-type: application/json' \
-H 'Authorization: Bearer <api_key>' \
-d '{"file_b64":"<BASE64_ENCODED_FILE_BYTES>"}'MCP (tools/call):
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "xlsx_merged_cells",
"arguments": {
"file_url": "https://example.com/placeholder.xlsx"
}
}
}200 — Tool result (base64-in / base64-out; stateless). A `file_text` whose `file_name` ends in .xlsx, .xlsm, .xls, .xlsb, .ods, .xltx, .xltm or .xlam computes nothing: the reply is still 200, with `status` `workbook_text_retired`, `computed` false, `upload_url` (send the file there with one PUT), `upload_page` (the page a person opens to drop the file in), `file_handle` (pass it to the same tool once the file is uploaded) and `expires_at`. A text copy loses defined names, styles, merged cells, validations and macros, so a workbook is never sent as text.400 — Bad request. `error.code` is one of: `bad_request` (malformed or oversized JSON body, invalid base64, or a missing/invalid field), `hardening_rejected` (the upload failed an ingest safety guard — e.g. an encrypted workbook, a non-OOXML zip, a truncated file, or a legacy .xls on a route that does not accept it), `unparseable_input` (no readable CSV header row), `malformed_csv` (a structurally broken CSV — an unclosed or mid-field quote), or `unsupported_output_format` (`xlsx_convert` was asked to write old binary .xls — Excel 97-2003 is read-only here; request `xlsx` or `csv`). A sheet- or column-not-found request also carries `available_sheets` / `available_columns`. A `file_url` that could not be fetched keeps `error.code` `bad_request` and adds `error.reason`, one of: `google_not_shared` (a Google link not shared publicly), `url_download_failed_4xx` (the host answered a 4xx: 404 is a dead link, 401/403 a private one), `url_download_failed_5xx`, `url_download_failed_network` (no answer, e.g. DNS), `url_download_timeout`, `url_returned_html` (a web page, not a spreadsheet), `url_empty`, `url_refused`, `url_redirect_blocked` or `file_input_url_not_https`.401 — Missing or invalid API key. `error.code`: `unauthorized`.402 — Payment required. `error.code`: `tier_upgrade_required`. A forward-compatible response for a capability gated to a paid subscription; it is driven by the account/consent surface (POST /api/v1/consent), not by the stateless tool inputs. No action is needed for standard tool calls on the free tier.413 — Payload too large. `error.code`: `file_too_large` (the input exceeds the per-format upload ceiling, or expands past the content-processing ceiling once parsed) or `write_output_too_large` (the requested output would exceed the format write cap). These are capacity ceilings — identical for every caller, never a paywall lever.429 — Free-tier file allowance reached for the current period. `error.code`: `rate_limit_exceeded`.500 — Internal server error — an unexpected fault on our side. `error.code`: `internal_error`.503 — Service temporarily unavailable — retryable; a `Retry-After` header is sent when known. `error.code` is one of: `service_unavailable` (a backing service is down, or parse capacity is momentarily saturated), `rate_limit_backend_unavailable`, or `cache_backend_unavailable`.xlsx_named_rangesPOST /api/v1/tools/xlsx_named_ranges — Use this when you need to list every defined name (named range) in a workbook — name, scope, kind, and reference.
Auth: Authorization: Bearer <api_key> (required)
file object optional The spreadsheet file, handed off by a host that fills in the OpenAI file-parameter convention (openai/fileParams) from an uploaded or attached file. The server downloads download_url once, server-side; never a local sandbox path.
download_url string required Temporary https URL to download the file. Valid only for this call.
file_id string required Host file identifier.
file_name string optional Original file name (advisory only; never used as a path).
mime_type string optional Declared MIME type (advisory only).
file_b64 string optionalSend exactly one file source: file_b64 (this field), file_url, file_handle, or file_text together with file_name.
file_handle string optional Handle returned by xlsx_upload_link, once the user has uploaded the spreadsheet file on that page. Use this when the user attached the file in chat or has no link. Provide this OR file_url.
file_name string optional File name with its extension (.csv, .tsv or .json), used with file_text.
file_sha256 string optional Hex SHA-256 of the exact file_text UTF-8 text. Optional; checked when given.
file_text string optional Use only for a small CSV, TSV or JSON file whose full text you already have. Practical limit about 2,000 cells or 40 KB (the server hard cap is 256 KB); above that use file_url, or xlsx_upload_link and file_handle. Requires file_name. Never encode or retype a binary file by hand. Provide this OR file_url OR file_handle.
file_url string optional https URL of the spreadsheet file (e.g. a shared Google Drive, Google Sheets, Dropbox, OneDrive or S3 link; must be viewable by anyone with the link). The server downloads it directly. Provide this OR file_handle.
{
"properties": {
"file": {
"additionalProperties": false,
"description": "The spreadsheet file, handed off by a host that fills in the OpenAI file-parameter convention (openai/fileParams) from an uploaded or attached file. The server downloads download_url once, server-side; never a local sandbox path.",
"properties": {
"download_url": {
"description": "Temporary https URL to download the file. Valid only for this call.",
"maxLength": 8192,
"minLength": 1,
"type": "string"
},
"file_id": {
"description": "Host file identifier.",
"maxLength": 256,
"type": "string"
},
"file_name": {
"description": "Original file name (advisory only; never used as a path).",
"maxLength": 256,
"type": "string"
},
"mime_type": {
"description": "Declared MIME type (advisory only).",
"maxLength": 256,
"type": "string"
}
},
"required": [
"download_url",
"file_id"
],
"type": "object"
},
"file_b64": {
"description": "Send exactly one file source: file_b64 (this field), file_url, file_handle, or file_text together with file_name.",
"type": "string"
},
"file_handle": {
"description": "Handle returned by xlsx_upload_link, once the user has uploaded the spreadsheet file on that page. Use this when the user attached the file in chat or has no link. Provide this OR file_url.",
"maxLength": 128,
"minLength": 1,
"type": "string"
},
"file_name": {
"description": "File name with its extension (.csv, .tsv or .json), used with file_text.",
"maxLength": 200,
"minLength": 1,
"type": "string"
},
"file_sha256": {
"description": "Hex SHA-256 of the exact file_text UTF-8 text. Optional; checked when given.",
"maxLength": 64,
"minLength": 64,
"type": "string"
},
"file_text": {
"description": "Use only for a small CSV, TSV or JSON file whose full text you already have. Practical limit about 2,000 cells or 40 KB (the server hard cap is 256 KB); above that use file_url, or xlsx_upload_link and file_handle. Requires file_name. Never encode or retype a binary file by hand. Provide this OR file_url OR file_handle.",
"maxLength": 262144,
"minLength": 1,
"type": "string"
},
"file_url": {
"description": "https URL of the spreadsheet file (e.g. a shared Google Drive, Google Sheets, Dropbox, OneDrive or S3 link; must be viewable by anyone with the link). The server downloads it directly. Provide this OR file_handle.",
"maxLength": 8192,
"minLength": 1,
"type": "string"
}
},
"required": [],
"type": "object",
"oneOf": [
{
"required": [
"file_b64"
]
},
{
"required": [
"file_url"
]
},
{
"required": [
"file_handle"
]
},
{
"required": [
"file_text",
"file_name"
]
},
{
"required": [
"file"
]
}
]
}REST (curl):
curl -sX POST https://api.xlsx-for-ai.dev/api/v1/tools/xlsx_named_ranges \
-H 'content-type: application/json' \
-H 'Authorization: Bearer <api_key>' \
-d '{"file_b64":"<BASE64_ENCODED_FILE_BYTES>"}'MCP (tools/call):
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "xlsx_named_ranges",
"arguments": {
"file_url": "https://example.com/placeholder.xlsx"
}
}
}200 — Tool result (base64-in / base64-out; stateless). A `file_text` whose `file_name` ends in .xlsx, .xlsm, .xls, .xlsb, .ods, .xltx, .xltm or .xlam computes nothing: the reply is still 200, with `status` `workbook_text_retired`, `computed` false, `upload_url` (send the file there with one PUT), `upload_page` (the page a person opens to drop the file in), `file_handle` (pass it to the same tool once the file is uploaded) and `expires_at`. A text copy loses defined names, styles, merged cells, validations and macros, so a workbook is never sent as text.400 — Bad request. `error.code` is one of: `bad_request` (malformed or oversized JSON body, invalid base64, or a missing/invalid field), `hardening_rejected` (the upload failed an ingest safety guard — e.g. an encrypted workbook, a non-OOXML zip, a truncated file, or a legacy .xls on a route that does not accept it), `unparseable_input` (no readable CSV header row), `malformed_csv` (a structurally broken CSV — an unclosed or mid-field quote), or `unsupported_output_format` (`xlsx_convert` was asked to write old binary .xls — Excel 97-2003 is read-only here; request `xlsx` or `csv`). A sheet- or column-not-found request also carries `available_sheets` / `available_columns`. A `file_url` that could not be fetched keeps `error.code` `bad_request` and adds `error.reason`, one of: `google_not_shared` (a Google link not shared publicly), `url_download_failed_4xx` (the host answered a 4xx: 404 is a dead link, 401/403 a private one), `url_download_failed_5xx`, `url_download_failed_network` (no answer, e.g. DNS), `url_download_timeout`, `url_returned_html` (a web page, not a spreadsheet), `url_empty`, `url_refused`, `url_redirect_blocked` or `file_input_url_not_https`.401 — Missing or invalid API key. `error.code`: `unauthorized`.402 — Payment required. `error.code`: `tier_upgrade_required`. A forward-compatible response for a capability gated to a paid subscription; it is driven by the account/consent surface (POST /api/v1/consent), not by the stateless tool inputs. No action is needed for standard tool calls on the free tier.413 — Payload too large. `error.code`: `file_too_large` (the input exceeds the per-format upload ceiling, or expands past the content-processing ceiling once parsed) or `write_output_too_large` (the requested output would exceed the format write cap). These are capacity ceilings — identical for every caller, never a paywall lever.429 — Free-tier file allowance reached for the current period. `error.code`: `rate_limit_exceeded`.500 — Internal server error — an unexpected fault on our side. `error.code`: `internal_error`.503 — Service temporarily unavailable — retryable; a `Retry-After` header is sent when known. `error.code` is one of: `service_unavailable` (a backing service is down, or parse capacity is momentarily saturated), `rate_limit_backend_unavailable`, or `cache_backend_unavailable`.xlsx_pii_cleanPOST /api/v1/tools/xlsx_pii_clean — Use this when you need to redact personal or sensitive data from a spreadsheet.
Auth: Authorization: Bearer <api_key> (required)
file object optional The spreadsheet file, handed off by a host that fills in the OpenAI file-parameter convention (openai/fileParams) from an uploaded or attached file. The server downloads download_url once, server-side; never a local sandbox path.
download_url string required Temporary https URL to download the file. Valid only for this call.
file_id string required Host file identifier.
file_name string optional Original file name (advisory only; never used as a path).
mime_type string optional Declared MIME type (advisory only).
file_b64 string required mode string optional selection object optional all boolean optionalfinding_ids array optional type_keys array optional simulate boolean optional{
"additionalProperties": false,
"properties": {
"file": {
"additionalProperties": false,
"description": "The spreadsheet file, handed off by a host that fills in the OpenAI file-parameter convention (openai/fileParams) from an uploaded or attached file. The server downloads download_url once, server-side; never a local sandbox path.",
"properties": {
"download_url": {
"description": "Temporary https URL to download the file. Valid only for this call.",
"maxLength": 8192,
"minLength": 1,
"type": "string"
},
"file_id": {
"description": "Host file identifier.",
"maxLength": 256,
"type": "string"
},
"file_name": {
"description": "Original file name (advisory only; never used as a path).",
"maxLength": 256,
"type": "string"
},
"mime_type": {
"description": "Declared MIME type (advisory only).",
"maxLength": 256,
"type": "string"
}
},
"required": [
"download_url",
"file_id"
],
"type": "object"
},
"file_b64": {
"maxLength": 279685803,
"type": "string"
},
"mode": {
"enum": [
"as_copy",
"in_place"
],
"type": "string"
},
"selection": {
"additionalProperties": false,
"properties": {
"all": {
"type": "boolean"
},
"finding_ids": {
"items": {
"pattern": "^[0-9a-f]{64}$",
"type": "string"
},
"maxItems": 10000,
"type": "array"
},
"type_keys": {
"items": {
"maxLength": 64,
"type": "string"
},
"maxItems": 64,
"type": "array"
}
},
"type": "object"
},
"simulate": {
"type": "boolean"
}
},
"required": [
"file_b64"
],
"type": "object"
}REST (curl):
curl -sX POST https://api.xlsx-for-ai.dev/api/v1/tools/xlsx_pii_clean \
-H 'content-type: application/json' \
-H 'Authorization: Bearer <api_key>' \
-d '{"file_b64":"<BASE64_ENCODED_FILE_BYTES>"}'MCP (tools/call):
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "xlsx_pii_clean",
"arguments": {
"file_url": "https://example.com/placeholder.xlsx"
}
}
}200 — Tool result (base64-in / base64-out; stateless).400 — Bad request. `error.code` is one of: `bad_request` (malformed or oversized JSON body, invalid base64, or a missing/invalid field), `hardening_rejected` (the upload failed an ingest safety guard — e.g. an encrypted workbook, a non-OOXML zip, a truncated file, or a legacy .xls on a route that does not accept it), `unparseable_input` (no readable CSV header row), `malformed_csv` (a structurally broken CSV — an unclosed or mid-field quote), or `unsupported_output_format` (`xlsx_convert` was asked to write old binary .xls — Excel 97-2003 is read-only here; request `xlsx` or `csv`). A sheet- or column-not-found request also carries `available_sheets` / `available_columns`. A `file_url` that could not be fetched keeps `error.code` `bad_request` and adds `error.reason`, one of: `google_not_shared` (a Google link not shared publicly), `url_download_failed_4xx` (the host answered a 4xx: 404 is a dead link, 401/403 a private one), `url_download_failed_5xx`, `url_download_failed_network` (no answer, e.g. DNS), `url_download_timeout`, `url_returned_html` (a web page, not a spreadsheet), `url_empty`, `url_refused`, `url_redirect_blocked` or `file_input_url_not_https`.401 — Missing or invalid API key. `error.code`: `unauthorized`.402 — Payment required. `error.code`: `tier_upgrade_required`. A forward-compatible response for a capability gated to a paid subscription; it is driven by the account/consent surface (POST /api/v1/consent), not by the stateless tool inputs. No action is needed for standard tool calls on the free tier.413 — Payload too large. `error.code`: `file_too_large` (the input exceeds the per-format upload ceiling, or expands past the content-processing ceiling once parsed) or `write_output_too_large` (the requested output would exceed the format write cap). These are capacity ceilings — identical for every caller, never a paywall lever.429 — Free-tier file allowance reached for the current period. `error.code`: `rate_limit_exceeded`.500 — Internal server error — an unexpected fault on our side. `error.code`: `internal_error`.503 — Service temporarily unavailable — retryable; a `Retry-After` header is sent when known. `error.code` is one of: `service_unavailable` (a backing service is down, or parse capacity is momentarily saturated), `rate_limit_backend_unavailable`, or `cache_backend_unavailable`.xlsx_pii_job_statusPOST /api/v1/tools/xlsx_pii_job_status — Use this when you need the name and address findings of a deferred xlsx_pii_scan, by its ner_job_id.
Auth: Authorization: Bearer <api_key> (required)
ner_job_id string required The ner_job_id a deferred xlsx_pii_scan returned.
{
"additionalProperties": false,
"properties": {
"ner_job_id": {
"description": "The ner_job_id a deferred xlsx_pii_scan returned.",
"maxLength": 64,
"minLength": 1,
"type": "string"
}
},
"required": [
"ner_job_id"
],
"type": "object"
}REST (curl):
curl -sX POST https://api.xlsx-for-ai.dev/api/v1/tools/xlsx_pii_job_status \
-H 'content-type: application/json' \
-H 'Authorization: Bearer <api_key>' \
-d '{"ner_job_id":"example-value"}'MCP (tools/call):
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "xlsx_pii_job_status",
"arguments": {
"ner_job_id": "example-value"
}
}
}200 — Tool result (base64-in / base64-out; stateless).400 — Bad request. `error.code` is one of: `bad_request` (malformed or oversized JSON body, invalid base64, or a missing/invalid field), `hardening_rejected` (the upload failed an ingest safety guard — e.g. an encrypted workbook, a non-OOXML zip, a truncated file, or a legacy .xls on a route that does not accept it), `unparseable_input` (no readable CSV header row), `malformed_csv` (a structurally broken CSV — an unclosed or mid-field quote), or `unsupported_output_format` (`xlsx_convert` was asked to write old binary .xls — Excel 97-2003 is read-only here; request `xlsx` or `csv`). A sheet- or column-not-found request also carries `available_sheets` / `available_columns`. A `file_url` that could not be fetched keeps `error.code` `bad_request` and adds `error.reason`, one of: `google_not_shared` (a Google link not shared publicly), `url_download_failed_4xx` (the host answered a 4xx: 404 is a dead link, 401/403 a private one), `url_download_failed_5xx`, `url_download_failed_network` (no answer, e.g. DNS), `url_download_timeout`, `url_returned_html` (a web page, not a spreadsheet), `url_empty`, `url_refused`, `url_redirect_blocked` or `file_input_url_not_https`.401 — Missing or invalid API key. `error.code`: `unauthorized`.402 — Payment required. `error.code`: `tier_upgrade_required`. A forward-compatible response for a capability gated to a paid subscription; it is driven by the account/consent surface (POST /api/v1/consent), not by the stateless tool inputs. No action is needed for standard tool calls on the free tier.404 — No job with that id for this account. `error.code`: `not_found` (subclass `ner_job_not_found`). An unknown, expired (kept 60 minutes after the scan) or another account's `ner_job_id` all answer alike; run the scan again.413 — Payload too large: the request body is over the server's request body limit. The body is one short id, so a well-formed call never gets this.429 — Too many requests from this IP address. `error.code`: `rate_limit_exceeded`; wait for `Retry-After`, then poll again. Polls never count against the monthly allowance.500 — Internal server error — an unexpected fault on our side. `error.code`: `internal_error`.503 — Service temporarily unavailable — retryable; a `Retry-After` header is sent when known. `error.code` is one of: `service_unavailable` (a backing service is down, or parse capacity is momentarily saturated), `rate_limit_backend_unavailable`, or `cache_backend_unavailable`.xlsx_pii_scanPOST /api/v1/tools/xlsx_pii_scan — Use this when you need to scan a spreadsheet for personal or sensitive data.
Auth: Authorization: Bearer <api_key> (required)
cache_scope string optional Optional: your own end-user or account id, used only to keep remembered answers separate.
file object optional The spreadsheet file, handed off by a host that fills in the OpenAI file-parameter convention (openai/fileParams) from an uploaded or attached file. The server downloads download_url once, server-side; never a local sandbox path.
download_url string required Temporary https URL to download the file. Valid only for this call.
file_id string required Host file identifier.
file_name string optional Original file name (advisory only; never used as a path).
mime_type string optional Declared MIME type (advisory only).
file_b64 string required ner string optional Optional, for apps that scan on a write path. "inline" (default) waits for the name and address check. "deferred" answers at once without names and addresses; fetch them later with xlsx_pii_job_status and the returned ner_job_id. Chat callers leave this unset.
{
"additionalProperties": false,
"properties": {
"cache_scope": {
"description": "Optional: your own end-user or account id, used only to keep remembered answers separate.",
"maxLength": 128,
"minLength": 1,
"type": "string"
},
"file": {
"additionalProperties": false,
"description": "The spreadsheet file, handed off by a host that fills in the OpenAI file-parameter convention (openai/fileParams) from an uploaded or attached file. The server downloads download_url once, server-side; never a local sandbox path.",
"properties": {
"download_url": {
"description": "Temporary https URL to download the file. Valid only for this call.",
"maxLength": 8192,
"minLength": 1,
"type": "string"
},
"file_id": {
"description": "Host file identifier.",
"maxLength": 256,
"type": "string"
},
"file_name": {
"description": "Original file name (advisory only; never used as a path).",
"maxLength": 256,
"type": "string"
},
"mime_type": {
"description": "Declared MIME type (advisory only).",
"maxLength": 256,
"type": "string"
}
},
"required": [
"download_url",
"file_id"
],
"type": "object"
},
"file_b64": {
"maxLength": 279685803,
"type": "string"
},
"ner": {
"description": "Optional, for apps that scan on a write path. \"inline\" (default) waits for the name and address check. \"deferred\" answers at once without names and addresses; fetch them later with xlsx_pii_job_status and the returned ner_job_id. Chat callers leave this unset.",
"enum": [
"inline",
"deferred"
],
"type": "string"
}
},
"required": [
"file_b64"
],
"type": "object"
}REST (curl):
curl -sX POST https://api.xlsx-for-ai.dev/api/v1/tools/xlsx_pii_scan \
-H 'content-type: application/json' \
-H 'Authorization: Bearer <api_key>' \
-d '{"file_b64":"<BASE64_ENCODED_FILE_BYTES>"}'MCP (tools/call):
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "xlsx_pii_scan",
"arguments": {
"file_url": "https://example.com/placeholder.xlsx"
}
}
}200 — Tool result (base64-in / base64-out; stateless).400 — Bad request. `error.code` is one of: `bad_request` (malformed or oversized JSON body, invalid base64, or a missing/invalid field), `hardening_rejected` (the upload failed an ingest safety guard — e.g. an encrypted workbook, a non-OOXML zip, a truncated file, or a legacy .xls on a route that does not accept it), `unparseable_input` (no readable CSV header row), `malformed_csv` (a structurally broken CSV — an unclosed or mid-field quote), or `unsupported_output_format` (`xlsx_convert` was asked to write old binary .xls — Excel 97-2003 is read-only here; request `xlsx` or `csv`). A sheet- or column-not-found request also carries `available_sheets` / `available_columns`. A `file_url` that could not be fetched keeps `error.code` `bad_request` and adds `error.reason`, one of: `google_not_shared` (a Google link not shared publicly), `url_download_failed_4xx` (the host answered a 4xx: 404 is a dead link, 401/403 a private one), `url_download_failed_5xx`, `url_download_failed_network` (no answer, e.g. DNS), `url_download_timeout`, `url_returned_html` (a web page, not a spreadsheet), `url_empty`, `url_refused`, `url_redirect_blocked` or `file_input_url_not_https`.401 — Missing or invalid API key. `error.code`: `unauthorized`.402 — Payment required. `error.code`: `tier_upgrade_required`. A forward-compatible response for a capability gated to a paid subscription; it is driven by the account/consent surface (POST /api/v1/consent), not by the stateless tool inputs. No action is needed for standard tool calls on the free tier.413 — Payload too large. `error.code`: `file_too_large` (the input exceeds the per-format upload ceiling, or expands past the content-processing ceiling once parsed) or `write_output_too_large` (the requested output would exceed the format write cap). These are capacity ceilings — identical for every caller, never a paywall lever.429 — Free-tier file allowance reached for the current period. `error.code`: `rate_limit_exceeded`.500 — Internal server error — an unexpected fault on our side. `error.code`: `internal_error`.503 — Service temporarily unavailable — retryable; a `Retry-After` header is sent when known. `error.code` is one of: `service_unavailable` (a backing service is down, or parse capacity is momentarily saturated), `rate_limit_backend_unavailable`, or `cache_backend_unavailable`.xlsx_pivotPOST /api/v1/tools/xlsx_pivot — Use this when you need a pivot-table reshape — reshape a flat table into a 2D matrix of index × columns with an aggregated value per cell.
Auth: Authorization: Bearer <api_key> (required)
agg string optional columns array optional file object optional The spreadsheet file, handed off by a host that fills in the OpenAI file-parameter convention (openai/fileParams) from an uploaded or attached file. The server downloads download_url once, server-side; never a local sandbox path.
download_url string required Temporary https URL to download the file. Valid only for this call.
file_id string required Host file identifier.
file_name string optional Original file name (advisory only; never used as a path).
mime_type string optional Declared MIME type (advisory only).
file_b64 string requiredindex array required options object optionalfill_value any optionalheader_row integer optional sheet string optionalvalues array required {
"properties": {
"agg": {
"enum": [
"sum",
"mean",
"min",
"max",
"count",
"count_distinct"
],
"type": "string"
},
"columns": {
"items": {
"type": "string"
},
"maxItems": 4,
"type": "array"
},
"file": {
"additionalProperties": false,
"description": "The spreadsheet file, handed off by a host that fills in the OpenAI file-parameter convention (openai/fileParams) from an uploaded or attached file. The server downloads download_url once, server-side; never a local sandbox path.",
"properties": {
"download_url": {
"description": "Temporary https URL to download the file. Valid only for this call.",
"maxLength": 8192,
"minLength": 1,
"type": "string"
},
"file_id": {
"description": "Host file identifier.",
"maxLength": 256,
"type": "string"
},
"file_name": {
"description": "Original file name (advisory only; never used as a path).",
"maxLength": 256,
"type": "string"
},
"mime_type": {
"description": "Declared MIME type (advisory only).",
"maxLength": 256,
"type": "string"
}
},
"required": [
"download_url",
"file_id"
],
"type": "object"
},
"file_b64": {
"type": "string"
},
"index": {
"items": {
"type": "string"
},
"maxItems": 4,
"minItems": 1,
"type": "array"
},
"options": {
"properties": {
"fill_value": {},
"header_row": {
"minimum": 0,
"type": "integer"
},
"sheet": {
"type": "string"
}
},
"type": "object"
},
"values": {
"items": {
"type": "string"
},
"maxItems": 8,
"minItems": 1,
"type": "array"
}
},
"required": [
"file_b64",
"index",
"values"
],
"type": "object"
}REST (curl):
curl -sX POST https://api.xlsx-for-ai.dev/api/v1/tools/xlsx_pivot \
-H 'content-type: application/json' \
-H 'Authorization: Bearer <api_key>' \
-d '{"file_b64":"<BASE64_ENCODED_FILE_BYTES>","index":["example-value"],"values":["example-value"]}'MCP (tools/call):
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "xlsx_pivot",
"arguments": {
"index": [
"example-value"
],
"values": [
"example-value"
],
"file_url": "https://example.com/placeholder.xlsx"
}
}
}200 — Tool result (base64-in / base64-out; stateless).400 — Bad request. `error.code` is one of: `bad_request` (malformed or oversized JSON body, invalid base64, or a missing/invalid field), `hardening_rejected` (the upload failed an ingest safety guard — e.g. an encrypted workbook, a non-OOXML zip, a truncated file, or a legacy .xls on a route that does not accept it), `unparseable_input` (no readable CSV header row), `malformed_csv` (a structurally broken CSV — an unclosed or mid-field quote), or `unsupported_output_format` (`xlsx_convert` was asked to write old binary .xls — Excel 97-2003 is read-only here; request `xlsx` or `csv`). A sheet- or column-not-found request also carries `available_sheets` / `available_columns`. A `file_url` that could not be fetched keeps `error.code` `bad_request` and adds `error.reason`, one of: `google_not_shared` (a Google link not shared publicly), `url_download_failed_4xx` (the host answered a 4xx: 404 is a dead link, 401/403 a private one), `url_download_failed_5xx`, `url_download_failed_network` (no answer, e.g. DNS), `url_download_timeout`, `url_returned_html` (a web page, not a spreadsheet), `url_empty`, `url_refused`, `url_redirect_blocked` or `file_input_url_not_https`.401 — Missing or invalid API key. `error.code`: `unauthorized`.402 — Payment required. `error.code`: `tier_upgrade_required`. A forward-compatible response for a capability gated to a paid subscription; it is driven by the account/consent surface (POST /api/v1/consent), not by the stateless tool inputs. No action is needed for standard tool calls on the free tier.413 — Payload too large. `error.code`: `file_too_large` (the input exceeds the per-format upload ceiling, or expands past the content-processing ceiling once parsed) or `write_output_too_large` (the requested output would exceed the format write cap). These are capacity ceilings — identical for every caller, never a paywall lever.429 — Free-tier file allowance reached for the current period. `error.code`: `rate_limit_exceeded`.500 — Internal server error — an unexpected fault on our side. `error.code`: `internal_error`.503 — Service temporarily unavailable — retryable; a `Retry-After` header is sent when known. `error.code` is one of: `service_unavailable` (a backing service is down, or parse capacity is momentarily saturated), `rate_limit_backend_unavailable`, or `cache_backend_unavailable`.xlsx_pivot_tablesPOST /api/v1/tools/xlsx_pivot_tables — Use this when you need to list every pre-existing pivot table an Excel user already built — source range, row/column/page fields, and each data field's aggregation.
Auth: Authorization: Bearer <api_key> (required)
file object optional The spreadsheet file, handed off by a host that fills in the OpenAI file-parameter convention (openai/fileParams) from an uploaded or attached file. The server downloads download_url once, server-side; never a local sandbox path.
download_url string required Temporary https URL to download the file. Valid only for this call.
file_id string required Host file identifier.
file_name string optional Original file name (advisory only; never used as a path).
mime_type string optional Declared MIME type (advisory only).
file_b64 string requiredoptions object optionalsheet string optional{
"properties": {
"file": {
"additionalProperties": false,
"description": "The spreadsheet file, handed off by a host that fills in the OpenAI file-parameter convention (openai/fileParams) from an uploaded or attached file. The server downloads download_url once, server-side; never a local sandbox path.",
"properties": {
"download_url": {
"description": "Temporary https URL to download the file. Valid only for this call.",
"maxLength": 8192,
"minLength": 1,
"type": "string"
},
"file_id": {
"description": "Host file identifier.",
"maxLength": 256,
"type": "string"
},
"file_name": {
"description": "Original file name (advisory only; never used as a path).",
"maxLength": 256,
"type": "string"
},
"mime_type": {
"description": "Declared MIME type (advisory only).",
"maxLength": 256,
"type": "string"
}
},
"required": [
"download_url",
"file_id"
],
"type": "object"
},
"file_b64": {
"type": "string"
},
"options": {
"properties": {
"sheet": {
"type": "string"
}
},
"type": "object"
}
},
"required": [
"file_b64"
],
"type": "object"
}REST (curl):
curl -sX POST https://api.xlsx-for-ai.dev/api/v1/tools/xlsx_pivot_tables \
-H 'content-type: application/json' \
-H 'Authorization: Bearer <api_key>' \
-d '{"file_b64":"<BASE64_ENCODED_FILE_BYTES>"}'MCP (tools/call):
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "xlsx_pivot_tables",
"arguments": {
"file_url": "https://example.com/placeholder.xlsx"
}
}
}200 — Tool result (base64-in / base64-out; stateless).400 — Bad request. `error.code` is one of: `bad_request` (malformed or oversized JSON body, invalid base64, or a missing/invalid field), `hardening_rejected` (the upload failed an ingest safety guard — e.g. an encrypted workbook, a non-OOXML zip, a truncated file, or a legacy .xls on a route that does not accept it), `unparseable_input` (no readable CSV header row), `malformed_csv` (a structurally broken CSV — an unclosed or mid-field quote), or `unsupported_output_format` (`xlsx_convert` was asked to write old binary .xls — Excel 97-2003 is read-only here; request `xlsx` or `csv`). A sheet- or column-not-found request also carries `available_sheets` / `available_columns`. A `file_url` that could not be fetched keeps `error.code` `bad_request` and adds `error.reason`, one of: `google_not_shared` (a Google link not shared publicly), `url_download_failed_4xx` (the host answered a 4xx: 404 is a dead link, 401/403 a private one), `url_download_failed_5xx`, `url_download_failed_network` (no answer, e.g. DNS), `url_download_timeout`, `url_returned_html` (a web page, not a spreadsheet), `url_empty`, `url_refused`, `url_redirect_blocked` or `file_input_url_not_https`.401 — Missing or invalid API key. `error.code`: `unauthorized`.402 — Payment required. `error.code`: `tier_upgrade_required`. A forward-compatible response for a capability gated to a paid subscription; it is driven by the account/consent surface (POST /api/v1/consent), not by the stateless tool inputs. No action is needed for standard tool calls on the free tier.413 — Payload too large. `error.code`: `file_too_large` (the input exceeds the per-format upload ceiling, or expands past the content-processing ceiling once parsed) or `write_output_too_large` (the requested output would exceed the format write cap). These are capacity ceilings — identical for every caller, never a paywall lever.429 — Free-tier file allowance reached for the current period. `error.code`: `rate_limit_exceeded`.500 — Internal server error — an unexpected fault on our side. `error.code`: `internal_error`.503 — Service temporarily unavailable — retryable; a `Retry-After` header is sent when known. `error.code` is one of: `service_unavailable` (a backing service is down, or parse capacity is momentarily saturated), `rate_limit_backend_unavailable`, or `cache_backend_unavailable`.xlsx_post_slackPOST /api/v1/tools/xlsx_post_slack — Use this when you need to post a spreadsheet to a Slack channel as a file attachment, with an optional accompanying message.
Auth: Authorization: Bearer <api_key> (required)
channel string required file object optional The spreadsheet file, handed off by a host that fills in the OpenAI file-parameter convention (openai/fileParams) from an uploaded or attached file. The server downloads download_url once, server-side; never a local sandbox path.
download_url string required Temporary https URL to download the file. Valid only for this call.
file_id string required Host file identifier.
file_name string optional Original file name (advisory only; never used as a path).
mime_type string optional Declared MIME type (advisory only).
file_b64 string optionalfilename string optional message string optional slack_token string required workbook_handle string optional {
"properties": {
"channel": {
"maxLength": 128,
"minLength": 1,
"type": "string"
},
"file": {
"additionalProperties": false,
"description": "The spreadsheet file, handed off by a host that fills in the OpenAI file-parameter convention (openai/fileParams) from an uploaded or attached file. The server downloads download_url once, server-side; never a local sandbox path.",
"properties": {
"download_url": {
"description": "Temporary https URL to download the file. Valid only for this call.",
"maxLength": 8192,
"minLength": 1,
"type": "string"
},
"file_id": {
"description": "Host file identifier.",
"maxLength": 256,
"type": "string"
},
"file_name": {
"description": "Original file name (advisory only; never used as a path).",
"maxLength": 256,
"type": "string"
},
"mime_type": {
"description": "Declared MIME type (advisory only).",
"maxLength": 256,
"type": "string"
}
},
"required": [
"download_url",
"file_id"
],
"type": "object"
},
"file_b64": {
"type": "string"
},
"filename": {
"maxLength": 128,
"type": "string"
},
"message": {
"maxLength": 4000,
"type": "string"
},
"slack_token": {
"maxLength": 256,
"minLength": 10,
"type": "string"
},
"workbook_handle": {
"maxLength": 128,
"minLength": 1,
"type": "string"
}
},
"required": [
"channel",
"slack_token"
],
"type": "object"
}REST (curl):
curl -sX POST https://api.xlsx-for-ai.dev/api/v1/tools/xlsx_post_slack \
-H 'content-type: application/json' \
-H 'Authorization: Bearer <api_key>' \
-d '{"channel":"example-value","slack_token":"example-value","file_b64":"<BASE64_ENCODED_FILE_BYTES>"}'MCP (tools/call):
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "xlsx_post_slack",
"arguments": {
"channel": "example-value",
"slack_token": "example-value",
"file_url": "https://example.com/placeholder.xlsx"
}
}
}200 — Tool result (base64-in / base64-out; stateless).400 — Bad request. `error.code` is one of: `bad_request` (malformed or oversized JSON body, invalid base64, or a missing/invalid field), `hardening_rejected` (the upload failed an ingest safety guard — e.g. an encrypted workbook, a non-OOXML zip, a truncated file, or a legacy .xls on a route that does not accept it), `unparseable_input` (no readable CSV header row), `malformed_csv` (a structurally broken CSV — an unclosed or mid-field quote), or `unsupported_output_format` (`xlsx_convert` was asked to write old binary .xls — Excel 97-2003 is read-only here; request `xlsx` or `csv`). A sheet- or column-not-found request also carries `available_sheets` / `available_columns`. A `file_url` that could not be fetched keeps `error.code` `bad_request` and adds `error.reason`, one of: `google_not_shared` (a Google link not shared publicly), `url_download_failed_4xx` (the host answered a 4xx: 404 is a dead link, 401/403 a private one), `url_download_failed_5xx`, `url_download_failed_network` (no answer, e.g. DNS), `url_download_timeout`, `url_returned_html` (a web page, not a spreadsheet), `url_empty`, `url_refused`, `url_redirect_blocked` or `file_input_url_not_https`.401 — Missing or invalid API key. `error.code`: `unauthorized`.402 — Payment required. `error.code`: `tier_upgrade_required`. A forward-compatible response for a capability gated to a paid subscription; it is driven by the account/consent surface (POST /api/v1/consent), not by the stateless tool inputs. No action is needed for standard tool calls on the free tier.413 — Payload too large. `error.code`: `file_too_large` (the input exceeds the per-format upload ceiling, or expands past the content-processing ceiling once parsed) or `write_output_too_large` (the requested output would exceed the format write cap). These are capacity ceilings — identical for every caller, never a paywall lever.429 — Free-tier file allowance reached for the current period. `error.code`: `rate_limit_exceeded`.500 — Internal server error — an unexpected fault on our side. `error.code`: `internal_error`.503 — Service temporarily unavailable — retryable; a `Retry-After` header is sent when known. `error.code` is one of: `service_unavailable` (a backing service is down, or parse capacity is momentarily saturated), `rate_limit_backend_unavailable`, or `cache_backend_unavailable`.xlsx_post_teamsPOST /api/v1/tools/xlsx_post_teams — Use this when you need to post a spreadsheet to a Microsoft Teams channel as a file attachment, with an optional accompanying message.
Auth: Authorization: Bearer <api_key> (required)
channel_id string required file object optional The spreadsheet file, handed off by a host that fills in the OpenAI file-parameter convention (openai/fileParams) from an uploaded or attached file. The server downloads download_url once, server-side; never a local sandbox path.
download_url string required Temporary https URL to download the file. Valid only for this call.
file_id string required Host file identifier.
file_name string optional Original file name (advisory only; never used as a path).
mime_type string optional Declared MIME type (advisory only).
file_b64 string optionalfilename string optional graph_token string required message string optional team_id string required workbook_handle string optional {
"properties": {
"channel_id": {
"maxLength": 128,
"minLength": 1,
"type": "string"
},
"file": {
"additionalProperties": false,
"description": "The spreadsheet file, handed off by a host that fills in the OpenAI file-parameter convention (openai/fileParams) from an uploaded or attached file. The server downloads download_url once, server-side; never a local sandbox path.",
"properties": {
"download_url": {
"description": "Temporary https URL to download the file. Valid only for this call.",
"maxLength": 8192,
"minLength": 1,
"type": "string"
},
"file_id": {
"description": "Host file identifier.",
"maxLength": 256,
"type": "string"
},
"file_name": {
"description": "Original file name (advisory only; never used as a path).",
"maxLength": 256,
"type": "string"
},
"mime_type": {
"description": "Declared MIME type (advisory only).",
"maxLength": 256,
"type": "string"
}
},
"required": [
"download_url",
"file_id"
],
"type": "object"
},
"file_b64": {
"type": "string"
},
"filename": {
"maxLength": 128,
"type": "string"
},
"graph_token": {
"maxLength": 8192,
"minLength": 100,
"type": "string"
},
"message": {
"maxLength": 4000,
"type": "string"
},
"team_id": {
"maxLength": 128,
"minLength": 1,
"type": "string"
},
"workbook_handle": {
"maxLength": 128,
"minLength": 1,
"type": "string"
}
},
"required": [
"channel_id",
"graph_token",
"team_id"
],
"type": "object"
}REST (curl):
curl -sX POST https://api.xlsx-for-ai.dev/api/v1/tools/xlsx_post_teams \
-H 'content-type: application/json' \
-H 'Authorization: Bearer <api_key>' \
-d '{"channel_id":"example-value","graph_token":"example-value-example-value-example-value-example-value-example-value-example-value-example-value-example-value","team_id":"example-value","file_b64":"<BASE64_ENCODED_FILE_BYTES>"}'MCP (tools/call):
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "xlsx_post_teams",
"arguments": {
"channel_id": "example-value",
"graph_token": "example-value-example-value-example-value-example-value-example-value-example-value-example-value-example-value",
"team_id": "example-value",
"file_url": "https://example.com/placeholder.xlsx"
}
}
}200 — Tool result (base64-in / base64-out; stateless).400 — Bad request. `error.code` is one of: `bad_request` (malformed or oversized JSON body, invalid base64, or a missing/invalid field), `hardening_rejected` (the upload failed an ingest safety guard — e.g. an encrypted workbook, a non-OOXML zip, a truncated file, or a legacy .xls on a route that does not accept it), `unparseable_input` (no readable CSV header row), `malformed_csv` (a structurally broken CSV — an unclosed or mid-field quote), or `unsupported_output_format` (`xlsx_convert` was asked to write old binary .xls — Excel 97-2003 is read-only here; request `xlsx` or `csv`). A sheet- or column-not-found request also carries `available_sheets` / `available_columns`. A `file_url` that could not be fetched keeps `error.code` `bad_request` and adds `error.reason`, one of: `google_not_shared` (a Google link not shared publicly), `url_download_failed_4xx` (the host answered a 4xx: 404 is a dead link, 401/403 a private one), `url_download_failed_5xx`, `url_download_failed_network` (no answer, e.g. DNS), `url_download_timeout`, `url_returned_html` (a web page, not a spreadsheet), `url_empty`, `url_refused`, `url_redirect_blocked` or `file_input_url_not_https`.401 — Missing or invalid API key. `error.code`: `unauthorized`.402 — Payment required. `error.code`: `tier_upgrade_required`. A forward-compatible response for a capability gated to a paid subscription; it is driven by the account/consent surface (POST /api/v1/consent), not by the stateless tool inputs. No action is needed for standard tool calls on the free tier.413 — Payload too large. `error.code`: `file_too_large` (the input exceeds the per-format upload ceiling, or expands past the content-processing ceiling once parsed) or `write_output_too_large` (the requested output would exceed the format write cap). These are capacity ceilings — identical for every caller, never a paywall lever.429 — Free-tier file allowance reached for the current period. `error.code`: `rate_limit_exceeded`.500 — Internal server error — an unexpected fault on our side. `error.code`: `internal_error`.503 — Service temporarily unavailable — retryable; a `Retry-After` header is sent when known. `error.code` is one of: `service_unavailable` (a backing service is down, or parse capacity is momentarily saturated), `rate_limit_backend_unavailable`, or `cache_backend_unavailable`.xlsx_print_settingsPOST /api/v1/tools/xlsx_print_settings — Use this when you need to surface exactly what Excel would print for each sheet — print area, orientation, paper size, margins, headers/footers, page breaks.
Auth: Authorization: Bearer <api_key> (required)
file object optional The spreadsheet file, handed off by a host that fills in the OpenAI file-parameter convention (openai/fileParams) from an uploaded or attached file. The server downloads download_url once, server-side; never a local sandbox path.
download_url string required Temporary https URL to download the file. Valid only for this call.
file_id string required Host file identifier.
file_name string optional Original file name (advisory only; never used as a path).
mime_type string optional Declared MIME type (advisory only).
file_b64 string optionalSend exactly one file source: file_b64 (this field), file_url, file_handle, or file_text together with file_name.
file_handle string optional Handle returned by xlsx_upload_link, once the user has uploaded the spreadsheet file on that page. Use this when the user attached the file in chat or has no link. Provide this OR file_url.
file_name string optional File name with its extension (.csv, .tsv or .json), used with file_text.
file_sha256 string optional Hex SHA-256 of the exact file_text UTF-8 text. Optional; checked when given.
file_text string optional Use only for a small CSV, TSV or JSON file whose full text you already have. Practical limit about 2,000 cells or 40 KB (the server hard cap is 256 KB); above that use file_url, or xlsx_upload_link and file_handle. Requires file_name. Never encode or retype a binary file by hand. Provide this OR file_url OR file_handle.
file_url string optional https URL of the spreadsheet file (e.g. a shared Google Drive, Google Sheets, Dropbox, OneDrive or S3 link; must be viewable by anyone with the link). The server downloads it directly. Provide this OR file_handle.
options object optionalsheet string optional{
"properties": {
"file": {
"additionalProperties": false,
"description": "The spreadsheet file, handed off by a host that fills in the OpenAI file-parameter convention (openai/fileParams) from an uploaded or attached file. The server downloads download_url once, server-side; never a local sandbox path.",
"properties": {
"download_url": {
"description": "Temporary https URL to download the file. Valid only for this call.",
"maxLength": 8192,
"minLength": 1,
"type": "string"
},
"file_id": {
"description": "Host file identifier.",
"maxLength": 256,
"type": "string"
},
"file_name": {
"description": "Original file name (advisory only; never used as a path).",
"maxLength": 256,
"type": "string"
},
"mime_type": {
"description": "Declared MIME type (advisory only).",
"maxLength": 256,
"type": "string"
}
},
"required": [
"download_url",
"file_id"
],
"type": "object"
},
"file_b64": {
"description": "Send exactly one file source: file_b64 (this field), file_url, file_handle, or file_text together with file_name.",
"type": "string"
},
"file_handle": {
"description": "Handle returned by xlsx_upload_link, once the user has uploaded the spreadsheet file on that page. Use this when the user attached the file in chat or has no link. Provide this OR file_url.",
"maxLength": 128,
"minLength": 1,
"type": "string"
},
"file_name": {
"description": "File name with its extension (.csv, .tsv or .json), used with file_text.",
"maxLength": 200,
"minLength": 1,
"type": "string"
},
"file_sha256": {
"description": "Hex SHA-256 of the exact file_text UTF-8 text. Optional; checked when given.",
"maxLength": 64,
"minLength": 64,
"type": "string"
},
"file_text": {
"description": "Use only for a small CSV, TSV or JSON file whose full text you already have. Practical limit about 2,000 cells or 40 KB (the server hard cap is 256 KB); above that use file_url, or xlsx_upload_link and file_handle. Requires file_name. Never encode or retype a binary file by hand. Provide this OR file_url OR file_handle.",
"maxLength": 262144,
"minLength": 1,
"type": "string"
},
"file_url": {
"description": "https URL of the spreadsheet file (e.g. a shared Google Drive, Google Sheets, Dropbox, OneDrive or S3 link; must be viewable by anyone with the link). The server downloads it directly. Provide this OR file_handle.",
"maxLength": 8192,
"minLength": 1,
"type": "string"
},
"options": {
"properties": {
"sheet": {
"type": "string"
}
},
"type": "object"
}
},
"required": [],
"type": "object",
"oneOf": [
{
"required": [
"file_b64"
]
},
{
"required": [
"file_url"
]
},
{
"required": [
"file_handle"
]
},
{
"required": [
"file_text",
"file_name"
]
},
{
"required": [
"file"
]
}
]
}REST (curl):
curl -sX POST https://api.xlsx-for-ai.dev/api/v1/tools/xlsx_print_settings \
-H 'content-type: application/json' \
-H 'Authorization: Bearer <api_key>' \
-d '{"file_b64":"<BASE64_ENCODED_FILE_BYTES>"}'MCP (tools/call):
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "xlsx_print_settings",
"arguments": {
"file_url": "https://example.com/placeholder.xlsx"
}
}
}200 — Tool result (base64-in / base64-out; stateless). A `file_text` whose `file_name` ends in .xlsx, .xlsm, .xls, .xlsb, .ods, .xltx, .xltm or .xlam computes nothing: the reply is still 200, with `status` `workbook_text_retired`, `computed` false, `upload_url` (send the file there with one PUT), `upload_page` (the page a person opens to drop the file in), `file_handle` (pass it to the same tool once the file is uploaded) and `expires_at`. A text copy loses defined names, styles, merged cells, validations and macros, so a workbook is never sent as text.400 — Bad request. `error.code` is one of: `bad_request` (malformed or oversized JSON body, invalid base64, or a missing/invalid field), `hardening_rejected` (the upload failed an ingest safety guard — e.g. an encrypted workbook, a non-OOXML zip, a truncated file, or a legacy .xls on a route that does not accept it), `unparseable_input` (no readable CSV header row), `malformed_csv` (a structurally broken CSV — an unclosed or mid-field quote), or `unsupported_output_format` (`xlsx_convert` was asked to write old binary .xls — Excel 97-2003 is read-only here; request `xlsx` or `csv`). A sheet- or column-not-found request also carries `available_sheets` / `available_columns`. A `file_url` that could not be fetched keeps `error.code` `bad_request` and adds `error.reason`, one of: `google_not_shared` (a Google link not shared publicly), `url_download_failed_4xx` (the host answered a 4xx: 404 is a dead link, 401/403 a private one), `url_download_failed_5xx`, `url_download_failed_network` (no answer, e.g. DNS), `url_download_timeout`, `url_returned_html` (a web page, not a spreadsheet), `url_empty`, `url_refused`, `url_redirect_blocked` or `file_input_url_not_https`.401 — Missing or invalid API key. `error.code`: `unauthorized`.402 — Payment required. `error.code`: `tier_upgrade_required`. A forward-compatible response for a capability gated to a paid subscription; it is driven by the account/consent surface (POST /api/v1/consent), not by the stateless tool inputs. No action is needed for standard tool calls on the free tier.413 — Payload too large. `error.code`: `file_too_large` (the input exceeds the per-format upload ceiling, or expands past the content-processing ceiling once parsed) or `write_output_too_large` (the requested output would exceed the format write cap). These are capacity ceilings — identical for every caller, never a paywall lever.429 — Free-tier file allowance reached for the current period. `error.code`: `rate_limit_exceeded`.500 — Internal server error — an unexpected fault on our side. `error.code`: `internal_error`.503 — Service temporarily unavailable — retryable; a `Retry-After` header is sent when known. `error.code` is one of: `service_unavailable` (a backing service is down, or parse capacity is momentarily saturated), `rate_limit_backend_unavailable`, or `cache_backend_unavailable`.xlsx_propertiesPOST /api/v1/tools/xlsx_properties — Use this when you need to surface a workbook's identity card — creator, timestamps, title/subject/company, and every custom Info > Properties entry.
Auth: Authorization: Bearer <api_key> (required)
file object optional The spreadsheet file, handed off by a host that fills in the OpenAI file-parameter convention (openai/fileParams) from an uploaded or attached file. The server downloads download_url once, server-side; never a local sandbox path.
download_url string required Temporary https URL to download the file. Valid only for this call.
file_id string required Host file identifier.
file_name string optional Original file name (advisory only; never used as a path).
mime_type string optional Declared MIME type (advisory only).
file_b64 string optionalSend exactly one file source: file_b64 (this field), file_url, file_handle, or file_text together with file_name.
file_handle string optional Handle returned by xlsx_upload_link, once the user has uploaded the spreadsheet file on that page. Use this when the user attached the file in chat or has no link. Provide this OR file_url.
file_name string optional File name with its extension (.csv, .tsv or .json), used with file_text.
file_sha256 string optional Hex SHA-256 of the exact file_text UTF-8 text. Optional; checked when given.
file_text string optional Use only for a small CSV, TSV or JSON file whose full text you already have. Practical limit about 2,000 cells or 40 KB (the server hard cap is 256 KB); above that use file_url, or xlsx_upload_link and file_handle. Requires file_name. Never encode or retype a binary file by hand. Provide this OR file_url OR file_handle.
file_url string optional https URL of the spreadsheet file (e.g. a shared Google Drive, Google Sheets, Dropbox, OneDrive or S3 link; must be viewable by anyone with the link). The server downloads it directly. Provide this OR file_handle.
{
"properties": {
"file": {
"additionalProperties": false,
"description": "The spreadsheet file, handed off by a host that fills in the OpenAI file-parameter convention (openai/fileParams) from an uploaded or attached file. The server downloads download_url once, server-side; never a local sandbox path.",
"properties": {
"download_url": {
"description": "Temporary https URL to download the file. Valid only for this call.",
"maxLength": 8192,
"minLength": 1,
"type": "string"
},
"file_id": {
"description": "Host file identifier.",
"maxLength": 256,
"type": "string"
},
"file_name": {
"description": "Original file name (advisory only; never used as a path).",
"maxLength": 256,
"type": "string"
},
"mime_type": {
"description": "Declared MIME type (advisory only).",
"maxLength": 256,
"type": "string"
}
},
"required": [
"download_url",
"file_id"
],
"type": "object"
},
"file_b64": {
"description": "Send exactly one file source: file_b64 (this field), file_url, file_handle, or file_text together with file_name.",
"type": "string"
},
"file_handle": {
"description": "Handle returned by xlsx_upload_link, once the user has uploaded the spreadsheet file on that page. Use this when the user attached the file in chat or has no link. Provide this OR file_url.",
"maxLength": 128,
"minLength": 1,
"type": "string"
},
"file_name": {
"description": "File name with its extension (.csv, .tsv or .json), used with file_text.",
"maxLength": 200,
"minLength": 1,
"type": "string"
},
"file_sha256": {
"description": "Hex SHA-256 of the exact file_text UTF-8 text. Optional; checked when given.",
"maxLength": 64,
"minLength": 64,
"type": "string"
},
"file_text": {
"description": "Use only for a small CSV, TSV or JSON file whose full text you already have. Practical limit about 2,000 cells or 40 KB (the server hard cap is 256 KB); above that use file_url, or xlsx_upload_link and file_handle. Requires file_name. Never encode or retype a binary file by hand. Provide this OR file_url OR file_handle.",
"maxLength": 262144,
"minLength": 1,
"type": "string"
},
"file_url": {
"description": "https URL of the spreadsheet file (e.g. a shared Google Drive, Google Sheets, Dropbox, OneDrive or S3 link; must be viewable by anyone with the link). The server downloads it directly. Provide this OR file_handle.",
"maxLength": 8192,
"minLength": 1,
"type": "string"
}
},
"required": [],
"type": "object",
"oneOf": [
{
"required": [
"file_b64"
]
},
{
"required": [
"file_url"
]
},
{
"required": [
"file_handle"
]
},
{
"required": [
"file_text",
"file_name"
]
},
{
"required": [
"file"
]
}
]
}REST (curl):
curl -sX POST https://api.xlsx-for-ai.dev/api/v1/tools/xlsx_properties \
-H 'content-type: application/json' \
-H 'Authorization: Bearer <api_key>' \
-d '{"file_b64":"<BASE64_ENCODED_FILE_BYTES>"}'MCP (tools/call):
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "xlsx_properties",
"arguments": {
"file_url": "https://example.com/placeholder.xlsx"
}
}
}200 — Tool result (base64-in / base64-out; stateless). A `file_text` whose `file_name` ends in .xlsx, .xlsm, .xls, .xlsb, .ods, .xltx, .xltm or .xlam computes nothing: the reply is still 200, with `status` `workbook_text_retired`, `computed` false, `upload_url` (send the file there with one PUT), `upload_page` (the page a person opens to drop the file in), `file_handle` (pass it to the same tool once the file is uploaded) and `expires_at`. A text copy loses defined names, styles, merged cells, validations and macros, so a workbook is never sent as text.400 — Bad request. `error.code` is one of: `bad_request` (malformed or oversized JSON body, invalid base64, or a missing/invalid field), `hardening_rejected` (the upload failed an ingest safety guard — e.g. an encrypted workbook, a non-OOXML zip, a truncated file, or a legacy .xls on a route that does not accept it), `unparseable_input` (no readable CSV header row), `malformed_csv` (a structurally broken CSV — an unclosed or mid-field quote), or `unsupported_output_format` (`xlsx_convert` was asked to write old binary .xls — Excel 97-2003 is read-only here; request `xlsx` or `csv`). A sheet- or column-not-found request also carries `available_sheets` / `available_columns`. A `file_url` that could not be fetched keeps `error.code` `bad_request` and adds `error.reason`, one of: `google_not_shared` (a Google link not shared publicly), `url_download_failed_4xx` (the host answered a 4xx: 404 is a dead link, 401/403 a private one), `url_download_failed_5xx`, `url_download_failed_network` (no answer, e.g. DNS), `url_download_timeout`, `url_returned_html` (a web page, not a spreadsheet), `url_empty`, `url_refused`, `url_redirect_blocked` or `file_input_url_not_https`.401 — Missing or invalid API key. `error.code`: `unauthorized`.402 — Payment required. `error.code`: `tier_upgrade_required`. A forward-compatible response for a capability gated to a paid subscription; it is driven by the account/consent surface (POST /api/v1/consent), not by the stateless tool inputs. No action is needed for standard tool calls on the free tier.413 — Payload too large. `error.code`: `file_too_large` (the input exceeds the per-format upload ceiling, or expands past the content-processing ceiling once parsed) or `write_output_too_large` (the requested output would exceed the format write cap). These are capacity ceilings — identical for every caller, never a paywall lever.429 — Free-tier file allowance reached for the current period. `error.code`: `rate_limit_exceeded`.500 — Internal server error — an unexpected fault on our side. `error.code`: `internal_error`.503 — Service temporarily unavailable — retryable; a `Retry-After` header is sent when known. `error.code` is one of: `service_unavailable` (a backing service is down, or parse capacity is momentarily saturated), `rate_limit_backend_unavailable`, or `cache_backend_unavailable`.xlsx_protectionPOST /api/v1/tools/xlsx_protection — Use this when you need to surface every protection setting — workbook lock, per-sheet protection, per-action allow/block list, and which cells stay editable.
Auth: Authorization: Bearer <api_key> (required)
file object optional The spreadsheet file, handed off by a host that fills in the OpenAI file-parameter convention (openai/fileParams) from an uploaded or attached file. The server downloads download_url once, server-side; never a local sandbox path.
download_url string required Temporary https URL to download the file. Valid only for this call.
file_id string required Host file identifier.
file_name string optional Original file name (advisory only; never used as a path).
mime_type string optional Declared MIME type (advisory only).
file_b64 string requiredoptions object optionalsheet string optional{
"properties": {
"file": {
"additionalProperties": false,
"description": "The spreadsheet file, handed off by a host that fills in the OpenAI file-parameter convention (openai/fileParams) from an uploaded or attached file. The server downloads download_url once, server-side; never a local sandbox path.",
"properties": {
"download_url": {
"description": "Temporary https URL to download the file. Valid only for this call.",
"maxLength": 8192,
"minLength": 1,
"type": "string"
},
"file_id": {
"description": "Host file identifier.",
"maxLength": 256,
"type": "string"
},
"file_name": {
"description": "Original file name (advisory only; never used as a path).",
"maxLength": 256,
"type": "string"
},
"mime_type": {
"description": "Declared MIME type (advisory only).",
"maxLength": 256,
"type": "string"
}
},
"required": [
"download_url",
"file_id"
],
"type": "object"
},
"file_b64": {
"type": "string"
},
"options": {
"properties": {
"sheet": {
"type": "string"
}
},
"type": "object"
}
},
"required": [
"file_b64"
],
"type": "object"
}REST (curl):
curl -sX POST https://api.xlsx-for-ai.dev/api/v1/tools/xlsx_protection \
-H 'content-type: application/json' \
-H 'Authorization: Bearer <api_key>' \
-d '{"file_b64":"<BASE64_ENCODED_FILE_BYTES>"}'MCP (tools/call):
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "xlsx_protection",
"arguments": {
"file_url": "https://example.com/placeholder.xlsx"
}
}
}200 — Tool result (base64-in / base64-out; stateless).400 — Bad request. `error.code` is one of: `bad_request` (malformed or oversized JSON body, invalid base64, or a missing/invalid field), `hardening_rejected` (the upload failed an ingest safety guard — e.g. an encrypted workbook, a non-OOXML zip, a truncated file, or a legacy .xls on a route that does not accept it), `unparseable_input` (no readable CSV header row), `malformed_csv` (a structurally broken CSV — an unclosed or mid-field quote), or `unsupported_output_format` (`xlsx_convert` was asked to write old binary .xls — Excel 97-2003 is read-only here; request `xlsx` or `csv`). A sheet- or column-not-found request also carries `available_sheets` / `available_columns`. A `file_url` that could not be fetched keeps `error.code` `bad_request` and adds `error.reason`, one of: `google_not_shared` (a Google link not shared publicly), `url_download_failed_4xx` (the host answered a 4xx: 404 is a dead link, 401/403 a private one), `url_download_failed_5xx`, `url_download_failed_network` (no answer, e.g. DNS), `url_download_timeout`, `url_returned_html` (a web page, not a spreadsheet), `url_empty`, `url_refused`, `url_redirect_blocked` or `file_input_url_not_https`.401 — Missing or invalid API key. `error.code`: `unauthorized`.402 — Payment required. `error.code`: `tier_upgrade_required`. A forward-compatible response for a capability gated to a paid subscription; it is driven by the account/consent surface (POST /api/v1/consent), not by the stateless tool inputs. No action is needed for standard tool calls on the free tier.413 — Payload too large. `error.code`: `file_too_large` (the input exceeds the per-format upload ceiling, or expands past the content-processing ceiling once parsed) or `write_output_too_large` (the requested output would exceed the format write cap). These are capacity ceilings — identical for every caller, never a paywall lever.429 — Free-tier file allowance reached for the current period. `error.code`: `rate_limit_exceeded`.500 — Internal server error — an unexpected fault on our side. `error.code`: `internal_error`.503 — Service temporarily unavailable — retryable; a `Retry-After` header is sent when known. `error.code` is one of: `service_unavailable` (a backing service is down, or parse capacity is momentarily saturated), `rate_limit_backend_unavailable`, or `cache_backend_unavailable`.xlsx_readPOST /api/v1/tools/xlsx_read — Use this when you need to read a spreadsheet as text (markdown, JSON, or SQL) — from an uploaded .xlsx/.xls/.csv/.json file, or from a live Google Sheet by ID using source:"gsheets", spreadsheet_id, and access_token: a Google OAuth bearer already scoped for Sheets read access that the caller must supply. This connector's own Google sign-in is account login only and does not grant one — for a user who only has a shared link, pass it as file_url instead. format:"json" emits one object per sheet row, with a "row" field (the real 1-based sheet row number) and one key per column letter (A, B, ...); it carries values only, so a formula cell contributes its computed value rather than the formula text, styles and number formats do not survive (except as display text under value_format typed_with_text, below), and dates arrive as ISO-8601 strings because JSON has no date kind. A .csv is read the way Excel opens one (en-US): numbers (including 1,234.50, $5, 50% and (5)), TRUE/FALSE and dates (M/D/YYYY, YYYY-MM-DD, 15-Jan-2024, with an optional time) are typed values, read as an .xlsx cell of that type would be (display formats are not carried); ids with a leading zero (00123), digit strings longer than 15 digits and text that only looks numeric in another locale (1.234,56) stay text, and an empty field is a blank cell. Pass options.header_row:true with format:"json" to get rows keyed by the header row's values (e.g. {row:2, email:..., name:...}) instead of column letters; the header row itself is left out, so offset and maxRows count data rows, and duplicate or blank headers get unique names (a repeat becomes Name_2, a blank header becomes its column letter). For a messy export with a title, blank rows or notes above the header, pass options.header_row_auto:true (the header row xlsx_data_clean would find, row 1 when none) or options.header_row_number such as 3 (row 3 is the header, data starts at row 4), not both; _meta.header_row_used names the row used. An error cell (#N/A, #DIV/0!, #REF!, #NAME?, #VALUE!, #NUM!, #NULL!, #SPILL!, #CALC! and the other Excel error values) keeps its error code as the cell value and is also named in that row's "errors" object (same keys as the row: column letter, or the header name with header_row), so it reads differently from a text cell holding the same characters; rows with no error cells have no "errors" key. Set options.formulas:true to get formulas in any format, for the formula cells of the returned page, shared formulas expanded, paging with options.offset and options.maxRows: markdown adds a "<row> formula" line under each row that holds formulas, with each formula (= first) in its column; sql adds a "-- formula D2: =A2+1" comment after that row's statement; json adds formulas_by_cell next to rows, each formula cell by A1 ref (for example "D2") to its formula text without the leading =; in markdown and sql a backslash, line break or (markdown) pipe inside a formula is written \\, \n, \r or \|. Set options.value_format:"typed" with format:"json" to get typed values instead of display text: numbers as JSON numbers, TRUE/FALSE as true/false, a blank cell as null (every row then has a key for every used column of the sheet), dates as ISO-8601 strings and text as strings (an id with a leading zero stays text); the default, "text", is unchanged. Set options.value_format:"typed_with_text" with format:"json" to get each cell as {v, t, text}: v the typed value, t its type (number, string, boolean, date, error or blank) and text what Excel shows under the cell's number format (for example {"v": 1234.5, "t": "number", "text": "1,234.50"}, and "00123" keeps its zeros); a CSV field's text is the field as written, and where the text cannot be shown exactly it is left out and text_unavailable is true. In markdown, md cells are escaped: a backslash, pipe or line break in a cell or header is written \\, \|, \n or \r, so a value never shifts a column or starts a new row, and a line break in a sheet-name heading is written \n or \r.
Auth: Authorization: Bearer <api_key> (required)
access_token string optionalevaluate boolean optionalRecalculate every formula with the engine instead of returning the values saved in the file (default false). evaluate and options.evaluate are the same switch; sent with different values they are a 400. Every cell of every page, array and data-table cells included, is the recalculated value or #UNSUPPORTED! (null in typed json, named in errors), never the saved value. The reply says whether values were recalculated (_meta.recalculated on the API, one sentence after the result on MCP).
file_b64 string optionalfile_handle string optional Handle returned by xlsx_upload_link, once the user has uploaded the spreadsheet file on that page. Use this when the user attached the file in chat or has no link. Provide this OR file_url.
file_name string optional File name with its extension (.csv, .tsv or .json), used with file_text.
file_sha256 string optional Hex SHA-256 of the exact file_text UTF-8 text. Optional; checked when given.
file_text string optional Use only for a small CSV, TSV or JSON file whose full text you already have. Practical limit about 2,000 cells or 40 KB (the server hard cap is 256 KB); above that use file_url, or xlsx_upload_link and file_handle. Requires file_name. Never encode or retype a binary file by hand. Provide this OR file_url OR file_handle.
file_url string optional https URL of the spreadsheet file (e.g. a shared Google Drive, Google Sheets, Dropbox, OneDrive or S3 link; must be viewable by anyone with the link). The server downloads it directly. Provide this OR file_handle.
options object optionalevaluate boolean optionalRecalculate every formula with the engine instead of returning the values saved in the file (default false). evaluate and options.evaluate are the same switch; sent with different values they are a 400. Every cell of every page, array and data-table cells included, is the recalculated value or #UNSUPPORTED! (null in typed json, named in errors), never the saved value. The reply says whether values were recalculated (_meta.recalculated on the API, one sentence after the result on MCP).
format string optionalformulas boolean optionalShow formulas in any format (default false). md: a "<row> formula" line under each row with formulas, each formula (= first) in its column. sql: a "-- formula D2: =A2+1" comment after the row's statement. json: formulas_by_cell, A1 ref to text without the =.
header_row boolean optionalKey each json row by row 1's values instead of column letters, and leave row 1 out. Default false (off). For another header row use header_row_number or header_row_auto. Applies to format json only; offset and maxRows count data rows after the header. Duplicate or blank headers get unique names: a repeat becomes Name_2, Name_3 (case-insensitive after trimming), a blank header becomes its column letter. Works with value_format "typed" and on cache_handle reads; _meta.header_row_used names the row used.
header_row_auto boolean optionalWhen true, use the header row the sheet's own layout shows, found by the same detector xlsx_data_clean uses for header_row_not_first (a merged title, blank rows or notes above the header are skipped), falling back to row 1 when none is found. Implies header mode; do not combine with header_row_number, and not with header_row false. Applies to format json only; offset and maxRows count data rows after the header. Duplicate or blank headers get unique names: a repeat becomes Name_2, Name_3 (case-insensitive after trimming), a blank header becomes its column letter. Works with value_format "typed" and on cache_handle reads; _meta.header_row_used names the row used.
header_row_number integer optional Row N is the header: json rows are keyed by its values and data starts at row N+1 (rows above it are left out). Implies header mode; do not combine with header_row_auto, and not with header_row false. Applies to format json only; offset and maxRows count data rows after the header. Duplicate or blank headers get unique names: a repeat becomes Name_2, Name_3 (case-insensitive after trimming), a blank header becomes its column letter. Works with value_format "typed" and on cache_handle reads; _meta.header_row_used names the row used.
maxRows integer optional offset integer optional sheet string optionalvalue_format string optionaltext (default), typed or typed_with_text. typed, with format json only: each row value is a JSON number for a number, true or false for a boolean, null for a blank cell (every row has a key for every used column of the sheet), an ISO-8601 string for a date (YYYY-MM-DD, or YYYY-MM-DDTHH:MM:SS with a time) and a string for text, so ids with a leading zero stay text. An error cell keeps its code as a string and is named in the row's "errors" object. On a read that recalculates (evaluate, or formulas with no saved value) typed gives the recalculated values by the same rules; a formula the engine cannot calculate is null and named in "errors" as #UNSUPPORTED!. typed_with_text, with format json only: each cell is {v, t, text}: v is the typed value, t its type (number, string, boolean, date, error or blank) and text what Excel shows under the cell's number format (e.g. {"v": 1234.5, "t": "number", "text": "1,234.50"}; a CSV field's text is the field as written). Where the text cannot be shown exactly, text is left out and text_unavailable is true. An uncached formula cell is null, as in typed (a read that recalculates it is a 400). Not with evaluate, source gsheets or xlsx_read_handle (400). text: every value is its display text, as before.
source string optional spreadsheet_id string optional{
"properties": {
"access_token": {
"type": "string"
},
"evaluate": {
"description": "Recalculate every formula with the engine instead of returning the values saved in the file (default false). evaluate and options.evaluate are the same switch; sent with different values they are a 400. Every cell of every page, array and data-table cells included, is the recalculated value or #UNSUPPORTED! (null in typed json, named in errors), never the saved value. The reply says whether values were recalculated (_meta.recalculated on the API, one sentence after the result on MCP).",
"type": "boolean"
},
"file_b64": {
"type": "string"
},
"file_handle": {
"description": "Handle returned by xlsx_upload_link, once the user has uploaded the spreadsheet file on that page. Use this when the user attached the file in chat or has no link. Provide this OR file_url.",
"maxLength": 128,
"minLength": 1,
"type": "string"
},
"file_name": {
"description": "File name with its extension (.csv, .tsv or .json), used with file_text.",
"maxLength": 200,
"minLength": 1,
"type": "string"
},
"file_sha256": {
"description": "Hex SHA-256 of the exact file_text UTF-8 text. Optional; checked when given.",
"maxLength": 64,
"minLength": 64,
"type": "string"
},
"file_text": {
"description": "Use only for a small CSV, TSV or JSON file whose full text you already have. Practical limit about 2,000 cells or 40 KB (the server hard cap is 256 KB); above that use file_url, or xlsx_upload_link and file_handle. Requires file_name. Never encode or retype a binary file by hand. Provide this OR file_url OR file_handle.",
"maxLength": 262144,
"minLength": 1,
"type": "string"
},
"file_url": {
"description": "https URL of the spreadsheet file (e.g. a shared Google Drive, Google Sheets, Dropbox, OneDrive or S3 link; must be viewable by anyone with the link). The server downloads it directly. Provide this OR file_handle.",
"maxLength": 8192,
"minLength": 1,
"type": "string"
},
"options": {
"properties": {
"evaluate": {
"description": "Recalculate every formula with the engine instead of returning the values saved in the file (default false). evaluate and options.evaluate are the same switch; sent with different values they are a 400. Every cell of every page, array and data-table cells included, is the recalculated value or #UNSUPPORTED! (null in typed json, named in errors), never the saved value. The reply says whether values were recalculated (_meta.recalculated on the API, one sentence after the result on MCP).",
"type": "boolean"
},
"format": {
"type": "string"
},
"formulas": {
"description": "Show formulas in any format (default false). md: a \"<row> formula\" line under each row with formulas, each formula (= first) in its column. sql: a \"-- formula D2: =A2+1\" comment after the row's statement. json: formulas_by_cell, A1 ref to text without the =.",
"type": "boolean"
},
"header_row": {
"description": "Key each json row by row 1's values instead of column letters, and leave row 1 out. Default false (off). For another header row use header_row_number or header_row_auto. Applies to format json only; offset and maxRows count data rows after the header. Duplicate or blank headers get unique names: a repeat becomes Name_2, Name_3 (case-insensitive after trimming), a blank header becomes its column letter. Works with value_format \"typed\" and on cache_handle reads; _meta.header_row_used names the row used.",
"type": "boolean"
},
"header_row_auto": {
"description": "When true, use the header row the sheet's own layout shows, found by the same detector xlsx_data_clean uses for header_row_not_first (a merged title, blank rows or notes above the header are skipped), falling back to row 1 when none is found. Implies header mode; do not combine with header_row_number, and not with header_row false. Applies to format json only; offset and maxRows count data rows after the header. Duplicate or blank headers get unique names: a repeat becomes Name_2, Name_3 (case-insensitive after trimming), a blank header becomes its column letter. Works with value_format \"typed\" and on cache_handle reads; _meta.header_row_used names the row used.",
"type": "boolean"
},
"header_row_number": {
"description": "Row N is the header: json rows are keyed by its values and data starts at row N+1 (rows above it are left out). Implies header mode; do not combine with header_row_auto, and not with header_row false. Applies to format json only; offset and maxRows count data rows after the header. Duplicate or blank headers get unique names: a repeat becomes Name_2, Name_3 (case-insensitive after trimming), a blank header becomes its column letter. Works with value_format \"typed\" and on cache_handle reads; _meta.header_row_used names the row used.",
"minimum": 1,
"type": "integer"
},
"maxRows": {
"maximum": 100000,
"minimum": 1,
"type": "integer"
},
"offset": {
"minimum": 0,
"type": "integer"
},
"sheet": {
"type": "string"
},
"value_format": {
"description": "text (default), typed or typed_with_text. typed, with format json only: each row value is a JSON number for a number, true or false for a boolean, null for a blank cell (every row has a key for every used column of the sheet), an ISO-8601 string for a date (YYYY-MM-DD, or YYYY-MM-DDTHH:MM:SS with a time) and a string for text, so ids with a leading zero stay text. An error cell keeps its code as a string and is named in the row's \"errors\" object. On a read that recalculates (evaluate, or formulas with no saved value) typed gives the recalculated values by the same rules; a formula the engine cannot calculate is null and named in \"errors\" as #UNSUPPORTED!. typed_with_text, with format json only: each cell is {v, t, text}: v is the typed value, t its type (number, string, boolean, date, error or blank) and text what Excel shows under the cell's number format (e.g. {\"v\": 1234.5, \"t\": \"number\", \"text\": \"1,234.50\"}; a CSV field's text is the field as written). Where the text cannot be shown exactly, text is left out and text_unavailable is true. An uncached formula cell is null, as in typed (a read that recalculates it is a 400). Not with evaluate, source gsheets or xlsx_read_handle (400). text: every value is its display text, as before.",
"type": "string"
}
},
"type": "object"
},
"source": {
"enum": [
"gsheets"
],
"type": "string"
},
"spreadsheet_id": {
"type": "string"
}
},
"required": [],
"type": "object"
}REST (curl):
curl -sX POST https://api.xlsx-for-ai.dev/api/v1/tools/xlsx_read \
-H 'content-type: application/json' \
-H 'Authorization: Bearer <api_key>' \
-d '{"file_b64":"<BASE64_ENCODED_FILE_BYTES>"}'MCP (tools/call):
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "xlsx_read",
"arguments": {
"file_url": "https://example.com/placeholder.xlsx"
}
}
}200 — Tool result (base64-in / base64-out; stateless). A `file_text` whose `file_name` ends in .xlsx, .xlsm, .xls, .xlsb, .ods, .xltx, .xltm or .xlam computes nothing: the reply is still 200, with `status` `workbook_text_retired`, `computed` false, `upload_url` (send the file there with one PUT), `upload_page` (the page a person opens to drop the file in), `file_handle` (pass it to the same tool once the file is uploaded) and `expires_at`. A text copy loses defined names, styles, merged cells, validations and macros, so a workbook is never sent as text.400 — Bad request. `error.code` is one of: `bad_request` (malformed or oversized JSON body, invalid base64, or a missing/invalid field), `hardening_rejected` (the upload failed an ingest safety guard — e.g. an encrypted workbook, a non-OOXML zip, a truncated file, or a legacy .xls on a route that does not accept it), `unparseable_input` (no readable CSV header row), `malformed_csv` (a structurally broken CSV — an unclosed or mid-field quote), or `unsupported_output_format` (`xlsx_convert` was asked to write old binary .xls — Excel 97-2003 is read-only here; request `xlsx` or `csv`). A sheet- or column-not-found request also carries `available_sheets` / `available_columns`. A `file_url` that could not be fetched keeps `error.code` `bad_request` and adds `error.reason`, one of: `google_not_shared` (a Google link not shared publicly), `url_download_failed_4xx` (the host answered a 4xx: 404 is a dead link, 401/403 a private one), `url_download_failed_5xx`, `url_download_failed_network` (no answer, e.g. DNS), `url_download_timeout`, `url_returned_html` (a web page, not a spreadsheet), `url_empty`, `url_refused`, `url_redirect_blocked` or `file_input_url_not_https`.401 — Missing or invalid API key. `error.code`: `unauthorized`.402 — Payment required. `error.code`: `tier_upgrade_required`. A forward-compatible response for a capability gated to a paid subscription; it is driven by the account/consent surface (POST /api/v1/consent), not by the stateless tool inputs. No action is needed for standard tool calls on the free tier.413 — Payload too large. `error.code`: `file_too_large` (the input exceeds the per-format upload ceiling, or expands past the content-processing ceiling once parsed) or `write_output_too_large` (the requested output would exceed the format write cap). These are capacity ceilings — identical for every caller, never a paywall lever.429 — Free-tier file allowance reached for the current period. `error.code`: `rate_limit_exceeded`.500 — Internal server error — an unexpected fault on our side. `error.code`: `internal_error`.501 — Not served yet. `error.code`: `capability_gap`. A read that recalculates (`evaluate` or `options.evaluate` true) on a workbook that uses the 1904 date system: the engine computes dates in the 1900 system only, so it declines instead of answering dates 1,462 days off. Read the file without evaluate to get its saved values. Not transient: retrying the same file does not help.503 — Service temporarily unavailable — retryable; a `Retry-After` header is sent when known. `error.code` is one of: `service_unavailable` (a backing service is down, or parse capacity is momentarily saturated), `rate_limit_backend_unavailable`, or `cache_backend_unavailable`.xlsx_read_handlePOST /api/v1/tools/xlsx_read_handle — [Stateful · session/handle-based] Use this when you need to read a workbook already uploaded via the chunked cache flow, by its server-side handle — skips re-sending the bytes.
Auth: Authorization: Bearer <api_key> (required)
options object optionalformat string optional sheet string optionalvalue_format string optionaltext (default) or typed. typed, with format json only: each cell is a JSON number for a number, true or false for a boolean, an ISO-8601 string for a date, a string for text, {"error": code} for an error cell and null for a blank cell; a formula cell is its saved value; every row is padded with null to the sheet's used width. text: the raw values as before (a date is its serial number, a formula cell is {formula, result}). typed_with_text is xlsx_read only (400 here).
workbook_handle string required {
"properties": {
"options": {
"properties": {
"format": {
"enum": [
"md",
"json"
],
"type": "string"
},
"sheet": {
"type": "string"
},
"value_format": {
"description": "text (default) or typed. typed, with format json only: each cell is a JSON number for a number, true or false for a boolean, an ISO-8601 string for a date, a string for text, {\"error\": code} for an error cell and null for a blank cell; a formula cell is its saved value; every row is padded with null to the sheet's used width. text: the raw values as before (a date is its serial number, a formula cell is {formula, result}). typed_with_text is xlsx_read only (400 here).",
"type": "string"
}
},
"type": "object"
},
"workbook_handle": {
"maxLength": 128,
"minLength": 1,
"pattern": "^[^\\u0000-\\u001f\\u007f\\s:*?\\[\\]]+$",
"type": "string"
}
},
"required": [
"workbook_handle"
],
"type": "object"
}REST (curl):
curl -sX POST https://api.xlsx-for-ai.dev/api/v1/tools/xlsx_read_handle \
-H 'content-type: application/json' \
-H 'Authorization: Bearer <api_key>' \
-d '{"workbook_handle":"example-value"}'MCP (tools/call):
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "xlsx_read_handle",
"arguments": {
"workbook_handle": "example-value"
}
}
}200 — Tool result. Uploading the handle (POST /api/v1/cache/upload-chunk, documented here because it is not a tool path): the handle comes from the keyed chunked upload: POST /api/v1/cache/upload-chunk with {handle, chunk_index, total_chunks, chunk_b64} for each chunk, then POST /api/v1/cache/finalize with {handle}. Each chunk reply is {handle, received, total, complete, received_indices}: received_indices is the sorted list of chunk_index values stored so far. To resume after a dropped connection, resend only the indices missing from received_indices. Resending a stored index with the identical bytes is accepted (200) and changes nothing. An unfinished upload is kept 30 minutes after its last chunk.400 — Bad request. `error.code` is one of: `bad_request` (malformed or oversized JSON body, invalid base64, or a missing/invalid field), `hardening_rejected` (the upload failed an ingest safety guard — e.g. an encrypted workbook, a non-OOXML zip, a truncated file, or a legacy .xls on a route that does not accept it), `unparseable_input` (no readable CSV header row), `malformed_csv` (a structurally broken CSV — an unclosed or mid-field quote), or `unsupported_output_format` (`xlsx_convert` was asked to write old binary .xls — Excel 97-2003 is read-only here; request `xlsx` or `csv`). A sheet- or column-not-found request also carries `available_sheets` / `available_columns`. A `file_url` that could not be fetched keeps `error.code` `bad_request` and adds `error.reason`, one of: `google_not_shared` (a Google link not shared publicly), `url_download_failed_4xx` (the host answered a 4xx: 404 is a dead link, 401/403 a private one), `url_download_failed_5xx`, `url_download_failed_network` (no answer, e.g. DNS), `url_download_timeout`, `url_returned_html` (a web page, not a spreadsheet), `url_empty`, `url_refused`, `url_redirect_blocked` or `file_input_url_not_https`.401 — Missing or invalid API key. `error.code`: `unauthorized`.402 — Payment required. `error.code`: `tier_upgrade_required`. A forward-compatible response for a capability gated to a paid subscription; it is driven by the account/consent surface (POST /api/v1/consent), not by the stateless tool inputs. No action is needed for standard tool calls on the free tier.409 — Never from this tool: from POST /api/v1/cache/upload-chunk, the upload step before it. `error.code`: `chunk_mismatch`: that chunk_index is already stored with a different body, and nothing was written. Resend the index with the same bytes, or start again under a new handle.413 — Payload too large. `error.code`: `file_too_large` (the input exceeds the per-format upload ceiling, or expands past the content-processing ceiling once parsed) or `write_output_too_large` (the requested output would exceed the format write cap). These are capacity ceilings — identical for every caller, never a paywall lever.429 — Free-tier file allowance reached for the current period. `error.code`: `rate_limit_exceeded`.500 — Internal server error — an unexpected fault on our side. `error.code`: `internal_error`.503 — Service temporarily unavailable — retryable; a `Retry-After` header is sent when known. `error.code` is one of: `service_unavailable` (a backing service is down, or parse capacity is momentarily saturated), `rate_limit_backend_unavailable`, or `cache_backend_unavailable`.xlsx_receiptPOST /api/v1/tools/xlsx_receipt — Use this when you need to attach a cryptographic AI-generation receipt to a workbook — who/what/when generated it, against which inputs.
Auth: Authorization: Bearer <api_key> (required)
agent object requireddisplay_name string optional identity_url string optional name string required covers_sheets array optional description string optional file object optional The spreadsheet file, handed off by a host that fills in the OpenAI file-parameter convention (openai/fileParams) from an uploaded or attached file. The server downloads download_url once, server-side; never a local sandbox path.
download_url string required Temporary https URL to download the file. Valid only for this call.
file_id string required Host file identifier.
file_name string optional Original file name (advisory only; never used as a path).
mime_type string optional Declared MIME type (advisory only).
file_b64 string optionalinputs object optionalcustom object optionalmcp_tools_called array optional prompt_hash string optional source_file_hashes array optional {
"properties": {
"name": {
"maxLength": 256,
"minLength": 1,
"type": "string"
},
"sha256": {
"pattern": "^[a-f0-9]{64}$",
"type": "string"
}
},
"required": [
"name",
"sha256"
],
"type": "object"
}workbook_handle string optional {
"properties": {
"agent": {
"properties": {
"display_name": {
"maxLength": 256,
"type": "string"
},
"identity_url": {
"maxLength": 512,
"type": "string"
},
"name": {
"maxLength": 128,
"minLength": 1,
"pattern": "^[a-z0-9][a-z0-9\\-_/.:]{0,127}$",
"type": "string"
}
},
"required": [
"name"
],
"type": "object"
},
"covers_sheets": {
"items": {
"maxLength": 128,
"type": "string"
},
"maxItems": 100,
"type": "array"
},
"description": {
"maxLength": 256,
"type": "string"
},
"file": {
"additionalProperties": false,
"description": "The spreadsheet file, handed off by a host that fills in the OpenAI file-parameter convention (openai/fileParams) from an uploaded or attached file. The server downloads download_url once, server-side; never a local sandbox path.",
"properties": {
"download_url": {
"description": "Temporary https URL to download the file. Valid only for this call.",
"maxLength": 8192,
"minLength": 1,
"type": "string"
},
"file_id": {
"description": "Host file identifier.",
"maxLength": 256,
"type": "string"
},
"file_name": {
"description": "Original file name (advisory only; never used as a path).",
"maxLength": 256,
"type": "string"
},
"mime_type": {
"description": "Declared MIME type (advisory only).",
"maxLength": 256,
"type": "string"
}
},
"required": [
"download_url",
"file_id"
],
"type": "object"
},
"file_b64": {
"type": "string"
},
"inputs": {
"properties": {
"custom": {
"type": "object"
},
"mcp_tools_called": {
"items": {
"maxLength": 128,
"minLength": 1,
"type": "string"
},
"maxItems": 100,
"type": "array"
},
"prompt_hash": {
"pattern": "^[a-f0-9]{64}$",
"type": "string"
},
"source_file_hashes": {
"items": {
"properties": {
"name": {
"maxLength": 256,
"minLength": 1,
"type": "string"
},
"sha256": {
"pattern": "^[a-f0-9]{64}$",
"type": "string"
}
},
"required": [
"name",
"sha256"
],
"type": "object"
},
"maxItems": 200,
"type": "array"
}
},
"type": "object"
},
"workbook_handle": {
"maxLength": 128,
"minLength": 1,
"type": "string"
}
},
"required": [
"agent"
],
"type": "object"
}REST (curl):
curl -sX POST https://api.xlsx-for-ai.dev/api/v1/tools/xlsx_receipt \
-H 'content-type: application/json' \
-H 'Authorization: Bearer <api_key>' \
-d '{"agent":{"name":"example-value"},"file_b64":"<BASE64_ENCODED_FILE_BYTES>"}'MCP (tools/call):
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "xlsx_receipt",
"arguments": {
"agent": {
"name": "example-value"
},
"file_url": "https://example.com/placeholder.xlsx"
}
}
}200 — Tool result (base64-in / base64-out; stateless).400 — Bad request. `error.code` is one of: `bad_request` (malformed or oversized JSON body, invalid base64, or a missing/invalid field), `hardening_rejected` (the upload failed an ingest safety guard — e.g. an encrypted workbook, a non-OOXML zip, a truncated file, or a legacy .xls on a route that does not accept it), `unparseable_input` (no readable CSV header row), `malformed_csv` (a structurally broken CSV — an unclosed or mid-field quote), or `unsupported_output_format` (`xlsx_convert` was asked to write old binary .xls — Excel 97-2003 is read-only here; request `xlsx` or `csv`). A sheet- or column-not-found request also carries `available_sheets` / `available_columns`. A `file_url` that could not be fetched keeps `error.code` `bad_request` and adds `error.reason`, one of: `google_not_shared` (a Google link not shared publicly), `url_download_failed_4xx` (the host answered a 4xx: 404 is a dead link, 401/403 a private one), `url_download_failed_5xx`, `url_download_failed_network` (no answer, e.g. DNS), `url_download_timeout`, `url_returned_html` (a web page, not a spreadsheet), `url_empty`, `url_refused`, `url_redirect_blocked` or `file_input_url_not_https`.401 — Missing or invalid API key. `error.code`: `unauthorized`.402 — Payment required. `error.code`: `tier_upgrade_required`. A forward-compatible response for a capability gated to a paid subscription; it is driven by the account/consent surface (POST /api/v1/consent), not by the stateless tool inputs. No action is needed for standard tool calls on the free tier.413 — Payload too large. `error.code`: `file_too_large` (the input exceeds the per-format upload ceiling, or expands past the content-processing ceiling once parsed) or `write_output_too_large` (the requested output would exceed the format write cap). These are capacity ceilings — identical for every caller, never a paywall lever.429 — Free-tier file allowance reached for the current period. `error.code`: `rate_limit_exceeded`.500 — Internal server error — an unexpected fault on our side. `error.code`: `internal_error`.503 — Service temporarily unavailable — retryable; a `Retry-After` header is sent when known. `error.code` is one of: `service_unavailable` (a backing service is down, or parse capacity is momentarily saturated), `rate_limit_backend_unavailable`, or `cache_backend_unavailable`.xlsx_redactPOST /api/v1/tools/xlsx_redact — Use this when you need to redact PII and sensitive values from a spreadsheet before sharing or archiving, preserving formulas/comments/styles by default.
Auth: Authorization: Bearer <api_key> (required)
file object optional The spreadsheet file, handed off by a host that fills in the OpenAI file-parameter convention (openai/fileParams) from an uploaded or attached file. The server downloads download_url once, server-side; never a local sandbox path.
download_url string required Temporary https URL to download the file. Valid only for this call.
file_id string required Host file identifier.
file_name string optional Original file name (advisory only; never used as a path).
mime_type string optional Declared MIME type (advisory only).
file_b64 string requiredoptions object optionalmode string optional strip_comments boolean optionalstrip_formulas boolean optionalstrip_macros boolean optionalstrip_metadata boolean optional{
"properties": {
"file": {
"additionalProperties": false,
"description": "The spreadsheet file, handed off by a host that fills in the OpenAI file-parameter convention (openai/fileParams) from an uploaded or attached file. The server downloads download_url once, server-side; never a local sandbox path.",
"properties": {
"download_url": {
"description": "Temporary https URL to download the file. Valid only for this call.",
"maxLength": 8192,
"minLength": 1,
"type": "string"
},
"file_id": {
"description": "Host file identifier.",
"maxLength": 256,
"type": "string"
},
"file_name": {
"description": "Original file name (advisory only; never used as a path).",
"maxLength": 256,
"type": "string"
},
"mime_type": {
"description": "Declared MIME type (advisory only).",
"maxLength": 256,
"type": "string"
}
},
"required": [
"download_url",
"file_id"
],
"type": "object"
},
"file_b64": {
"type": "string"
},
"options": {
"properties": {
"mode": {
"enum": [
"pii",
"scaffold",
"none"
],
"type": "string"
},
"strip_comments": {
"type": "boolean"
},
"strip_formulas": {
"type": "boolean"
},
"strip_macros": {
"type": "boolean"
},
"strip_metadata": {
"type": "boolean"
}
},
"type": "object"
}
},
"required": [
"file_b64"
],
"type": "object"
}REST (curl):
curl -sX POST https://api.xlsx-for-ai.dev/api/v1/tools/xlsx_redact \
-H 'content-type: application/json' \
-H 'Authorization: Bearer <api_key>' \
-d '{"file_b64":"<BASE64_ENCODED_FILE_BYTES>"}'MCP (tools/call):
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "xlsx_redact",
"arguments": {
"file_url": "https://example.com/placeholder.xlsx"
}
}
}200 — Tool result (base64-in / base64-out; stateless).400 — Bad request. `error.code` is one of: `bad_request` (malformed or oversized JSON body, invalid base64, or a missing/invalid field), `hardening_rejected` (the upload failed an ingest safety guard — e.g. an encrypted workbook, a non-OOXML zip, a truncated file, or a legacy .xls on a route that does not accept it), `unparseable_input` (no readable CSV header row), `malformed_csv` (a structurally broken CSV — an unclosed or mid-field quote), or `unsupported_output_format` (`xlsx_convert` was asked to write old binary .xls — Excel 97-2003 is read-only here; request `xlsx` or `csv`). A sheet- or column-not-found request also carries `available_sheets` / `available_columns`. A `file_url` that could not be fetched keeps `error.code` `bad_request` and adds `error.reason`, one of: `google_not_shared` (a Google link not shared publicly), `url_download_failed_4xx` (the host answered a 4xx: 404 is a dead link, 401/403 a private one), `url_download_failed_5xx`, `url_download_failed_network` (no answer, e.g. DNS), `url_download_timeout`, `url_returned_html` (a web page, not a spreadsheet), `url_empty`, `url_refused`, `url_redirect_blocked` or `file_input_url_not_https`.401 — Missing or invalid API key. `error.code`: `unauthorized`.402 — Payment required. `error.code`: `tier_upgrade_required`. A forward-compatible response for a capability gated to a paid subscription; it is driven by the account/consent surface (POST /api/v1/consent), not by the stateless tool inputs. No action is needed for standard tool calls on the free tier.413 — Payload too large. `error.code`: `file_too_large` (the input exceeds the per-format upload ceiling, or expands past the content-processing ceiling once parsed) or `write_output_too_large` (the requested output would exceed the format write cap). These are capacity ceilings — identical for every caller, never a paywall lever.429 — Free-tier file allowance reached for the current period. `error.code`: `rate_limit_exceeded`.500 — Internal server error — an unexpected fault on our side. `error.code`: `internal_error`.503 — Service temporarily unavailable — retryable; a `Retry-After` header is sent when known. `error.code` is one of: `service_unavailable` (a backing service is down, or parse capacity is momentarily saturated), `rate_limit_backend_unavailable`, or `cache_backend_unavailable`.xlsx_schemaPOST /api/v1/tools/xlsx_schema — Use this when you need to infer per-column types from the first rows of a sheet, with sample values and confidence.
Auth: Authorization: Bearer <api_key> (required)
file_b64 string optionalSend exactly one file source: file_b64 (this field), file_url, file_handle, or file_text together with file_name.
file_handle string optional Handle returned by xlsx_upload_link, once the user has uploaded the spreadsheet file on that page. Use this when the user attached the file in chat or has no link. Provide this OR file_url.
file_name string optional File name with its extension (.csv, .tsv or .json), used with file_text.
file_sha256 string optional Hex SHA-256 of the exact file_text UTF-8 text. Optional; checked when given.
file_text string optional Use only for a small CSV, TSV or JSON file whose full text you already have. Practical limit about 2,000 cells or 40 KB (the server hard cap is 256 KB); above that use file_url, or xlsx_upload_link and file_handle. Requires file_name. Never encode or retype a binary file by hand. Provide this OR file_url OR file_handle.
file_url string optional https URL of the spreadsheet file (e.g. a shared Google Drive, Google Sheets, Dropbox, OneDrive or S3 link; must be viewable by anyone with the link). The server downloads it directly. Provide this OR file_handle.
options object optionalrange string optionalsheet string optional{
"properties": {
"file_b64": {
"description": "Send exactly one file source: file_b64 (this field), file_url, file_handle, or file_text together with file_name.",
"type": "string"
},
"file_handle": {
"description": "Handle returned by xlsx_upload_link, once the user has uploaded the spreadsheet file on that page. Use this when the user attached the file in chat or has no link. Provide this OR file_url.",
"maxLength": 128,
"minLength": 1,
"type": "string"
},
"file_name": {
"description": "File name with its extension (.csv, .tsv or .json), used with file_text.",
"maxLength": 200,
"minLength": 1,
"type": "string"
},
"file_sha256": {
"description": "Hex SHA-256 of the exact file_text UTF-8 text. Optional; checked when given.",
"maxLength": 64,
"minLength": 64,
"type": "string"
},
"file_text": {
"description": "Use only for a small CSV, TSV or JSON file whose full text you already have. Practical limit about 2,000 cells or 40 KB (the server hard cap is 256 KB); above that use file_url, or xlsx_upload_link and file_handle. Requires file_name. Never encode or retype a binary file by hand. Provide this OR file_url OR file_handle.",
"maxLength": 262144,
"minLength": 1,
"type": "string"
},
"file_url": {
"description": "https URL of the spreadsheet file (e.g. a shared Google Drive, Google Sheets, Dropbox, OneDrive or S3 link; must be viewable by anyone with the link). The server downloads it directly. Provide this OR file_handle.",
"maxLength": 8192,
"minLength": 1,
"type": "string"
},
"options": {
"properties": {
"range": {
"type": "string"
},
"sheet": {
"type": "string"
}
},
"type": "object"
}
},
"required": [],
"type": "object",
"oneOf": [
{
"required": [
"file_b64"
]
},
{
"required": [
"file_url"
]
},
{
"required": [
"file_handle"
]
},
{
"required": [
"file_text",
"file_name"
]
}
]
}REST (curl):
curl -sX POST https://api.xlsx-for-ai.dev/api/v1/tools/xlsx_schema \
-H 'content-type: application/json' \
-H 'Authorization: Bearer <api_key>' \
-d '{"file_b64":"<BASE64_ENCODED_FILE_BYTES>"}'MCP (tools/call):
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "xlsx_schema",
"arguments": {
"file_url": "https://example.com/placeholder.xlsx"
}
}
}200 — Tool result (base64-in / base64-out; stateless). A `file_text` whose `file_name` ends in .xlsx, .xlsm, .xls, .xlsb, .ods, .xltx, .xltm or .xlam computes nothing: the reply is still 200, with `status` `workbook_text_retired`, `computed` false, `upload_url` (send the file there with one PUT), `upload_page` (the page a person opens to drop the file in), `file_handle` (pass it to the same tool once the file is uploaded) and `expires_at`. A text copy loses defined names, styles, merged cells, validations and macros, so a workbook is never sent as text.400 — Bad request. `error.code` is one of: `bad_request` (malformed or oversized JSON body, invalid base64, or a missing/invalid field), `hardening_rejected` (the upload failed an ingest safety guard — e.g. an encrypted workbook, a non-OOXML zip, a truncated file, or a legacy .xls on a route that does not accept it), `unparseable_input` (no readable CSV header row), `malformed_csv` (a structurally broken CSV — an unclosed or mid-field quote), or `unsupported_output_format` (`xlsx_convert` was asked to write old binary .xls — Excel 97-2003 is read-only here; request `xlsx` or `csv`). A sheet- or column-not-found request also carries `available_sheets` / `available_columns`. A `file_url` that could not be fetched keeps `error.code` `bad_request` and adds `error.reason`, one of: `google_not_shared` (a Google link not shared publicly), `url_download_failed_4xx` (the host answered a 4xx: 404 is a dead link, 401/403 a private one), `url_download_failed_5xx`, `url_download_failed_network` (no answer, e.g. DNS), `url_download_timeout`, `url_returned_html` (a web page, not a spreadsheet), `url_empty`, `url_refused`, `url_redirect_blocked` or `file_input_url_not_https`.401 — Missing or invalid API key. `error.code`: `unauthorized`.402 — Payment required. `error.code`: `tier_upgrade_required`. A forward-compatible response for a capability gated to a paid subscription; it is driven by the account/consent surface (POST /api/v1/consent), not by the stateless tool inputs. No action is needed for standard tool calls on the free tier.413 — Payload too large. `error.code`: `file_too_large` (the input exceeds the per-format upload ceiling, or expands past the content-processing ceiling once parsed) or `write_output_too_large` (the requested output would exceed the format write cap). These are capacity ceilings — identical for every caller, never a paywall lever.429 — Free-tier file allowance reached for the current period. `error.code`: `rate_limit_exceeded`.500 — Internal server error — an unexpected fault on our side. `error.code`: `internal_error`.503 — Service temporarily unavailable — retryable; a `Retry-After` header is sent when known. `error.code` is one of: `service_unavailable` (a backing service is down, or parse capacity is momentarily saturated), `rate_limit_backend_unavailable`, or `cache_backend_unavailable`.xlsx_session_set_validationsPOST /api/v1/tools/xlsx_session_set_validations — [Stateful · session/handle-based] Use this when you need to configure per-session data-validation rules the server applies to subsequent calls in the same session.
Auth: Authorization: Bearer <api_key> (required)
session_id string required validations array required ref string requiredsheet string requiredtype string required{
"properties": {
"session_id": {
"maxLength": 128,
"minLength": 16,
"type": "string"
},
"validations": {
"items": {
"additionalProperties": true,
"properties": {
"ref": {
"type": "string"
},
"sheet": {
"type": "string"
},
"type": {
"type": "string"
}
},
"required": [
"ref",
"sheet",
"type"
],
"type": "object"
},
"maxItems": 5000,
"minItems": 1,
"type": "array"
}
},
"required": [
"session_id",
"validations"
],
"type": "object"
}REST (curl):
curl -sX POST https://api.xlsx-for-ai.dev/api/v1/tools/xlsx_session_set_validations \
-H 'content-type: application/json' \
-H 'Authorization: Bearer <api_key>' \
-d '{"session_id":"example-value-example-value","validations":[{"ref":"example-value","sheet":"example-value","type":"example-value"}]}'MCP (tools/call):
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "xlsx_session_set_validations",
"arguments": {
"session_id": "example-value-example-value",
"validations": [
{
"ref": "example-value",
"sheet": "example-value",
"type": "example-value"
}
]
}
}
}200 — Tool result (base64-in / base64-out; stateless).400 — Bad request. `error.code` is one of: `bad_request` (malformed or oversized JSON body, invalid base64, or a missing/invalid field), `hardening_rejected` (the upload failed an ingest safety guard — e.g. an encrypted workbook, a non-OOXML zip, a truncated file, or a legacy .xls on a route that does not accept it), `unparseable_input` (no readable CSV header row), `malformed_csv` (a structurally broken CSV — an unclosed or mid-field quote), or `unsupported_output_format` (`xlsx_convert` was asked to write old binary .xls — Excel 97-2003 is read-only here; request `xlsx` or `csv`). A sheet- or column-not-found request also carries `available_sheets` / `available_columns`. A `file_url` that could not be fetched keeps `error.code` `bad_request` and adds `error.reason`, one of: `google_not_shared` (a Google link not shared publicly), `url_download_failed_4xx` (the host answered a 4xx: 404 is a dead link, 401/403 a private one), `url_download_failed_5xx`, `url_download_failed_network` (no answer, e.g. DNS), `url_download_timeout`, `url_returned_html` (a web page, not a spreadsheet), `url_empty`, `url_refused`, `url_redirect_blocked` or `file_input_url_not_https`.401 — Missing or invalid API key. `error.code`: `unauthorized`.402 — Payment required. `error.code`: `tier_upgrade_required`. A forward-compatible response for a capability gated to a paid subscription; it is driven by the account/consent surface (POST /api/v1/consent), not by the stateless tool inputs. No action is needed for standard tool calls on the free tier.413 — Payload too large. `error.code`: `file_too_large` (the input exceeds the per-format upload ceiling, or expands past the content-processing ceiling once parsed) or `write_output_too_large` (the requested output would exceed the format write cap). These are capacity ceilings — identical for every caller, never a paywall lever.429 — Free-tier file allowance reached for the current period. `error.code`: `rate_limit_exceeded`.500 — Internal server error — an unexpected fault on our side. `error.code`: `internal_error`.503 — Service temporarily unavailable — retryable; a `Retry-After` header is sent when known. `error.code` is one of: `service_unavailable` (a backing service is down, or parse capacity is momentarily saturated), `rate_limit_backend_unavailable`, or `cache_backend_unavailable`.xlsx_slicers_timelinesPOST /api/v1/tools/xlsx_slicers_timelines — Use this when you need to list every slicer and timeline (interactive filter controls) in a workbook with their source bindings.
Auth: Authorization: Bearer <api_key> (required)
file object optional The spreadsheet file, handed off by a host that fills in the OpenAI file-parameter convention (openai/fileParams) from an uploaded or attached file. The server downloads download_url once, server-side; never a local sandbox path.
download_url string required Temporary https URL to download the file. Valid only for this call.
file_id string required Host file identifier.
file_name string optional Original file name (advisory only; never used as a path).
mime_type string optional Declared MIME type (advisory only).
file_b64 string required{
"properties": {
"file": {
"additionalProperties": false,
"description": "The spreadsheet file, handed off by a host that fills in the OpenAI file-parameter convention (openai/fileParams) from an uploaded or attached file. The server downloads download_url once, server-side; never a local sandbox path.",
"properties": {
"download_url": {
"description": "Temporary https URL to download the file. Valid only for this call.",
"maxLength": 8192,
"minLength": 1,
"type": "string"
},
"file_id": {
"description": "Host file identifier.",
"maxLength": 256,
"type": "string"
},
"file_name": {
"description": "Original file name (advisory only; never used as a path).",
"maxLength": 256,
"type": "string"
},
"mime_type": {
"description": "Declared MIME type (advisory only).",
"maxLength": 256,
"type": "string"
}
},
"required": [
"download_url",
"file_id"
],
"type": "object"
},
"file_b64": {
"type": "string"
}
},
"required": [
"file_b64"
],
"type": "object"
}REST (curl):
curl -sX POST https://api.xlsx-for-ai.dev/api/v1/tools/xlsx_slicers_timelines \
-H 'content-type: application/json' \
-H 'Authorization: Bearer <api_key>' \
-d '{"file_b64":"<BASE64_ENCODED_FILE_BYTES>"}'MCP (tools/call):
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "xlsx_slicers_timelines",
"arguments": {
"file_url": "https://example.com/placeholder.xlsx"
}
}
}200 — Tool result (base64-in / base64-out; stateless).400 — Bad request. `error.code` is one of: `bad_request` (malformed or oversized JSON body, invalid base64, or a missing/invalid field), `hardening_rejected` (the upload failed an ingest safety guard — e.g. an encrypted workbook, a non-OOXML zip, a truncated file, or a legacy .xls on a route that does not accept it), `unparseable_input` (no readable CSV header row), `malformed_csv` (a structurally broken CSV — an unclosed or mid-field quote), or `unsupported_output_format` (`xlsx_convert` was asked to write old binary .xls — Excel 97-2003 is read-only here; request `xlsx` or `csv`). A sheet- or column-not-found request also carries `available_sheets` / `available_columns`. A `file_url` that could not be fetched keeps `error.code` `bad_request` and adds `error.reason`, one of: `google_not_shared` (a Google link not shared publicly), `url_download_failed_4xx` (the host answered a 4xx: 404 is a dead link, 401/403 a private one), `url_download_failed_5xx`, `url_download_failed_network` (no answer, e.g. DNS), `url_download_timeout`, `url_returned_html` (a web page, not a spreadsheet), `url_empty`, `url_refused`, `url_redirect_blocked` or `file_input_url_not_https`.401 — Missing or invalid API key. `error.code`: `unauthorized`.402 — Payment required. `error.code`: `tier_upgrade_required`. A forward-compatible response for a capability gated to a paid subscription; it is driven by the account/consent surface (POST /api/v1/consent), not by the stateless tool inputs. No action is needed for standard tool calls on the free tier.413 — Payload too large. `error.code`: `file_too_large` (the input exceeds the per-format upload ceiling, or expands past the content-processing ceiling once parsed) or `write_output_too_large` (the requested output would exceed the format write cap). These are capacity ceilings — identical for every caller, never a paywall lever.429 — Free-tier file allowance reached for the current period. `error.code`: `rate_limit_exceeded`.500 — Internal server error — an unexpected fault on our side. `error.code`: `internal_error`.503 — Service temporarily unavailable — retryable; a `Retry-After` header is sent when known. `error.code` is one of: `service_unavailable` (a backing service is down, or parse capacity is momentarily saturated), `rate_limit_backend_unavailable`, or `cache_backend_unavailable`.xlsx_sortPOST /api/v1/tools/xlsx_sort — Use this when you need a multi-column sort in Excel's sort order (case-insensitive text, numbers before text before logicals, blanks last), optionally unique by a column set (Excel UNIQUE). output row_numbers returns the sheet rows in order; rows_handle writes the sorted rows as NDJSON to a new cache handle; json returns a page in the xlsx_read json shape.
Auth: Authorization: Bearer <api_key> (required)
by array required column string requireddirection string optional file object optional The spreadsheet file, handed off by a host that fills in the OpenAI file-parameter convention (openai/fileParams) from an uploaded or attached file. The server downloads download_url once, server-side; never a local sandbox path.
download_url string required Temporary https URL to download the file. Valid only for this call.
file_id string required Host file identifier.
file_name string optional Original file name (advisory only; never used as a path).
mime_type string optional Declared MIME type (advisory only).
file_b64 string requiredoptions object optionalheader_row integer optional limit integer optional offset integer optional output string optional sheet string optionalunique_by array optional {
"properties": {
"by": {
"items": {
"properties": {
"column": {
"type": "string"
},
"direction": {
"enum": [
"asc",
"desc"
],
"type": "string"
}
},
"required": [
"column"
],
"type": "object"
},
"maxItems": 8,
"minItems": 0,
"type": "array"
},
"file": {
"additionalProperties": false,
"description": "The spreadsheet file, handed off by a host that fills in the OpenAI file-parameter convention (openai/fileParams) from an uploaded or attached file. The server downloads download_url once, server-side; never a local sandbox path.",
"properties": {
"download_url": {
"description": "Temporary https URL to download the file. Valid only for this call.",
"maxLength": 8192,
"minLength": 1,
"type": "string"
},
"file_id": {
"description": "Host file identifier.",
"maxLength": 256,
"type": "string"
},
"file_name": {
"description": "Original file name (advisory only; never used as a path).",
"maxLength": 256,
"type": "string"
},
"mime_type": {
"description": "Declared MIME type (advisory only).",
"maxLength": 256,
"type": "string"
}
},
"required": [
"download_url",
"file_id"
],
"type": "object"
},
"file_b64": {
"type": "string"
},
"options": {
"properties": {
"header_row": {
"minimum": 0,
"type": "integer"
},
"limit": {
"maximum": 1000,
"minimum": 1,
"type": "integer"
},
"offset": {
"minimum": 0,
"type": "integer"
},
"output": {
"enum": [
"rows",
"row_numbers",
"rows_handle",
"json"
],
"type": "string"
},
"sheet": {
"type": "string"
},
"unique_by": {
"items": {
"type": "string"
},
"maxItems": 64,
"minItems": 1,
"type": "array"
}
},
"type": "object"
}
},
"required": [
"by",
"file_b64"
],
"type": "object"
}REST (curl):
curl -sX POST https://api.xlsx-for-ai.dev/api/v1/tools/xlsx_sort \
-H 'content-type: application/json' \
-H 'Authorization: Bearer <api_key>' \
-d '{"by":[{"column":"example-value"}],"file_b64":"<BASE64_ENCODED_FILE_BYTES>"}'MCP (tools/call):
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "xlsx_sort",
"arguments": {
"by": [
{
"column": "example-value"
}
],
"file_url": "https://example.com/placeholder.xlsx"
}
}
}200 — Tool result (base64-in / base64-out; stateless).400 — Bad request. `error.code` is one of: `bad_request` (malformed or oversized JSON body, invalid base64, or a missing/invalid field), `hardening_rejected` (the upload failed an ingest safety guard — e.g. an encrypted workbook, a non-OOXML zip, a truncated file, or a legacy .xls on a route that does not accept it), `unparseable_input` (no readable CSV header row), `malformed_csv` (a structurally broken CSV — an unclosed or mid-field quote), or `unsupported_output_format` (`xlsx_convert` was asked to write old binary .xls — Excel 97-2003 is read-only here; request `xlsx` or `csv`). A sheet- or column-not-found request also carries `available_sheets` / `available_columns`. A `file_url` that could not be fetched keeps `error.code` `bad_request` and adds `error.reason`, one of: `google_not_shared` (a Google link not shared publicly), `url_download_failed_4xx` (the host answered a 4xx: 404 is a dead link, 401/403 a private one), `url_download_failed_5xx`, `url_download_failed_network` (no answer, e.g. DNS), `url_download_timeout`, `url_returned_html` (a web page, not a spreadsheet), `url_empty`, `url_refused`, `url_redirect_blocked` or `file_input_url_not_https`.401 — Missing or invalid API key. `error.code`: `unauthorized`.402 — Payment required. `error.code`: `tier_upgrade_required`. A forward-compatible response for a capability gated to a paid subscription; it is driven by the account/consent surface (POST /api/v1/consent), not by the stateless tool inputs. No action is needed for standard tool calls on the free tier.413 — Payload too large. `error.code`: `file_too_large` (the input exceeds the per-format upload ceiling, or expands past the content-processing ceiling once parsed) or `write_output_too_large` (the requested output would exceed the format write cap). These are capacity ceilings — identical for every caller, never a paywall lever.429 — Free-tier file allowance reached for the current period. `error.code`: `rate_limit_exceeded`.500 — Internal server error — an unexpected fault on our side. `error.code`: `internal_error`.501 — Not served yet. `error.code`: `capability_gap`; `error.message` says which case applies: the order of two texts turns on a character outside Excel's documented sort table (such as a non-ASCII letter), or on an apostrophe-only or hyphen-position difference, or a unique key differs only by non-ASCII case or by a blank against a 0. Excel leaves these to the locale, so the engine declines instead of guessing. Not transient: retrying the same input does not help. With `options.output` `rows_handle` on a workbook, `error.message` can also say a kept column mixes numbers, texts and dates (one NDJSON column kind cannot type it) or a kept cell holds an error value: use `output` `json` or `row_numbers` for that sheet (XLS-10381).503 — Service temporarily unavailable — retryable; a `Retry-After` header is sent when known. `error.code` is one of: `service_unavailable` (a backing service is down, or parse capacity is momentarily saturated), `rate_limit_backend_unavailable`, or `cache_backend_unavailable`.xlsx_stampPOST /api/v1/tools/xlsx_stamp — Use this when you need to sign a workbook with a cryptographic integrity-verification stamp — which checks it passed, when, tamper-evident.
Auth: Authorization: Bearer <api_key> (required)
checks array required detail string optional id string required name string required status string required exclude_sheets array optional file object optional The spreadsheet file, handed off by a host that fills in the OpenAI file-parameter convention (openai/fileParams) from an uploaded or attached file. The server downloads download_url once, server-side; never a local sandbox path.
download_url string required Temporary https URL to download the file. Valid only for this call.
file_id string required Host file identifier.
file_name string optional Original file name (advisory only; never used as a path).
mime_type string optional Declared MIME type (advisory only).
file_b64 string optionalgenerated_by object optionalnpm string optional supervisor string optional workbook_handle string optional {
"properties": {
"checks": {
"items": {
"properties": {
"detail": {
"maxLength": 1024,
"type": "string"
},
"id": {
"maxLength": 128,
"minLength": 1,
"type": "string"
},
"name": {
"maxLength": 256,
"minLength": 1,
"type": "string"
},
"status": {
"enum": [
"passed",
"failed",
"skipped"
],
"type": "string"
}
},
"required": [
"id",
"name",
"status"
],
"type": "object"
},
"maxItems": 200,
"minItems": 0,
"type": "array"
},
"exclude_sheets": {
"items": {
"maxLength": 128,
"type": "string"
},
"maxItems": 100,
"type": "array"
},
"file": {
"additionalProperties": false,
"description": "The spreadsheet file, handed off by a host that fills in the OpenAI file-parameter convention (openai/fileParams) from an uploaded or attached file. The server downloads download_url once, server-side; never a local sandbox path.",
"properties": {
"download_url": {
"description": "Temporary https URL to download the file. Valid only for this call.",
"maxLength": 8192,
"minLength": 1,
"type": "string"
},
"file_id": {
"description": "Host file identifier.",
"maxLength": 256,
"type": "string"
},
"file_name": {
"description": "Original file name (advisory only; never used as a path).",
"maxLength": 256,
"type": "string"
},
"mime_type": {
"description": "Declared MIME type (advisory only).",
"maxLength": 256,
"type": "string"
}
},
"required": [
"download_url",
"file_id"
],
"type": "object"
},
"file_b64": {
"type": "string"
},
"generated_by": {
"properties": {
"npm": {
"maxLength": 128,
"type": "string"
},
"supervisor": {
"maxLength": 128,
"type": "string"
}
},
"type": "object"
},
"workbook_handle": {
"maxLength": 128,
"minLength": 1,
"type": "string"
}
},
"required": [
"checks"
],
"type": "object"
}REST (curl):
curl -sX POST https://api.xlsx-for-ai.dev/api/v1/tools/xlsx_stamp \
-H 'content-type: application/json' \
-H 'Authorization: Bearer <api_key>' \
-d '{"checks":[{"id":"example-value","name":"example-value","status":"passed"}],"file_b64":"<BASE64_ENCODED_FILE_BYTES>"}'MCP (tools/call):
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "xlsx_stamp",
"arguments": {
"checks": [
{
"id": "example-value",
"name": "example-value",
"status": "passed"
}
],
"file_url": "https://example.com/placeholder.xlsx"
}
}
}200 — Tool result (base64-in / base64-out; stateless).400 — Bad request. `error.code` is one of: `bad_request` (malformed or oversized JSON body, invalid base64, or a missing/invalid field), `hardening_rejected` (the upload failed an ingest safety guard — e.g. an encrypted workbook, a non-OOXML zip, a truncated file, or a legacy .xls on a route that does not accept it), `unparseable_input` (no readable CSV header row), `malformed_csv` (a structurally broken CSV — an unclosed or mid-field quote), or `unsupported_output_format` (`xlsx_convert` was asked to write old binary .xls — Excel 97-2003 is read-only here; request `xlsx` or `csv`). A sheet- or column-not-found request also carries `available_sheets` / `available_columns`. A `file_url` that could not be fetched keeps `error.code` `bad_request` and adds `error.reason`, one of: `google_not_shared` (a Google link not shared publicly), `url_download_failed_4xx` (the host answered a 4xx: 404 is a dead link, 401/403 a private one), `url_download_failed_5xx`, `url_download_failed_network` (no answer, e.g. DNS), `url_download_timeout`, `url_returned_html` (a web page, not a spreadsheet), `url_empty`, `url_refused`, `url_redirect_blocked` or `file_input_url_not_https`.401 — Missing or invalid API key. `error.code`: `unauthorized`.402 — Payment required. `error.code`: `tier_upgrade_required`. A forward-compatible response for a capability gated to a paid subscription; it is driven by the account/consent surface (POST /api/v1/consent), not by the stateless tool inputs. No action is needed for standard tool calls on the free tier.413 — Payload too large. `error.code`: `file_too_large` (the input exceeds the per-format upload ceiling, or expands past the content-processing ceiling once parsed) or `write_output_too_large` (the requested output would exceed the format write cap). These are capacity ceilings — identical for every caller, never a paywall lever.429 — Free-tier file allowance reached for the current period. `error.code`: `rate_limit_exceeded`.500 — Internal server error — an unexpected fault on our side. `error.code`: `internal_error`.503 — Service temporarily unavailable — retryable; a `Retry-After` header is sent when known. `error.code` is one of: `service_unavailable` (a backing service is down, or parse capacity is momentarily saturated), `rate_limit_backend_unavailable`, or `cache_backend_unavailable`.xlsx_stylesPOST /api/v1/tools/xlsx_styles — Use this when you need to surface cell formatting (number formats, fonts, fills, alignment) — what a cell LOOKS like, not just its raw value.
Auth: Authorization: Bearer <api_key> (required)
file object optional The spreadsheet file, handed off by a host that fills in the OpenAI file-parameter convention (openai/fileParams) from an uploaded or attached file. The server downloads download_url once, server-side; never a local sandbox path.
download_url string required Temporary https URL to download the file. Valid only for this call.
file_id string required Host file identifier.
file_name string optional Original file name (advisory only; never used as a path).
mime_type string optional Declared MIME type (advisory only).
file_b64 string optionalSend exactly one file source: file_b64 (this field), file_url, file_handle, or file_text together with file_name.
file_handle string optional Handle returned by xlsx_upload_link, once the user has uploaded the spreadsheet file on that page. Use this when the user attached the file in chat or has no link. Provide this OR file_url.
file_name string optional File name with its extension (.csv, .tsv or .json), used with file_text.
file_sha256 string optional Hex SHA-256 of the exact file_text UTF-8 text. Optional; checked when given.
file_text string optional Use only for a small CSV, TSV or JSON file whose full text you already have. Practical limit about 2,000 cells or 40 KB (the server hard cap is 256 KB); above that use file_url, or xlsx_upload_link and file_handle. Requires file_name. Never encode or retype a binary file by hand. Provide this OR file_url OR file_handle.
file_url string optional https URL of the spreadsheet file (e.g. a shared Google Drive, Google Sheets, Dropbox, OneDrive or S3 link; must be viewable by anyone with the link). The server downloads it directly. Provide this OR file_handle.
options object optionaldetailed boolean optionallimit integer optional sheet string optional{
"properties": {
"file": {
"additionalProperties": false,
"description": "The spreadsheet file, handed off by a host that fills in the OpenAI file-parameter convention (openai/fileParams) from an uploaded or attached file. The server downloads download_url once, server-side; never a local sandbox path.",
"properties": {
"download_url": {
"description": "Temporary https URL to download the file. Valid only for this call.",
"maxLength": 8192,
"minLength": 1,
"type": "string"
},
"file_id": {
"description": "Host file identifier.",
"maxLength": 256,
"type": "string"
},
"file_name": {
"description": "Original file name (advisory only; never used as a path).",
"maxLength": 256,
"type": "string"
},
"mime_type": {
"description": "Declared MIME type (advisory only).",
"maxLength": 256,
"type": "string"
}
},
"required": [
"download_url",
"file_id"
],
"type": "object"
},
"file_b64": {
"description": "Send exactly one file source: file_b64 (this field), file_url, file_handle, or file_text together with file_name.",
"type": "string"
},
"file_handle": {
"description": "Handle returned by xlsx_upload_link, once the user has uploaded the spreadsheet file on that page. Use this when the user attached the file in chat or has no link. Provide this OR file_url.",
"maxLength": 128,
"minLength": 1,
"type": "string"
},
"file_name": {
"description": "File name with its extension (.csv, .tsv or .json), used with file_text.",
"maxLength": 200,
"minLength": 1,
"type": "string"
},
"file_sha256": {
"description": "Hex SHA-256 of the exact file_text UTF-8 text. Optional; checked when given.",
"maxLength": 64,
"minLength": 64,
"type": "string"
},
"file_text": {
"description": "Use only for a small CSV, TSV or JSON file whose full text you already have. Practical limit about 2,000 cells or 40 KB (the server hard cap is 256 KB); above that use file_url, or xlsx_upload_link and file_handle. Requires file_name. Never encode or retype a binary file by hand. Provide this OR file_url OR file_handle.",
"maxLength": 262144,
"minLength": 1,
"type": "string"
},
"file_url": {
"description": "https URL of the spreadsheet file (e.g. a shared Google Drive, Google Sheets, Dropbox, OneDrive or S3 link; must be viewable by anyone with the link). The server downloads it directly. Provide this OR file_handle.",
"maxLength": 8192,
"minLength": 1,
"type": "string"
},
"options": {
"properties": {
"detailed": {
"type": "boolean"
},
"limit": {
"maximum": 1000,
"minimum": 1,
"type": "integer"
},
"sheet": {
"type": "string"
}
},
"type": "object"
}
},
"required": [],
"type": "object",
"oneOf": [
{
"required": [
"file_b64"
]
},
{
"required": [
"file_url"
]
},
{
"required": [
"file_handle"
]
},
{
"required": [
"file_text",
"file_name"
]
},
{
"required": [
"file"
]
}
]
}REST (curl):
curl -sX POST https://api.xlsx-for-ai.dev/api/v1/tools/xlsx_styles \
-H 'content-type: application/json' \
-H 'Authorization: Bearer <api_key>' \
-d '{"file_b64":"<BASE64_ENCODED_FILE_BYTES>"}'MCP (tools/call):
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "xlsx_styles",
"arguments": {
"file_url": "https://example.com/placeholder.xlsx"
}
}
}200 — Tool result (base64-in / base64-out; stateless). A `file_text` whose `file_name` ends in .xlsx, .xlsm, .xls, .xlsb, .ods, .xltx, .xltm or .xlam computes nothing: the reply is still 200, with `status` `workbook_text_retired`, `computed` false, `upload_url` (send the file there with one PUT), `upload_page` (the page a person opens to drop the file in), `file_handle` (pass it to the same tool once the file is uploaded) and `expires_at`. A text copy loses defined names, styles, merged cells, validations and macros, so a workbook is never sent as text.400 — Bad request. `error.code` is one of: `bad_request` (malformed or oversized JSON body, invalid base64, or a missing/invalid field), `hardening_rejected` (the upload failed an ingest safety guard — e.g. an encrypted workbook, a non-OOXML zip, a truncated file, or a legacy .xls on a route that does not accept it), `unparseable_input` (no readable CSV header row), `malformed_csv` (a structurally broken CSV — an unclosed or mid-field quote), or `unsupported_output_format` (`xlsx_convert` was asked to write old binary .xls — Excel 97-2003 is read-only here; request `xlsx` or `csv`). A sheet- or column-not-found request also carries `available_sheets` / `available_columns`. A `file_url` that could not be fetched keeps `error.code` `bad_request` and adds `error.reason`, one of: `google_not_shared` (a Google link not shared publicly), `url_download_failed_4xx` (the host answered a 4xx: 404 is a dead link, 401/403 a private one), `url_download_failed_5xx`, `url_download_failed_network` (no answer, e.g. DNS), `url_download_timeout`, `url_returned_html` (a web page, not a spreadsheet), `url_empty`, `url_refused`, `url_redirect_blocked` or `file_input_url_not_https`.401 — Missing or invalid API key. `error.code`: `unauthorized`.402 — Payment required. `error.code`: `tier_upgrade_required`. A forward-compatible response for a capability gated to a paid subscription; it is driven by the account/consent surface (POST /api/v1/consent), not by the stateless tool inputs. No action is needed for standard tool calls on the free tier.413 — Payload too large. `error.code`: `file_too_large` (the input exceeds the per-format upload ceiling, or expands past the content-processing ceiling once parsed) or `write_output_too_large` (the requested output would exceed the format write cap). These are capacity ceilings — identical for every caller, never a paywall lever.429 — Free-tier file allowance reached for the current period. `error.code`: `rate_limit_exceeded`.500 — Internal server error — an unexpected fault on our side. `error.code`: `internal_error`.503 — Service temporarily unavailable — retryable; a `Retry-After` header is sent when known. `error.code` is one of: `service_unavailable` (a backing service is down, or parse capacity is momentarily saturated), `rate_limit_backend_unavailable`, or `cache_backend_unavailable`.xlsx_tablesPOST /api/v1/tools/xlsx_tables — Use this when you need to list every Excel ListObject ("Format as Table") in a workbook — name, sheet, range, header/totals flags, columns.
Auth: Authorization: Bearer <api_key> (required)
file object optional The spreadsheet file, handed off by a host that fills in the OpenAI file-parameter convention (openai/fileParams) from an uploaded or attached file. The server downloads download_url once, server-side; never a local sandbox path.
download_url string required Temporary https URL to download the file. Valid only for this call.
file_id string required Host file identifier.
file_name string optional Original file name (advisory only; never used as a path).
mime_type string optional Declared MIME type (advisory only).
file_b64 string optionalSend exactly one file source: file_b64 (this field), file_url, file_handle, or file_text together with file_name.
file_handle string optional Handle returned by xlsx_upload_link, once the user has uploaded the spreadsheet file on that page. Use this when the user attached the file in chat or has no link. Provide this OR file_url.
file_name string optional File name with its extension (.csv, .tsv or .json), used with file_text.
file_sha256 string optional Hex SHA-256 of the exact file_text UTF-8 text. Optional; checked when given.
file_text string optional Use only for a small CSV, TSV or JSON file whose full text you already have. Practical limit about 2,000 cells or 40 KB (the server hard cap is 256 KB); above that use file_url, or xlsx_upload_link and file_handle. Requires file_name. Never encode or retype a binary file by hand. Provide this OR file_url OR file_handle.
file_url string optional https URL of the spreadsheet file (e.g. a shared Google Drive, Google Sheets, Dropbox, OneDrive or S3 link; must be viewable by anyone with the link). The server downloads it directly. Provide this OR file_handle.
options object optionalinclude_columns boolean optionalsheet string optional{
"properties": {
"file": {
"additionalProperties": false,
"description": "The spreadsheet file, handed off by a host that fills in the OpenAI file-parameter convention (openai/fileParams) from an uploaded or attached file. The server downloads download_url once, server-side; never a local sandbox path.",
"properties": {
"download_url": {
"description": "Temporary https URL to download the file. Valid only for this call.",
"maxLength": 8192,
"minLength": 1,
"type": "string"
},
"file_id": {
"description": "Host file identifier.",
"maxLength": 256,
"type": "string"
},
"file_name": {
"description": "Original file name (advisory only; never used as a path).",
"maxLength": 256,
"type": "string"
},
"mime_type": {
"description": "Declared MIME type (advisory only).",
"maxLength": 256,
"type": "string"
}
},
"required": [
"download_url",
"file_id"
],
"type": "object"
},
"file_b64": {
"description": "Send exactly one file source: file_b64 (this field), file_url, file_handle, or file_text together with file_name.",
"type": "string"
},
"file_handle": {
"description": "Handle returned by xlsx_upload_link, once the user has uploaded the spreadsheet file on that page. Use this when the user attached the file in chat or has no link. Provide this OR file_url.",
"maxLength": 128,
"minLength": 1,
"type": "string"
},
"file_name": {
"description": "File name with its extension (.csv, .tsv or .json), used with file_text.",
"maxLength": 200,
"minLength": 1,
"type": "string"
},
"file_sha256": {
"description": "Hex SHA-256 of the exact file_text UTF-8 text. Optional; checked when given.",
"maxLength": 64,
"minLength": 64,
"type": "string"
},
"file_text": {
"description": "Use only for a small CSV, TSV or JSON file whose full text you already have. Practical limit about 2,000 cells or 40 KB (the server hard cap is 256 KB); above that use file_url, or xlsx_upload_link and file_handle. Requires file_name. Never encode or retype a binary file by hand. Provide this OR file_url OR file_handle.",
"maxLength": 262144,
"minLength": 1,
"type": "string"
},
"file_url": {
"description": "https URL of the spreadsheet file (e.g. a shared Google Drive, Google Sheets, Dropbox, OneDrive or S3 link; must be viewable by anyone with the link). The server downloads it directly. Provide this OR file_handle.",
"maxLength": 8192,
"minLength": 1,
"type": "string"
},
"options": {
"properties": {
"include_columns": {
"type": "boolean"
},
"sheet": {
"type": "string"
}
},
"type": "object"
}
},
"required": [],
"type": "object",
"oneOf": [
{
"required": [
"file_b64"
]
},
{
"required": [
"file_url"
]
},
{
"required": [
"file_handle"
]
},
{
"required": [
"file_text",
"file_name"
]
},
{
"required": [
"file"
]
}
]
}REST (curl):
curl -sX POST https://api.xlsx-for-ai.dev/api/v1/tools/xlsx_tables \
-H 'content-type: application/json' \
-H 'Authorization: Bearer <api_key>' \
-d '{"file_b64":"<BASE64_ENCODED_FILE_BYTES>"}'MCP (tools/call):
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "xlsx_tables",
"arguments": {
"file_url": "https://example.com/placeholder.xlsx"
}
}
}200 — Tool result (base64-in / base64-out; stateless). A `file_text` whose `file_name` ends in .xlsx, .xlsm, .xls, .xlsb, .ods, .xltx, .xltm or .xlam computes nothing: the reply is still 200, with `status` `workbook_text_retired`, `computed` false, `upload_url` (send the file there with one PUT), `upload_page` (the page a person opens to drop the file in), `file_handle` (pass it to the same tool once the file is uploaded) and `expires_at`. A text copy loses defined names, styles, merged cells, validations and macros, so a workbook is never sent as text.400 — Bad request. `error.code` is one of: `bad_request` (malformed or oversized JSON body, invalid base64, or a missing/invalid field), `hardening_rejected` (the upload failed an ingest safety guard — e.g. an encrypted workbook, a non-OOXML zip, a truncated file, or a legacy .xls on a route that does not accept it), `unparseable_input` (no readable CSV header row), `malformed_csv` (a structurally broken CSV — an unclosed or mid-field quote), or `unsupported_output_format` (`xlsx_convert` was asked to write old binary .xls — Excel 97-2003 is read-only here; request `xlsx` or `csv`). A sheet- or column-not-found request also carries `available_sheets` / `available_columns`. A `file_url` that could not be fetched keeps `error.code` `bad_request` and adds `error.reason`, one of: `google_not_shared` (a Google link not shared publicly), `url_download_failed_4xx` (the host answered a 4xx: 404 is a dead link, 401/403 a private one), `url_download_failed_5xx`, `url_download_failed_network` (no answer, e.g. DNS), `url_download_timeout`, `url_returned_html` (a web page, not a spreadsheet), `url_empty`, `url_refused`, `url_redirect_blocked` or `file_input_url_not_https`.401 — Missing or invalid API key. `error.code`: `unauthorized`.402 — Payment required. `error.code`: `tier_upgrade_required`. A forward-compatible response for a capability gated to a paid subscription; it is driven by the account/consent surface (POST /api/v1/consent), not by the stateless tool inputs. No action is needed for standard tool calls on the free tier.413 — Payload too large. `error.code`: `file_too_large` (the input exceeds the per-format upload ceiling, or expands past the content-processing ceiling once parsed) or `write_output_too_large` (the requested output would exceed the format write cap). These are capacity ceilings — identical for every caller, never a paywall lever.429 — Free-tier file allowance reached for the current period. `error.code`: `rate_limit_exceeded`.500 — Internal server error — an unexpected fault on our side. `error.code`: `internal_error`.503 — Service temporarily unavailable — retryable; a `Retry-After` header is sent when known. `error.code` is one of: `service_unavailable` (a backing service is down, or parse capacity is momentarily saturated), `rate_limit_backend_unavailable`, or `cache_backend_unavailable`.xlsx_topologyPOST /api/v1/tools/xlsx_topology — Use this when you need one-call workbook orientation — sheets, formulas, named ranges, tables, validations, hyperlinks, merges, and feature flags in one shot.
Auth: Authorization: Bearer <api_key> (required)
file object optional The spreadsheet file, handed off by a host that fills in the OpenAI file-parameter convention (openai/fileParams) from an uploaded or attached file. The server downloads download_url once, server-side; never a local sandbox path.
download_url string required Temporary https URL to download the file. Valid only for this call.
file_id string required Host file identifier.
file_name string optional Original file name (advisory only; never used as a path).
mime_type string optional Declared MIME type (advisory only).
file_b64 string required{
"properties": {
"file": {
"additionalProperties": false,
"description": "The spreadsheet file, handed off by a host that fills in the OpenAI file-parameter convention (openai/fileParams) from an uploaded or attached file. The server downloads download_url once, server-side; never a local sandbox path.",
"properties": {
"download_url": {
"description": "Temporary https URL to download the file. Valid only for this call.",
"maxLength": 8192,
"minLength": 1,
"type": "string"
},
"file_id": {
"description": "Host file identifier.",
"maxLength": 256,
"type": "string"
},
"file_name": {
"description": "Original file name (advisory only; never used as a path).",
"maxLength": 256,
"type": "string"
},
"mime_type": {
"description": "Declared MIME type (advisory only).",
"maxLength": 256,
"type": "string"
}
},
"required": [
"download_url",
"file_id"
],
"type": "object"
},
"file_b64": {
"type": "string"
}
},
"required": [
"file_b64"
],
"type": "object"
}REST (curl):
curl -sX POST https://api.xlsx-for-ai.dev/api/v1/tools/xlsx_topology \
-H 'content-type: application/json' \
-H 'Authorization: Bearer <api_key>' \
-d '{"file_b64":"<BASE64_ENCODED_FILE_BYTES>"}'MCP (tools/call):
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "xlsx_topology",
"arguments": {
"file_url": "https://example.com/placeholder.xlsx"
}
}
}200 — Tool result (base64-in / base64-out; stateless).400 — Bad request. `error.code` is one of: `bad_request` (malformed or oversized JSON body, invalid base64, or a missing/invalid field), `hardening_rejected` (the upload failed an ingest safety guard — e.g. an encrypted workbook, a non-OOXML zip, a truncated file, or a legacy .xls on a route that does not accept it), `unparseable_input` (no readable CSV header row), `malformed_csv` (a structurally broken CSV — an unclosed or mid-field quote), or `unsupported_output_format` (`xlsx_convert` was asked to write old binary .xls — Excel 97-2003 is read-only here; request `xlsx` or `csv`). A sheet- or column-not-found request also carries `available_sheets` / `available_columns`. A `file_url` that could not be fetched keeps `error.code` `bad_request` and adds `error.reason`, one of: `google_not_shared` (a Google link not shared publicly), `url_download_failed_4xx` (the host answered a 4xx: 404 is a dead link, 401/403 a private one), `url_download_failed_5xx`, `url_download_failed_network` (no answer, e.g. DNS), `url_download_timeout`, `url_returned_html` (a web page, not a spreadsheet), `url_empty`, `url_refused`, `url_redirect_blocked` or `file_input_url_not_https`.401 — Missing or invalid API key. `error.code`: `unauthorized`.402 — Payment required. `error.code`: `tier_upgrade_required`. A forward-compatible response for a capability gated to a paid subscription; it is driven by the account/consent surface (POST /api/v1/consent), not by the stateless tool inputs. No action is needed for standard tool calls on the free tier.413 — Payload too large. `error.code`: `file_too_large` (the input exceeds the per-format upload ceiling, or expands past the content-processing ceiling once parsed) or `write_output_too_large` (the requested output would exceed the format write cap). These are capacity ceilings — identical for every caller, never a paywall lever.429 — Free-tier file allowance reached for the current period. `error.code`: `rate_limit_exceeded`.500 — Internal server error — an unexpected fault on our side. `error.code`: `internal_error`.503 — Service temporarily unavailable — retryable; a `Retry-After` header is sent when known. `error.code` is one of: `service_unavailable` (a backing service is down, or parse capacity is momentarily saturated), `rate_limit_backend_unavailable`, or `cache_backend_unavailable`.xlsx_upload_linkPOST /api/v1/tools/xlsx_upload_link — Use this when an app needs a one-time upload link for its user's file: PUT the file to upload_url in one request, or in resumable parts with Content-Range: bytes <first>-<last>/<total> (HEAD the link for Upload-Offset), then pass file_handle to any tool.
Auth: Authorization: Bearer <api_key> (required)
purpose string optional Optional short note shown on the upload page. The returned upload_url takes the file in one PUT, or in resumable parts: PUT each part with Content-Range: bytes <first>-<last>/<total>, HEAD the link for Upload-Offset (bytes received so far) and send the rest from there. Then pass file_handle to any tool.
{
"properties": {
"purpose": {
"description": "Optional short note shown on the upload page. The returned upload_url takes the file in one PUT, or in resumable parts: PUT each part with Content-Range: bytes <first>-<last>/<total>, HEAD the link for Upload-Offset (bytes received so far) and send the rest from there. Then pass file_handle to any tool.",
"maxLength": 200,
"type": "string"
}
},
"type": "object"
}REST (curl):
curl -sX POST https://api.xlsx-for-ai.dev/api/v1/tools/xlsx_upload_link \
-H 'content-type: application/json' \
-H 'Authorization: Bearer <api_key>' \
-d '{}'MCP (tools/call):
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "xlsx_upload_link",
"arguments": {}
}
}200 — Tool result (base64-in / base64-out; stateless).400 — Bad request. `error.code` is one of: `bad_request` (malformed or oversized JSON body, invalid base64, or a missing/invalid field), `hardening_rejected` (the upload failed an ingest safety guard — e.g. an encrypted workbook, a non-OOXML zip, a truncated file, or a legacy .xls on a route that does not accept it), `unparseable_input` (no readable CSV header row), `malformed_csv` (a structurally broken CSV — an unclosed or mid-field quote), or `unsupported_output_format` (`xlsx_convert` was asked to write old binary .xls — Excel 97-2003 is read-only here; request `xlsx` or `csv`). A sheet- or column-not-found request also carries `available_sheets` / `available_columns`. A `file_url` that could not be fetched keeps `error.code` `bad_request` and adds `error.reason`, one of: `google_not_shared` (a Google link not shared publicly), `url_download_failed_4xx` (the host answered a 4xx: 404 is a dead link, 401/403 a private one), `url_download_failed_5xx`, `url_download_failed_network` (no answer, e.g. DNS), `url_download_timeout`, `url_returned_html` (a web page, not a spreadsheet), `url_empty`, `url_refused`, `url_redirect_blocked` or `file_input_url_not_https`.401 — Missing or invalid API key. `error.code`: `unauthorized`.402 — Payment required. `error.code`: `tier_upgrade_required`. A forward-compatible response for a capability gated to a paid subscription; it is driven by the account/consent surface (POST /api/v1/consent), not by the stateless tool inputs. No action is needed for standard tool calls on the free tier.413 — Payload too large. `error.code`: `file_too_large` (the input exceeds the per-format upload ceiling, or expands past the content-processing ceiling once parsed) or `write_output_too_large` (the requested output would exceed the format write cap). These are capacity ceilings — identical for every caller, never a paywall lever.429 — Free-tier file allowance reached for the current period. `error.code`: `rate_limit_exceeded`.500 — Internal server error — an unexpected fault on our side. `error.code`: `internal_error`.503 — Service temporarily unavailable — retryable; a `Retry-After` header is sent when known. `error.code` is one of: `service_unavailable` (a backing service is down, or parse capacity is momentarily saturated), `rate_limit_backend_unavailable`, or `cache_backend_unavailable`.xlsx_validatePOST /api/v1/tools/xlsx_validate — Use this when you need a soundness check — load the workbook with the server's own engine and report whether it opens cleanly, with a per-sheet row and column extent.
Auth: Authorization: Bearer <api_key> (required)
file object optional The spreadsheet file, handed off by a host that fills in the OpenAI file-parameter convention (openai/fileParams) from an uploaded or attached file. The server downloads download_url once, server-side; never a local sandbox path.
download_url string required Temporary https URL to download the file. Valid only for this call.
file_id string required Host file identifier.
file_name string optional Original file name (advisory only; never used as a path).
mime_type string optional Declared MIME type (advisory only).
file_b64 string required{
"properties": {
"file": {
"additionalProperties": false,
"description": "The spreadsheet file, handed off by a host that fills in the OpenAI file-parameter convention (openai/fileParams) from an uploaded or attached file. The server downloads download_url once, server-side; never a local sandbox path.",
"properties": {
"download_url": {
"description": "Temporary https URL to download the file. Valid only for this call.",
"maxLength": 8192,
"minLength": 1,
"type": "string"
},
"file_id": {
"description": "Host file identifier.",
"maxLength": 256,
"type": "string"
},
"file_name": {
"description": "Original file name (advisory only; never used as a path).",
"maxLength": 256,
"type": "string"
},
"mime_type": {
"description": "Declared MIME type (advisory only).",
"maxLength": 256,
"type": "string"
}
},
"required": [
"download_url",
"file_id"
],
"type": "object"
},
"file_b64": {
"type": "string"
}
},
"required": [
"file_b64"
],
"type": "object"
}REST (curl):
curl -sX POST https://api.xlsx-for-ai.dev/api/v1/tools/xlsx_validate \
-H 'content-type: application/json' \
-H 'Authorization: Bearer <api_key>' \
-d '{"file_b64":"<BASE64_ENCODED_FILE_BYTES>"}'MCP (tools/call):
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "xlsx_validate",
"arguments": {
"file_url": "https://example.com/placeholder.xlsx"
}
}
}200 — Tool result (base64-in / base64-out; stateless).400 — Bad request. `error.code` is one of: `bad_request` (malformed or oversized JSON body, invalid base64, or a missing/invalid field), `hardening_rejected` (the upload failed an ingest safety guard — e.g. an encrypted workbook, a non-OOXML zip, a truncated file, or a legacy .xls on a route that does not accept it), `unparseable_input` (no readable CSV header row), `malformed_csv` (a structurally broken CSV — an unclosed or mid-field quote), or `unsupported_output_format` (`xlsx_convert` was asked to write old binary .xls — Excel 97-2003 is read-only here; request `xlsx` or `csv`). A sheet- or column-not-found request also carries `available_sheets` / `available_columns`. A `file_url` that could not be fetched keeps `error.code` `bad_request` and adds `error.reason`, one of: `google_not_shared` (a Google link not shared publicly), `url_download_failed_4xx` (the host answered a 4xx: 404 is a dead link, 401/403 a private one), `url_download_failed_5xx`, `url_download_failed_network` (no answer, e.g. DNS), `url_download_timeout`, `url_returned_html` (a web page, not a spreadsheet), `url_empty`, `url_refused`, `url_redirect_blocked` or `file_input_url_not_https`.401 — Missing or invalid API key. `error.code`: `unauthorized`.402 — Payment required. `error.code`: `tier_upgrade_required`. A forward-compatible response for a capability gated to a paid subscription; it is driven by the account/consent surface (POST /api/v1/consent), not by the stateless tool inputs. No action is needed for standard tool calls on the free tier.413 — Payload too large. `error.code`: `file_too_large` (the input exceeds the per-format upload ceiling, or expands past the content-processing ceiling once parsed) or `write_output_too_large` (the requested output would exceed the format write cap). These are capacity ceilings — identical for every caller, never a paywall lever.429 — Free-tier file allowance reached for the current period. `error.code`: `rate_limit_exceeded`.500 — Internal server error — an unexpected fault on our side. `error.code`: `internal_error`.503 — Service temporarily unavailable — retryable; a `Retry-After` header is sent when known. `error.code` is one of: `service_unavailable` (a backing service is down, or parse capacity is momentarily saturated), `rate_limit_backend_unavailable`, or `cache_backend_unavailable`.xlsx_value_countsPOST /api/v1/tools/xlsx_value_counts — Use this when you need per-column value counts — each unique value, sorted by frequency, with percentage.
Auth: Authorization: Bearer <api_key> (required)
column string requiredfile object optional The spreadsheet file, handed off by a host that fills in the OpenAI file-parameter convention (openai/fileParams) from an uploaded or attached file. The server downloads download_url once, server-side; never a local sandbox path.
download_url string required Temporary https URL to download the file. Valid only for this call.
file_id string required Host file identifier.
file_name string optional Original file name (advisory only; never used as a path).
mime_type string optional Declared MIME type (advisory only).
file_b64 string requiredoptions object optionalheader_row integer optional include_nulls boolean optionaloffset integer optional sheet string optionaltop_n integer optional {
"properties": {
"column": {
"type": "string"
},
"file": {
"additionalProperties": false,
"description": "The spreadsheet file, handed off by a host that fills in the OpenAI file-parameter convention (openai/fileParams) from an uploaded or attached file. The server downloads download_url once, server-side; never a local sandbox path.",
"properties": {
"download_url": {
"description": "Temporary https URL to download the file. Valid only for this call.",
"maxLength": 8192,
"minLength": 1,
"type": "string"
},
"file_id": {
"description": "Host file identifier.",
"maxLength": 256,
"type": "string"
},
"file_name": {
"description": "Original file name (advisory only; never used as a path).",
"maxLength": 256,
"type": "string"
},
"mime_type": {
"description": "Declared MIME type (advisory only).",
"maxLength": 256,
"type": "string"
}
},
"required": [
"download_url",
"file_id"
],
"type": "object"
},
"file_b64": {
"type": "string"
},
"options": {
"properties": {
"header_row": {
"minimum": 0,
"type": "integer"
},
"include_nulls": {
"type": "boolean"
},
"offset": {
"minimum": 0,
"type": "integer"
},
"sheet": {
"type": "string"
},
"top_n": {
"maximum": 1000,
"minimum": 1,
"type": "integer"
}
},
"type": "object"
}
},
"required": [
"column",
"file_b64"
],
"type": "object"
}REST (curl):
curl -sX POST https://api.xlsx-for-ai.dev/api/v1/tools/xlsx_value_counts \
-H 'content-type: application/json' \
-H 'Authorization: Bearer <api_key>' \
-d '{"column":"example-value","file_b64":"<BASE64_ENCODED_FILE_BYTES>"}'MCP (tools/call):
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "xlsx_value_counts",
"arguments": {
"column": "example-value",
"file_url": "https://example.com/placeholder.xlsx"
}
}
}200 — Tool result (base64-in / base64-out; stateless).400 — Bad request. `error.code` is one of: `bad_request` (malformed or oversized JSON body, invalid base64, or a missing/invalid field), `hardening_rejected` (the upload failed an ingest safety guard — e.g. an encrypted workbook, a non-OOXML zip, a truncated file, or a legacy .xls on a route that does not accept it), `unparseable_input` (no readable CSV header row), `malformed_csv` (a structurally broken CSV — an unclosed or mid-field quote), or `unsupported_output_format` (`xlsx_convert` was asked to write old binary .xls — Excel 97-2003 is read-only here; request `xlsx` or `csv`). A sheet- or column-not-found request also carries `available_sheets` / `available_columns`. A `file_url` that could not be fetched keeps `error.code` `bad_request` and adds `error.reason`, one of: `google_not_shared` (a Google link not shared publicly), `url_download_failed_4xx` (the host answered a 4xx: 404 is a dead link, 401/403 a private one), `url_download_failed_5xx`, `url_download_failed_network` (no answer, e.g. DNS), `url_download_timeout`, `url_returned_html` (a web page, not a spreadsheet), `url_empty`, `url_refused`, `url_redirect_blocked` or `file_input_url_not_https`.401 — Missing or invalid API key. `error.code`: `unauthorized`.402 — Payment required. `error.code`: `tier_upgrade_required`. A forward-compatible response for a capability gated to a paid subscription; it is driven by the account/consent surface (POST /api/v1/consent), not by the stateless tool inputs. No action is needed for standard tool calls on the free tier.413 — Payload too large. `error.code`: `file_too_large` (the input exceeds the per-format upload ceiling, or expands past the content-processing ceiling once parsed) or `write_output_too_large` (the requested output would exceed the format write cap). These are capacity ceilings — identical for every caller, never a paywall lever.429 — Free-tier file allowance reached for the current period. `error.code`: `rate_limit_exceeded`.500 — Internal server error — an unexpected fault on our side. `error.code`: `internal_error`.503 — Service temporarily unavailable — retryable; a `Retry-After` header is sent when known. `error.code` is one of: `service_unavailable` (a backing service is down, or parse capacity is momentarily saturated), `rate_limit_backend_unavailable`, or `cache_backend_unavailable`.xlsx_vault_curePOST /api/v1/tools/xlsx_vault_cure — Use this when you need to clean hidden or risky content out of a spreadsheet.
Auth: Authorization: Bearer <api_key> (required)
file object optional The spreadsheet file, handed off by a host that fills in the OpenAI file-parameter convention (openai/fileParams) from an uploaded or attached file. The server downloads download_url once, server-side; never a local sandbox path.
download_url string required Temporary https URL to download the file. Valid only for this call.
file_id string required Host file identifier.
file_name string optional Original file name (advisory only; never used as a path).
mime_type string optional Declared MIME type (advisory only).
file_b64 string required mode string optional selection object optional finding_actions object optional finding_ids array optional risk_tiers array optional simulate boolean optional{
"additionalProperties": false,
"properties": {
"file": {
"additionalProperties": false,
"description": "The spreadsheet file, handed off by a host that fills in the OpenAI file-parameter convention (openai/fileParams) from an uploaded or attached file. The server downloads download_url once, server-side; never a local sandbox path.",
"properties": {
"download_url": {
"description": "Temporary https URL to download the file. Valid only for this call.",
"maxLength": 8192,
"minLength": 1,
"type": "string"
},
"file_id": {
"description": "Host file identifier.",
"maxLength": 256,
"type": "string"
},
"file_name": {
"description": "Original file name (advisory only; never used as a path).",
"maxLength": 256,
"type": "string"
},
"mime_type": {
"description": "Declared MIME type (advisory only).",
"maxLength": 256,
"type": "string"
}
},
"required": [
"download_url",
"file_id"
],
"type": "object"
},
"file_b64": {
"maxLength": 279685803,
"type": "string"
},
"mode": {
"enum": [
"as_copy",
"in_place"
],
"type": "string"
},
"selection": {
"additionalProperties": false,
"properties": {
"finding_actions": {
"additionalProperties": {
"properties": {
"sub_action": {
"type": "string"
}
},
"required": [
"sub_action"
],
"type": "object"
},
"type": "object"
},
"finding_ids": {
"items": {
"type": "string"
},
"type": "array"
},
"risk_tiers": {
"items": {
"enum": [
"high",
"medium",
"low"
],
"type": "string"
},
"type": "array"
}
},
"type": "object"
},
"simulate": {
"type": "boolean"
}
},
"required": [
"file_b64"
],
"type": "object"
}REST (curl):
curl -sX POST https://api.xlsx-for-ai.dev/api/v1/tools/xlsx_vault_cure \
-H 'content-type: application/json' \
-H 'Authorization: Bearer <api_key>' \
-d '{"file_b64":"<BASE64_ENCODED_FILE_BYTES>"}'MCP (tools/call):
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "xlsx_vault_cure",
"arguments": {
"file_url": "https://example.com/placeholder.xlsx"
}
}
}200 — Tool result (base64-in / base64-out; stateless).400 — Bad request. `error.code` is one of: `bad_request` (malformed or oversized JSON body, invalid base64, or a missing/invalid field), `hardening_rejected` (the upload failed an ingest safety guard — e.g. an encrypted workbook, a non-OOXML zip, a truncated file, or a legacy .xls on a route that does not accept it), `unparseable_input` (no readable CSV header row), `malformed_csv` (a structurally broken CSV — an unclosed or mid-field quote), or `unsupported_output_format` (`xlsx_convert` was asked to write old binary .xls — Excel 97-2003 is read-only here; request `xlsx` or `csv`). A sheet- or column-not-found request also carries `available_sheets` / `available_columns`. A `file_url` that could not be fetched keeps `error.code` `bad_request` and adds `error.reason`, one of: `google_not_shared` (a Google link not shared publicly), `url_download_failed_4xx` (the host answered a 4xx: 404 is a dead link, 401/403 a private one), `url_download_failed_5xx`, `url_download_failed_network` (no answer, e.g. DNS), `url_download_timeout`, `url_returned_html` (a web page, not a spreadsheet), `url_empty`, `url_refused`, `url_redirect_blocked` or `file_input_url_not_https`.401 — Missing or invalid API key. `error.code`: `unauthorized`.402 — Payment required. `error.code`: `tier_upgrade_required`. A forward-compatible response for a capability gated to a paid subscription; it is driven by the account/consent surface (POST /api/v1/consent), not by the stateless tool inputs. No action is needed for standard tool calls on the free tier.413 — Payload too large. `error.code`: `file_too_large` (the input exceeds the per-format upload ceiling, or expands past the content-processing ceiling once parsed) or `write_output_too_large` (the requested output would exceed the format write cap). These are capacity ceilings — identical for every caller, never a paywall lever.429 — Free-tier file allowance reached for the current period. `error.code`: `rate_limit_exceeded`.500 — Internal server error — an unexpected fault on our side. `error.code`: `internal_error`.503 — Service temporarily unavailable — retryable; a `Retry-After` header is sent when known. `error.code` is one of: `service_unavailable` (a backing service is down, or parse capacity is momentarily saturated), `rate_limit_backend_unavailable`, or `cache_backend_unavailable`.xlsx_vault_scanPOST /api/v1/tools/xlsx_vault_scan — Use this when you need to scan a spreadsheet for hidden or risky content (macros, external links, embedded objects).
Auth: Authorization: Bearer <api_key> (required)
file object optional The spreadsheet file, handed off by a host that fills in the OpenAI file-parameter convention (openai/fileParams) from an uploaded or attached file. The server downloads download_url once, server-side; never a local sandbox path.
download_url string required Temporary https URL to download the file. Valid only for this call.
file_id string required Host file identifier.
file_name string optional Original file name (advisory only; never used as a path).
mime_type string optional Declared MIME type (advisory only).
file_b64 string required {
"additionalProperties": false,
"properties": {
"file": {
"additionalProperties": false,
"description": "The spreadsheet file, handed off by a host that fills in the OpenAI file-parameter convention (openai/fileParams) from an uploaded or attached file. The server downloads download_url once, server-side; never a local sandbox path.",
"properties": {
"download_url": {
"description": "Temporary https URL to download the file. Valid only for this call.",
"maxLength": 8192,
"minLength": 1,
"type": "string"
},
"file_id": {
"description": "Host file identifier.",
"maxLength": 256,
"type": "string"
},
"file_name": {
"description": "Original file name (advisory only; never used as a path).",
"maxLength": 256,
"type": "string"
},
"mime_type": {
"description": "Declared MIME type (advisory only).",
"maxLength": 256,
"type": "string"
}
},
"required": [
"download_url",
"file_id"
],
"type": "object"
},
"file_b64": {
"maxLength": 279685803,
"type": "string"
}
},
"required": [
"file_b64"
],
"type": "object"
}REST (curl):
curl -sX POST https://api.xlsx-for-ai.dev/api/v1/tools/xlsx_vault_scan \
-H 'content-type: application/json' \
-H 'Authorization: Bearer <api_key>' \
-d '{"file_b64":"<BASE64_ENCODED_FILE_BYTES>"}'MCP (tools/call):
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "xlsx_vault_scan",
"arguments": {
"file_url": "https://example.com/placeholder.xlsx"
}
}
}200 — Tool result (base64-in / base64-out; stateless).400 — Bad request. `error.code` is one of: `bad_request` (malformed or oversized JSON body, invalid base64, or a missing/invalid field), `hardening_rejected` (the upload failed an ingest safety guard — e.g. an encrypted workbook, a non-OOXML zip, a truncated file, or a legacy .xls on a route that does not accept it), `unparseable_input` (no readable CSV header row), `malformed_csv` (a structurally broken CSV — an unclosed or mid-field quote), or `unsupported_output_format` (`xlsx_convert` was asked to write old binary .xls — Excel 97-2003 is read-only here; request `xlsx` or `csv`). A sheet- or column-not-found request also carries `available_sheets` / `available_columns`. A `file_url` that could not be fetched keeps `error.code` `bad_request` and adds `error.reason`, one of: `google_not_shared` (a Google link not shared publicly), `url_download_failed_4xx` (the host answered a 4xx: 404 is a dead link, 401/403 a private one), `url_download_failed_5xx`, `url_download_failed_network` (no answer, e.g. DNS), `url_download_timeout`, `url_returned_html` (a web page, not a spreadsheet), `url_empty`, `url_refused`, `url_redirect_blocked` or `file_input_url_not_https`.401 — Missing or invalid API key. `error.code`: `unauthorized`.402 — Payment required. `error.code`: `tier_upgrade_required`. A forward-compatible response for a capability gated to a paid subscription; it is driven by the account/consent surface (POST /api/v1/consent), not by the stateless tool inputs. No action is needed for standard tool calls on the free tier.413 — Payload too large. `error.code`: `file_too_large` (the input exceeds the per-format upload ceiling, or expands past the content-processing ceiling once parsed) or `write_output_too_large` (the requested output would exceed the format write cap). These are capacity ceilings — identical for every caller, never a paywall lever.429 — Free-tier file allowance reached for the current period. `error.code`: `rate_limit_exceeded`.500 — Internal server error — an unexpected fault on our side. `error.code`: `internal_error`.503 — Service temporarily unavailable — retryable; a `Retry-After` header is sent when known. `error.code` is one of: `service_unavailable` (a backing service is down, or parse capacity is momentarily saturated), `rate_limit_backend_unavailable`, or `cache_backend_unavailable`.xlsx_verify_receiptPOST /api/v1/tools/xlsx_verify_receipt — Use this when you need to verify a workbook's embedded AI-generation receipt — signature validity, content-hash match, and the full declared claims.
Auth: Authorization: Bearer <api_key> (required)
file object optional The spreadsheet file, handed off by a host that fills in the OpenAI file-parameter convention (openai/fileParams) from an uploaded or attached file. The server downloads download_url once, server-side; never a local sandbox path.
download_url string required Temporary https URL to download the file. Valid only for this call.
file_id string required Host file identifier.
file_name string optional Original file name (advisory only; never used as a path).
mime_type string optional Declared MIME type (advisory only).
file_b64 string optionalworkbook_handle string optional {
"properties": {
"file": {
"additionalProperties": false,
"description": "The spreadsheet file, handed off by a host that fills in the OpenAI file-parameter convention (openai/fileParams) from an uploaded or attached file. The server downloads download_url once, server-side; never a local sandbox path.",
"properties": {
"download_url": {
"description": "Temporary https URL to download the file. Valid only for this call.",
"maxLength": 8192,
"minLength": 1,
"type": "string"
},
"file_id": {
"description": "Host file identifier.",
"maxLength": 256,
"type": "string"
},
"file_name": {
"description": "Original file name (advisory only; never used as a path).",
"maxLength": 256,
"type": "string"
},
"mime_type": {
"description": "Declared MIME type (advisory only).",
"maxLength": 256,
"type": "string"
}
},
"required": [
"download_url",
"file_id"
],
"type": "object"
},
"file_b64": {
"type": "string"
},
"workbook_handle": {
"maxLength": 128,
"minLength": 1,
"type": "string"
}
},
"type": "object"
}REST (curl):
curl -sX POST https://api.xlsx-for-ai.dev/api/v1/tools/xlsx_verify_receipt \
-H 'content-type: application/json' \
-H 'Authorization: Bearer <api_key>' \
-d '{"file_b64":"<BASE64_ENCODED_FILE_BYTES>"}'MCP (tools/call):
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "xlsx_verify_receipt",
"arguments": {
"file_url": "https://example.com/placeholder.xlsx"
}
}
}200 — Tool result (base64-in / base64-out; stateless).400 — Bad request. `error.code` is one of: `bad_request` (malformed or oversized JSON body, invalid base64, or a missing/invalid field), `hardening_rejected` (the upload failed an ingest safety guard — e.g. an encrypted workbook, a non-OOXML zip, a truncated file, or a legacy .xls on a route that does not accept it), `unparseable_input` (no readable CSV header row), `malformed_csv` (a structurally broken CSV — an unclosed or mid-field quote), or `unsupported_output_format` (`xlsx_convert` was asked to write old binary .xls — Excel 97-2003 is read-only here; request `xlsx` or `csv`). A sheet- or column-not-found request also carries `available_sheets` / `available_columns`. A `file_url` that could not be fetched keeps `error.code` `bad_request` and adds `error.reason`, one of: `google_not_shared` (a Google link not shared publicly), `url_download_failed_4xx` (the host answered a 4xx: 404 is a dead link, 401/403 a private one), `url_download_failed_5xx`, `url_download_failed_network` (no answer, e.g. DNS), `url_download_timeout`, `url_returned_html` (a web page, not a spreadsheet), `url_empty`, `url_refused`, `url_redirect_blocked` or `file_input_url_not_https`.401 — Missing or invalid API key. `error.code`: `unauthorized`.402 — Payment required. `error.code`: `tier_upgrade_required`. A forward-compatible response for a capability gated to a paid subscription; it is driven by the account/consent surface (POST /api/v1/consent), not by the stateless tool inputs. No action is needed for standard tool calls on the free tier.413 — Payload too large. `error.code`: `file_too_large` (the input exceeds the per-format upload ceiling, or expands past the content-processing ceiling once parsed) or `write_output_too_large` (the requested output would exceed the format write cap). These are capacity ceilings — identical for every caller, never a paywall lever.429 — Free-tier file allowance reached for the current period. `error.code`: `rate_limit_exceeded`.500 — Internal server error — an unexpected fault on our side. `error.code`: `internal_error`.503 — Service temporarily unavailable — retryable; a `Retry-After` header is sent when known. `error.code` is one of: `service_unavailable` (a backing service is down, or parse capacity is momentarily saturated), `rate_limit_backend_unavailable`, or `cache_backend_unavailable`.xlsx_verify_stampPOST /api/v1/tools/xlsx_verify_stamp — Use this when you need to verify a workbook's embedded integrity stamp — signature validity, content-hash match, and the recorded check results.
Auth: Authorization: Bearer <api_key> (required)
file object optional The spreadsheet file, handed off by a host that fills in the OpenAI file-parameter convention (openai/fileParams) from an uploaded or attached file. The server downloads download_url once, server-side; never a local sandbox path.
download_url string required Temporary https URL to download the file. Valid only for this call.
file_id string required Host file identifier.
file_name string optional Original file name (advisory only; never used as a path).
mime_type string optional Declared MIME type (advisory only).
file_b64 string optionalworkbook_handle string optional {
"properties": {
"file": {
"additionalProperties": false,
"description": "The spreadsheet file, handed off by a host that fills in the OpenAI file-parameter convention (openai/fileParams) from an uploaded or attached file. The server downloads download_url once, server-side; never a local sandbox path.",
"properties": {
"download_url": {
"description": "Temporary https URL to download the file. Valid only for this call.",
"maxLength": 8192,
"minLength": 1,
"type": "string"
},
"file_id": {
"description": "Host file identifier.",
"maxLength": 256,
"type": "string"
},
"file_name": {
"description": "Original file name (advisory only; never used as a path).",
"maxLength": 256,
"type": "string"
},
"mime_type": {
"description": "Declared MIME type (advisory only).",
"maxLength": 256,
"type": "string"
}
},
"required": [
"download_url",
"file_id"
],
"type": "object"
},
"file_b64": {
"type": "string"
},
"workbook_handle": {
"maxLength": 128,
"minLength": 1,
"type": "string"
}
},
"type": "object"
}REST (curl):
curl -sX POST https://api.xlsx-for-ai.dev/api/v1/tools/xlsx_verify_stamp \
-H 'content-type: application/json' \
-H 'Authorization: Bearer <api_key>' \
-d '{"file_b64":"<BASE64_ENCODED_FILE_BYTES>"}'MCP (tools/call):
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "xlsx_verify_stamp",
"arguments": {
"file_url": "https://example.com/placeholder.xlsx"
}
}
}200 — Tool result (base64-in / base64-out; stateless).400 — Bad request. `error.code` is one of: `bad_request` (malformed or oversized JSON body, invalid base64, or a missing/invalid field), `hardening_rejected` (the upload failed an ingest safety guard — e.g. an encrypted workbook, a non-OOXML zip, a truncated file, or a legacy .xls on a route that does not accept it), `unparseable_input` (no readable CSV header row), `malformed_csv` (a structurally broken CSV — an unclosed or mid-field quote), or `unsupported_output_format` (`xlsx_convert` was asked to write old binary .xls — Excel 97-2003 is read-only here; request `xlsx` or `csv`). A sheet- or column-not-found request also carries `available_sheets` / `available_columns`. A `file_url` that could not be fetched keeps `error.code` `bad_request` and adds `error.reason`, one of: `google_not_shared` (a Google link not shared publicly), `url_download_failed_4xx` (the host answered a 4xx: 404 is a dead link, 401/403 a private one), `url_download_failed_5xx`, `url_download_failed_network` (no answer, e.g. DNS), `url_download_timeout`, `url_returned_html` (a web page, not a spreadsheet), `url_empty`, `url_refused`, `url_redirect_blocked` or `file_input_url_not_https`.401 — Missing or invalid API key. `error.code`: `unauthorized`.402 — Payment required. `error.code`: `tier_upgrade_required`. A forward-compatible response for a capability gated to a paid subscription; it is driven by the account/consent surface (POST /api/v1/consent), not by the stateless tool inputs. No action is needed for standard tool calls on the free tier.413 — Payload too large. `error.code`: `file_too_large` (the input exceeds the per-format upload ceiling, or expands past the content-processing ceiling once parsed) or `write_output_too_large` (the requested output would exceed the format write cap). These are capacity ceilings — identical for every caller, never a paywall lever.429 — Free-tier file allowance reached for the current period. `error.code`: `rate_limit_exceeded`.500 — Internal server error — an unexpected fault on our side. `error.code`: `internal_error`.503 — Service temporarily unavailable — retryable; a `Retry-After` header is sent when known. `error.code` is one of: `service_unavailable` (a backing service is down, or parse capacity is momentarily saturated), `rate_limit_backend_unavailable`, or `cache_backend_unavailable`.xlsx_workbook_viewsPOST /api/v1/tools/xlsx_workbook_views — Use this when you need to surface the UI state of a workbook — per-sheet visibility/zoom/frozen-panes/tab color, and which sheet is active on open.
Auth: Authorization: Bearer <api_key> (required)
file object optional The spreadsheet file, handed off by a host that fills in the OpenAI file-parameter convention (openai/fileParams) from an uploaded or attached file. The server downloads download_url once, server-side; never a local sandbox path.
download_url string required Temporary https URL to download the file. Valid only for this call.
file_id string required Host file identifier.
file_name string optional Original file name (advisory only; never used as a path).
mime_type string optional Declared MIME type (advisory only).
file_b64 string optionalSend exactly one file source: file_b64 (this field), file_url, file_handle, or file_text together with file_name.
file_handle string optional Handle returned by xlsx_upload_link, once the user has uploaded the spreadsheet file on that page. Use this when the user attached the file in chat or has no link. Provide this OR file_url.
file_name string optional File name with its extension (.csv, .tsv or .json), used with file_text.
file_sha256 string optional Hex SHA-256 of the exact file_text UTF-8 text. Optional; checked when given.
file_text string optional Use only for a small CSV, TSV or JSON file whose full text you already have. Practical limit about 2,000 cells or 40 KB (the server hard cap is 256 KB); above that use file_url, or xlsx_upload_link and file_handle. Requires file_name. Never encode or retype a binary file by hand. Provide this OR file_url OR file_handle.
file_url string optional https URL of the spreadsheet file (e.g. a shared Google Drive, Google Sheets, Dropbox, OneDrive or S3 link; must be viewable by anyone with the link). The server downloads it directly. Provide this OR file_handle.
options object optionalsheet string optional{
"properties": {
"file": {
"additionalProperties": false,
"description": "The spreadsheet file, handed off by a host that fills in the OpenAI file-parameter convention (openai/fileParams) from an uploaded or attached file. The server downloads download_url once, server-side; never a local sandbox path.",
"properties": {
"download_url": {
"description": "Temporary https URL to download the file. Valid only for this call.",
"maxLength": 8192,
"minLength": 1,
"type": "string"
},
"file_id": {
"description": "Host file identifier.",
"maxLength": 256,
"type": "string"
},
"file_name": {
"description": "Original file name (advisory only; never used as a path).",
"maxLength": 256,
"type": "string"
},
"mime_type": {
"description": "Declared MIME type (advisory only).",
"maxLength": 256,
"type": "string"
}
},
"required": [
"download_url",
"file_id"
],
"type": "object"
},
"file_b64": {
"description": "Send exactly one file source: file_b64 (this field), file_url, file_handle, or file_text together with file_name.",
"type": "string"
},
"file_handle": {
"description": "Handle returned by xlsx_upload_link, once the user has uploaded the spreadsheet file on that page. Use this when the user attached the file in chat or has no link. Provide this OR file_url.",
"maxLength": 128,
"minLength": 1,
"type": "string"
},
"file_name": {
"description": "File name with its extension (.csv, .tsv or .json), used with file_text.",
"maxLength": 200,
"minLength": 1,
"type": "string"
},
"file_sha256": {
"description": "Hex SHA-256 of the exact file_text UTF-8 text. Optional; checked when given.",
"maxLength": 64,
"minLength": 64,
"type": "string"
},
"file_text": {
"description": "Use only for a small CSV, TSV or JSON file whose full text you already have. Practical limit about 2,000 cells or 40 KB (the server hard cap is 256 KB); above that use file_url, or xlsx_upload_link and file_handle. Requires file_name. Never encode or retype a binary file by hand. Provide this OR file_url OR file_handle.",
"maxLength": 262144,
"minLength": 1,
"type": "string"
},
"file_url": {
"description": "https URL of the spreadsheet file (e.g. a shared Google Drive, Google Sheets, Dropbox, OneDrive or S3 link; must be viewable by anyone with the link). The server downloads it directly. Provide this OR file_handle.",
"maxLength": 8192,
"minLength": 1,
"type": "string"
},
"options": {
"properties": {
"sheet": {
"type": "string"
}
},
"type": "object"
}
},
"required": [],
"type": "object",
"oneOf": [
{
"required": [
"file_b64"
]
},
{
"required": [
"file_url"
]
},
{
"required": [
"file_handle"
]
},
{
"required": [
"file_text",
"file_name"
]
},
{
"required": [
"file"
]
}
]
}REST (curl):
curl -sX POST https://api.xlsx-for-ai.dev/api/v1/tools/xlsx_workbook_views \
-H 'content-type: application/json' \
-H 'Authorization: Bearer <api_key>' \
-d '{"file_b64":"<BASE64_ENCODED_FILE_BYTES>"}'MCP (tools/call):
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "xlsx_workbook_views",
"arguments": {
"file_url": "https://example.com/placeholder.xlsx"
}
}
}200 — Tool result (base64-in / base64-out; stateless). A `file_text` whose `file_name` ends in .xlsx, .xlsm, .xls, .xlsb, .ods, .xltx, .xltm or .xlam computes nothing: the reply is still 200, with `status` `workbook_text_retired`, `computed` false, `upload_url` (send the file there with one PUT), `upload_page` (the page a person opens to drop the file in), `file_handle` (pass it to the same tool once the file is uploaded) and `expires_at`. A text copy loses defined names, styles, merged cells, validations and macros, so a workbook is never sent as text.400 — Bad request. `error.code` is one of: `bad_request` (malformed or oversized JSON body, invalid base64, or a missing/invalid field), `hardening_rejected` (the upload failed an ingest safety guard — e.g. an encrypted workbook, a non-OOXML zip, a truncated file, or a legacy .xls on a route that does not accept it), `unparseable_input` (no readable CSV header row), `malformed_csv` (a structurally broken CSV — an unclosed or mid-field quote), or `unsupported_output_format` (`xlsx_convert` was asked to write old binary .xls — Excel 97-2003 is read-only here; request `xlsx` or `csv`). A sheet- or column-not-found request also carries `available_sheets` / `available_columns`. A `file_url` that could not be fetched keeps `error.code` `bad_request` and adds `error.reason`, one of: `google_not_shared` (a Google link not shared publicly), `url_download_failed_4xx` (the host answered a 4xx: 404 is a dead link, 401/403 a private one), `url_download_failed_5xx`, `url_download_failed_network` (no answer, e.g. DNS), `url_download_timeout`, `url_returned_html` (a web page, not a spreadsheet), `url_empty`, `url_refused`, `url_redirect_blocked` or `file_input_url_not_https`.401 — Missing or invalid API key. `error.code`: `unauthorized`.402 — Payment required. `error.code`: `tier_upgrade_required`. A forward-compatible response for a capability gated to a paid subscription; it is driven by the account/consent surface (POST /api/v1/consent), not by the stateless tool inputs. No action is needed for standard tool calls on the free tier.413 — Payload too large. `error.code`: `file_too_large` (the input exceeds the per-format upload ceiling, or expands past the content-processing ceiling once parsed) or `write_output_too_large` (the requested output would exceed the format write cap). These are capacity ceilings — identical for every caller, never a paywall lever.429 — Free-tier file allowance reached for the current period. `error.code`: `rate_limit_exceeded`.500 — Internal server error — an unexpected fault on our side. `error.code`: `internal_error`.503 — Service temporarily unavailable — retryable; a `Retry-After` header is sent when known. `error.code` is one of: `service_unavailable` (a backing service is down, or parse capacity is momentarily saturated), `rate_limit_backend_unavailable`, or `cache_backend_unavailable`.xlsx_writePOST /api/v1/tools/xlsx_write — Use this when you need to create or update a spreadsheet from a structured spec ({sheets: [{name, cells: [{address, value | formula, style?, hyperlink?, comment?}], columns?, freeze?, merges?, conditionalFormats?, dataValidations?}]}) — formatting is optional; server-validated before writing. A value sent beside a formula is stored as that formula's cached result (the reply says how many: _meta.cached_formula_cells).
Auth: Authorization: Bearer <api_key> (required)
base_file object optional The base workbook to edit, handed off by a host that fills in the OpenAI file-parameter convention (openai/fileParams) from an uploaded or attached file. The server downloads download_url once, server-side; never a local sandbox path.
download_url string required Temporary https URL to download the file. Valid only for this call.
file_id string required Host file identifier.
file_name string optional Original file name (advisory only; never used as a path).
mime_type string optional Declared MIME type (advisory only).
base_file_b64 string optionalcache_handle string optional spec object requiredWorkbook to write: {sheets: [{name, cells: [{address, value | formula}]}]}. cells is an array; every cell needs an address (e.g. "A1") plus value or formula.
sheets array required {
"properties": {
"cells": {
"description": "ARRAY of cell objects (not an object map keyed by address).",
"items": {
"properties": {
"address": {
"description": "Cell address, e.g. \"A1\" (columns A-XFD, rows 1-1048576). Required.",
"type": "string"
},
"comment": {
"description": "Cell note on a value cell.",
"properties": {
"author": {
"type": "string"
},
"text": {
"type": "string"
}
},
"required": [
"text"
],
"type": "object"
},
"formula": {
"description": "Formula without the leading \"=\", e.g. \"SUM(A1:A10)\". A value may be given beside it as the formula's cached result.",
"type": "string"
},
"hyperlink": {
"description": "External link on a value cell.",
"properties": {
"target": {
"type": "string"
},
"tooltip": {
"type": "string"
}
},
"required": [
"target"
],
"type": "object"
},
"style": {
"description": "Optional formatting; on a formula cell it formats the cached result.",
"properties": {
"bold": {
"type": "boolean"
},
"border": {
"properties": {
"bottom": {
"properties": {
"color": {
"description": "RRGGBB or AARRGGBB",
"type": "string"
},
"style": {
"enum": [
"thin",
"medium"
],
"type": "string"
}
},
"required": [
"style"
],
"type": "object"
},
"left": {
"properties": {
"color": {
"description": "RRGGBB or AARRGGBB",
"type": "string"
},
"style": {
"enum": [
"thin",
"medium"
],
"type": "string"
}
},
"required": [
"style"
],
"type": "object"
},
"right": {
"properties": {
"color": {
"description": "RRGGBB or AARRGGBB",
"type": "string"
},
"style": {
"enum": [
"thin",
"medium"
],
"type": "string"
}
},
"required": [
"style"
],
"type": "object"
},
"top": {
"properties": {
"color": {
"description": "RRGGBB or AARRGGBB",
"type": "string"
},
"style": {
"enum": [
"thin",
"medium"
],
"type": "string"
}
},
"required": [
"style"
],
"type": "object"
}
},
"type": "object"
},
"fill": {
"description": "Solid fill color, RRGGBB or AARRGGBB",
"type": "string"
},
"fontColor": {
"description": "RRGGBB or AARRGGBB",
"type": "string"
},
"fontSize": {
"type": "number"
},
"italic": {
"type": "boolean"
},
"numFmt": {
"description": "e.g. \"0.00%\", \"$#,##0.00\", \"yyyy-mm-dd\"",
"type": "string"
},
"underline": {
"type": "boolean"
}
},
"type": "object"
},
"value": {
"description": "Literal cell value. On a formula cell: the formula's cached result, shown on open without a recalculation (string, finite number, boolean or null; any other value is a 400). The reply's _meta.cached_formula_cells counts these cells.",
"type": [
"boolean",
"null",
"number",
"string"
]
}
},
"required": [
"address"
],
"type": "object"
},
"type": "array"
},
"columns": {
"description": "Column widths; index is 1-based (A=1).",
"items": {
"properties": {
"index": {
"type": "number"
},
"width": {
"type": "number"
}
},
"required": [
"index",
"width"
],
"type": "object"
},
"type": "array"
},
"conditionalFormats": {
"items": {
"properties": {
"color": {
"type": "string"
},
"colors": {
"items": {
"type": "string"
},
"type": "array"
},
"formulae": {
"items": {
"type": "string"
},
"type": "array"
},
"operator": {
"type": "string"
},
"priority": {
"type": "number"
},
"ref": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"cellIs",
"colorScale",
"dataBar"
]
}
},
"required": [
"ref",
"type"
],
"type": "object"
},
"type": "array"
},
"dataValidations": {
"items": {
"properties": {
"allowBlank": {
"type": "boolean"
},
"error": {
"type": "string"
},
"errorTitle": {
"type": "string"
},
"formula1": {
"type": "string"
},
"formula2": {
"type": "string"
},
"operator": {
"type": "string"
},
"prompt": {
"type": "string"
},
"promptTitle": {
"type": "string"
},
"ref": {
"type": "string"
},
"showErrorMessage": {
"type": "boolean"
},
"showInputMessage": {
"type": "boolean"
},
"type": {
"type": "string",
"enum": [
"list",
"whole",
"decimal",
"date",
"textLength",
"custom"
]
}
},
"required": [
"ref",
"type"
],
"type": "object"
},
"type": "array"
},
"freeze": {
"description": "Top-left cell of the scrollable pane, e.g. \"B2\" freezes column A and row 1.",
"type": "string"
},
"merges": {
"description": "A1 ranges, e.g. [\"A1:C1\"].",
"items": {
"type": "string"
},
"type": "array"
},
"name": {
"description": "Sheet name; must not contain * ? : \\ / [ ]",
"type": "string"
}
},
"required": [
"cells",
"name"
],
"type": "object"
}{
"properties": {
"base_file": {
"additionalProperties": false,
"description": "The base workbook to edit, handed off by a host that fills in the OpenAI file-parameter convention (openai/fileParams) from an uploaded or attached file. The server downloads download_url once, server-side; never a local sandbox path.",
"properties": {
"download_url": {
"description": "Temporary https URL to download the file. Valid only for this call.",
"maxLength": 8192,
"minLength": 1,
"type": "string"
},
"file_id": {
"description": "Host file identifier.",
"maxLength": 256,
"type": "string"
},
"file_name": {
"description": "Original file name (advisory only; never used as a path).",
"maxLength": 256,
"type": "string"
},
"mime_type": {
"description": "Declared MIME type (advisory only).",
"maxLength": 256,
"type": "string"
}
},
"required": [
"download_url",
"file_id"
],
"type": "object"
},
"base_file_b64": {
"type": "string"
},
"cache_handle": {
"maxLength": 128,
"minLength": 1,
"pattern": "^[^\\u0000-\\u001f\\u007f\\s:*?\\[\\]]+$",
"type": "string"
},
"spec": {
"description": "Workbook to write: {sheets: [{name, cells: [{address, value | formula}]}]}. cells is an array; every cell needs an address (e.g. \"A1\") plus value or formula.",
"examples": [
{
"sheets": [
{
"cells": [
{
"address": "A1",
"value": "Total"
},
{
"address": "B1",
"value": 5
},
{
"address": "B2",
"formula": "SUM(B1:B1)"
}
],
"name": "Sheet1"
}
]
}
],
"properties": {
"sheets": {
"items": {
"properties": {
"cells": {
"description": "ARRAY of cell objects (not an object map keyed by address).",
"items": {
"properties": {
"address": {
"description": "Cell address, e.g. \"A1\" (columns A-XFD, rows 1-1048576). Required.",
"type": "string"
},
"comment": {
"description": "Cell note on a value cell.",
"properties": {
"author": {
"type": "string"
},
"text": {
"type": "string"
}
},
"required": [
"text"
],
"type": "object"
},
"formula": {
"description": "Formula without the leading \"=\", e.g. \"SUM(A1:A10)\". A value may be given beside it as the formula's cached result.",
"type": "string"
},
"hyperlink": {
"description": "External link on a value cell.",
"properties": {
"target": {
"type": "string"
},
"tooltip": {
"type": "string"
}
},
"required": [
"target"
],
"type": "object"
},
"style": {
"description": "Optional formatting; on a formula cell it formats the cached result.",
"properties": {
"bold": {
"type": "boolean"
},
"border": {
"properties": {
"bottom": {
"properties": {
"color": {
"description": "RRGGBB or AARRGGBB",
"type": "string"
},
"style": {
"enum": [
"thin",
"medium"
],
"type": "string"
}
},
"required": [
"style"
],
"type": "object"
},
"left": {
"properties": {
"color": {
"description": "RRGGBB or AARRGGBB",
"type": "string"
},
"style": {
"enum": [
"thin",
"medium"
],
"type": "string"
}
},
"required": [
"style"
],
"type": "object"
},
"right": {
"properties": {
"color": {
"description": "RRGGBB or AARRGGBB",
"type": "string"
},
"style": {
"enum": [
"thin",
"medium"
],
"type": "string"
}
},
"required": [
"style"
],
"type": "object"
},
"top": {
"properties": {
"color": {
"description": "RRGGBB or AARRGGBB",
"type": "string"
},
"style": {
"enum": [
"thin",
"medium"
],
"type": "string"
}
},
"required": [
"style"
],
"type": "object"
}
},
"type": "object"
},
"fill": {
"description": "Solid fill color, RRGGBB or AARRGGBB",
"type": "string"
},
"fontColor": {
"description": "RRGGBB or AARRGGBB",
"type": "string"
},
"fontSize": {
"type": "number"
},
"italic": {
"type": "boolean"
},
"numFmt": {
"description": "e.g. \"0.00%\", \"$#,##0.00\", \"yyyy-mm-dd\"",
"type": "string"
},
"underline": {
"type": "boolean"
}
},
"type": "object"
},
"value": {
"description": "Literal cell value. On a formula cell: the formula's cached result, shown on open without a recalculation (string, finite number, boolean or null; any other value is a 400). The reply's _meta.cached_formula_cells counts these cells.",
"type": [
"boolean",
"null",
"number",
"string"
]
}
},
"required": [
"address"
],
"type": "object"
},
"type": "array"
},
"columns": {
"description": "Column widths; index is 1-based (A=1).",
"items": {
"properties": {
"index": {
"type": "number"
},
"width": {
"type": "number"
}
},
"required": [
"index",
"width"
],
"type": "object"
},
"type": "array"
},
"conditionalFormats": {
"items": {
"properties": {
"color": {
"type": "string"
},
"colors": {
"items": {
"type": "string"
},
"type": "array"
},
"formulae": {
"items": {
"type": "string"
},
"type": "array"
},
"operator": {
"type": "string"
},
"priority": {
"type": "number"
},
"ref": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"cellIs",
"colorScale",
"dataBar"
]
}
},
"required": [
"ref",
"type"
],
"type": "object"
},
"type": "array"
},
"dataValidations": {
"items": {
"properties": {
"allowBlank": {
"type": "boolean"
},
"error": {
"type": "string"
},
"errorTitle": {
"type": "string"
},
"formula1": {
"type": "string"
},
"formula2": {
"type": "string"
},
"operator": {
"type": "string"
},
"prompt": {
"type": "string"
},
"promptTitle": {
"type": "string"
},
"ref": {
"type": "string"
},
"showErrorMessage": {
"type": "boolean"
},
"showInputMessage": {
"type": "boolean"
},
"type": {
"type": "string",
"enum": [
"list",
"whole",
"decimal",
"date",
"textLength",
"custom"
]
}
},
"required": [
"ref",
"type"
],
"type": "object"
},
"type": "array"
},
"freeze": {
"description": "Top-left cell of the scrollable pane, e.g. \"B2\" freezes column A and row 1.",
"type": "string"
},
"merges": {
"description": "A1 ranges, e.g. [\"A1:C1\"].",
"items": {
"type": "string"
},
"type": "array"
},
"name": {
"description": "Sheet name; must not contain * ? : \\ / [ ]",
"type": "string"
}
},
"required": [
"cells",
"name"
],
"type": "object"
},
"type": "array"
}
},
"required": [
"sheets"
],
"type": "object"
}
},
"required": [
"spec"
],
"type": "object"
}REST (curl):
curl -sX POST https://api.xlsx-for-ai.dev/api/v1/tools/xlsx_write \
-H 'content-type: application/json' \
-H 'Authorization: Bearer <api_key>' \
-d '{"spec":{"sheets":[{"cells":[{"address":"example-value"}],"name":"example-value"}]},"base_file_b64":"<BASE64_ENCODED_FILE_BYTES>"}'MCP (tools/call):
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "xlsx_write",
"arguments": {
"spec": {
"sheets": [
{
"cells": [
{
"address": "example-value"
}
],
"name": "example-value"
}
]
},
"base_file_url": "https://example.com/placeholder.xlsx"
}
}
}200 — Tool result (base64-in / base64-out; stateless).400 — Bad request. `error.code` is one of: `bad_request` (malformed or oversized JSON body, invalid base64, or a missing/invalid field), `hardening_rejected` (the upload failed an ingest safety guard — e.g. an encrypted workbook, a non-OOXML zip, a truncated file, or a legacy .xls on a route that does not accept it), `unparseable_input` (no readable CSV header row), `malformed_csv` (a structurally broken CSV — an unclosed or mid-field quote), or `unsupported_output_format` (`xlsx_convert` was asked to write old binary .xls — Excel 97-2003 is read-only here; request `xlsx` or `csv`). A sheet- or column-not-found request also carries `available_sheets` / `available_columns`. A `file_url` that could not be fetched keeps `error.code` `bad_request` and adds `error.reason`, one of: `google_not_shared` (a Google link not shared publicly), `url_download_failed_4xx` (the host answered a 4xx: 404 is a dead link, 401/403 a private one), `url_download_failed_5xx`, `url_download_failed_network` (no answer, e.g. DNS), `url_download_timeout`, `url_returned_html` (a web page, not a spreadsheet), `url_empty`, `url_refused`, `url_redirect_blocked` or `file_input_url_not_https`.401 — Missing or invalid API key. `error.code`: `unauthorized`.402 — Payment required. `error.code`: `tier_upgrade_required`. A forward-compatible response for a capability gated to a paid subscription; it is driven by the account/consent surface (POST /api/v1/consent), not by the stateless tool inputs. No action is needed for standard tool calls on the free tier.413 — Payload too large. `error.code`: `file_too_large` (the input exceeds the per-format upload ceiling, or expands past the content-processing ceiling once parsed) or `write_output_too_large` (the requested output would exceed the format write cap). These are capacity ceilings — identical for every caller, never a paywall lever.429 — Free-tier file allowance reached for the current period. `error.code`: `rate_limit_exceeded`.500 — Internal server error — an unexpected fault on our side. `error.code`: `internal_error`.503 — Service temporarily unavailable — retryable; a `Retry-After` header is sent when known. `error.code` is one of: `service_unavailable` (a backing service is down, or parse capacity is momentarily saturated), `rate_limit_backend_unavailable`, or `cache_backend_unavailable`.
Every tool call that fails returns a JSON body shaped { "error": { "code": "...",
"message": "..." } }. The table below lists every error.code the API can
send, its HTTP status, what it means, and how to fix it.
| code | HTTP status | meaning | fix |
|---|---|---|---|
bad_request | 400 | The request body was malformed or oversized JSON, the base64 payload could not be decoded, or a required field was missing or invalid. | Validate the request against this tool's schema in this reference: confirm file_b64 decodes as valid base64 and every required field is present with the documented type. |
cache_backend_unavailable | 503 | The workbook-cache backend (the Redis blob store used between calls) is temporarily unreachable. | Retry after a short backoff. This is transient and not caused by your input. |
capability_gap | 501 | The requested function isn't yet covered by our own engine for this file type or size class, and we refuse the full-workbook recompute fallback that risks an out-of-memory failure on a large file. Returned only by xlsx_convert's own-writer decline path (for example, converting to xlsx). | Not retryable — the same request will not succeed later for this file. Try a different output format, or wait for expanded own-engine coverage. |
file_too_large | 413 | The input file exceeds the per-format upload ceiling, or its decompressed content exceeds the content-processing ceiling once parsed. | Reduce the file size (fewer sheets or rows, remove embedded media) or split it into smaller files. No plan unlocks a file over this ceiling. |
forbidden | 403 | The request was rejected as forbidden before it reached tool logic. | Confirm you are calling the documented route and method — this is a framework-level rejection, not a per-tool business rule. |
internal_error | 500 | An unexpected fault on our side — the request did not match any known, well-formed failure. | Retry after a short wait. Our error-review process remediates internal_error within 24 hours; if it recurs, email support@xlsx-for-ai.dev with the tool name and the time of the request. |
invalid_arguments | 400 | The tool arguments did not match the tool's input schema: a required field is missing, a value has the wrong type, or an unknown field was sent. The message names the field. | Compare your arguments with this tool's schema in this reference, correct the field the message names, and send the call again. Retrying unchanged returns the same error. |
malformed_csv | 400 | The CSV tokenizer hit a structural malformation it cannot recover from: an unescaped quote mid-field, stray characters after a closing quote, or a quoted field left open at end of input. | Fix the CSV's quoting: wrap fields that contain quotes or delimiters in double-quotes, double any embedded quote ("" ), and close every opened quote. |
method_not_allowed | 405 | The HTTP method used does not match the documented method for this route. | Use the method shown in this reference for the route — every tool call is POST. |
not_connected | 409 | The API client is authenticated but has no active store-context binding (Importable / Shopify connector tools only). The store-bound tools (importable_connect, importable_export, importable_import, importable_job_status) are served only where an Importable store is configured; elsewhere they are left out of tools/list and answer 404. | Where an Importable store is configured: mint a single-use connect code in the Importable admin (Settings → Connect an agent) and call importable_connect with it before calling a store-bound tool. |
not_found | 404 | The requested route does not exist. | Check the path against this reference; tool routes are POST /api/v1/tools/<name>. |
rate_limit_backend_unavailable | 503 | The rate-limit backend (Redis) could not be reached, so your usage could not be evaluated. | Retry after a short backoff. This is not a statement about your usage — we fail closed rather than let requests through unmetered. |
rate_limit_exceeded | 429 | A rate or volume limit was hit: too many requests from your address in a minute, too many registrations from your address in an hour, a per-key request limit, or the monthly file-processing limit. | Wait as long as the Retry-After header (seconds) and the message say, then repeat the same request. For the monthly file-processing limit the count resets at the start of the next UTC month. |
redact_cache_leak_detected | 422 | The redact tool's own completeness check found a removed value still present in a cache copy inside the output ZIP after the scrub pass — a residual-leak guard, not a crash. No file is returned. | Remove or rewrite the remaining copy of the value in the source workbook (the error message names the file parts that hold it), then repeat the request. |
redact_formula_literal_unsafe | 422 | A value the redactor was going to remove is still inside a formula, and that formula cannot be rewritten safely (the value sits outside any text string, so a rewrite would change the formula, or the formula could not be parsed with certainty). The whole redaction is refused and no file is returned. | Edit that formula in the source workbook (the error message names the file parts that hold it), or leave the value out of the redaction, then repeat the request. |
redact_sheet_name_flagged | 422 | A value the redactor was going to remove is also part of a sheet name. A sheet name cannot be rewritten safely, so the whole redaction is refused and no file is returned. | Rename that sheet in the source workbook, or leave the value out of the redaction, then repeat the request. |
service_unavailable | 503 | A backing service this request depends on (for example the auth database) is temporarily down, or parse capacity is momentarily saturated. | Retry after the interval in Retry-After, if present, or after a short backoff. |
streaming_reader_limitation | 501 | The workbook is structurally well-formed, but our streaming reader could not process it — a coverage gap on our side, not a problem with your file. | Not retryable for the same file. The gap is tracked for expanded coverage; try again later or provide a different export of the same data. |
too_complex | 400 | The workbook's parse or recalculation ran past the hard per-job time budget and was safely aborted, to protect the service from one pathological file freezing it. | Simplify the file (fewer formulas or sheets, smaller ranges) or split it. Retrying the identical file will hit the same deadline again. |
unauthorized | 401 | The request is missing an API key, or the key is invalid. | Send your key as Authorization: Bearer <api_key> on every tool call. If you have no key yet, sign in over HTTP with the device flow, then call POST /api/v1/clients with the access token to get one: the copy-paste steps are at https://api.xlsx-for-ai.dev/api/v1/reference#on-ramp |
unparseable_input | 400 | The bytes decoded fine but are not a parseable CSV in the dialect this route requires — no readable header row, or a non-comma-delimited file wearing a .csv name. | Confirm the file has a real header row and uses the delimiter the route expects; re-export as standard comma-delimited CSV if needed. |
unprocessable_entity | 422 | The request body was well-formed JSON of the right shape, but the framework rejected its content as unprocessable before it reached tool logic. | Re-check the request against this tool's schema below; this is a framework-level fallback, not a specific business-rule refusal. |
unsupported_media_type | 415 | The request's Content-Type header is not one this route accepts. | Send the request body as application/json. |
upgrade_required | 402 | The requested file use is blocked by a count-meter paywall: the free monthly allowance or trial file count is spent. | Follow the upgrade.url in the response body to subscribe. A spent trial does not reset; a spent free monthly allowance resets at the start of the next UTC month. |
write_output_too_large | 413 | The requested edit or convert would serialize to more bytes than the target format may ever write, even though the input itself was within its own ingestion cap. | Narrow the request — fewer sheets, rows, or columns — or split the source file, then retry. |
Separately, a successful (200) tool call can still return one of Excel's own error
literals as a computed cell value — these are not HTTP errors, but values a
formula evaluated to:
| literal | meaning | fix |
|---|---|---|
#DIV/0! | The formula divides by zero or by an empty cell. | Guard the divisor, for example IF(denominator=0, "", numerator/denominator), or wrap the formula in IFERROR. |
#N/A | A lookup (VLOOKUP, INDEX/MATCH, and similar) could not find the requested value in the given range. | Verify the lookup value actually exists in the search range with matching type and spelling, or wrap the formula in IFERROR. |
#NAME? | The formula refers to a name Excel doesn't recognize — a misspelled function, an undefined named range, or unquoted text. | Check the function or name spelling, and make sure any named range it references is defined. |
#NULL! | A formula used the intersection operator (a space) between two ranges that do not actually intersect. | Confirm the two ranges overlap, or replace the space with the correct operator (for example a comma for union). |
#NUM! | A formula produced a numeric value too large or small for Excel to represent, or passed an invalid number to a function that requires one in its domain (for example SQRT of a negative number). | Check the inputs are within the function's valid numeric domain. |
#REF! | The formula refers to a cell that no longer exists, typically because referenced cells, rows, or columns were deleted. | Update the formula to point at cells that still exist, or undo the deletion that broke the reference. |
#SPILL! | A dynamic-array formula's spill range is blocked by existing data in one or more of the cells it would spill into. | Clear the blocking cells, or move the formula to an area with enough empty space below and to the right of it. |
#VALUE! | A formula's argument or operand is the wrong type for what the function expects — for example text where a number is required. | Check each argument's type matches what the function expects, or wrap the formula in IFERROR to handle bad inputs gracefully. |