Skip to main content
Glama
senoff

xlsx-for-ai

xlsx_write

Write or update a local .xlsx file from a structured spec specifying sheets and cells with values or formulas. Server-side validation ensures safe output.

Instructions

create or update a LOCAL .xlsx file from a structured spec.

Spec shape: {sheets: [{name, cells: [{address, value | formula}]}]}. Each cell has an A1 address ("A1", "B2") and EITHER value (string|number|boolean|null) OR formula (string, no leading "="). Minimal example: {"sheets":[{"name":"Sheet1","cells":[{"address":"A1","value":"id"},{"address":"A2","value":1},{"address":"B2","formula":"A2*2"}]}]}

ALWAYS pass out_path to save to disk. Without out_path the workbook bytes return in _meta.file_b64.

USE WHEN: the user wants to write or edit a spreadsheet at a LOCAL file path. Server-validated before writing — safer than generating xlsx bytes directly.

DO NOT USE WHEN: working in a sandbox without local filesystem write access. Or editing an uploaded file in place (there is no local path to write to).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
base_file_b64No
specYes
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations indicate readOnlyHint=false (confirming write intent) and destructiveHint=false. The description adds behavioral context: server-side validation before writing, fallback to _meta.file_b64 when no out_path given, and the requirement to pass out_path for disk save. This enhances agent understanding beyond annotations. A minor deduction for not clarifying whether an existing file is overwritten or updated.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is somewhat lengthy but well-structured: purpose, spec shape, example, output behavior, and usage guidance. The example is helpful but could be shortened. The mention of 'out_path' not in schema adds unnecessary complexity. It's informative but not maximally concise.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (nested spec, optional base_file, output via b64 or file), the description covers creation/update, spec details, and output modes. However, the omission of base_file_b64 explanation and the inclusion of out_path (not a parameter) leaves gaps. The lack of output schema is partially mitigated by noting _meta.file_b64. Overall, adequate but not fully complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It describes the 'spec' parameter well (shape, example, constraints) but mentions 'out_path' which is NOT in the input schema (the schema only has spec and base_file_b64). This mismatch creates confusion about required/optional parameters. The base_file_b64 parameter is not explained at all. Overall, the description adds some value for spec but fails to fully cover both parameters, and introduces an undocumented parameter.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description begins with a clear verb+resource phrase: 'create or update a LOCAL .xlsx file from a structured spec.' This immediately distinguishes the tool from sibling tools like xlsx_read, xlsx_convert, etc., which handle other operations. The purpose is specific and unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly provides 'USE WHEN' and 'DO NOT USE WHEN' conditions, giving direct guidance on appropriate contexts and exclusions. It also compares to alternatives (safer than generating xlsx bytes directly), helping the agent decide when to invoke this tool over others.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/senoff/xlsx-for-ai'

If you have feedback or need assistance with the MCP directory API, please join our Discord server