Skip to main content
Glama

edit_spreadsheet

Edit cells or ranges, or append rows, in an Excel workbook (xlsx, xlsm, xls) into a new outputPath, keeping the original. Keeps styles, charts, images, merged cells, tables and VBA (never run); formulas recalculate where supported. Use it when edit_block refuses an in-place edit. Reports what was preserved.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "inputPath": "<inputPath>",
      "outputPath": "<outputPath>",
      "edits": "<edits>"
    },
    "name": "edit_spreadsheet"
  }
}

Input Schema

NameRequiredDescriptionDefault
editsYes
deviceIdNoComputer name or id
inputPathYes
outputPathYes
workSessionIdNoFrom create_work_session

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changed
    • changedInput schema / properties / deviceId / description
      Previous value: -"Computer name or id; optional with one computer or a default"New value: +"Computer name or id"
    • removedInput schema / properties / edits / items / properties / rows / minItems
      Removed value: -1
    • removedInput schema / properties / edits / items / properties / sheetName / maxLength
      Removed value: -31
    • removedInput schema / properties / edits / items / properties / sheetName / minLength
      Removed value: -1
    • removedInput schema / properties / edits / maxItems
      Removed value: -1000
    • removedInput schema / properties / edits / minItems
      Removed value: -1
  2. Changed11 schema fields changed
    • changedInput schema / properties / deviceId / description
      Previous value: -"Computer name or id from list_devices. Optional with one computer online or a default set."New value: +"Computer name or id; optional with one computer or a default"
    • removedInput schema / properties / edits / items / properties / rows / items / items / anyOf
      Removed value: -[
      -  {
      -    "maxLength": 32767,
      -    "type": "string"
      -  },
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "boolean"
      -  },
      -  {
      -    "type": "null"
      -  },
      -  {
      -    "properties": {
      -      "type": {
      -        "const": "blank",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "type"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "properties": {
      -      "type": {
      -        "const": "string",
      -        "type": "string"
      -      },
      -      "value": {
      -        "maxLength": 32767,
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "type",
      -      "value"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "properties": {
      -      "type": {
      -        "const": "number",
      -        "type": "string"
      -      },
      -      "value": {
      -        "type": "number"
      -      }
      -    },
      -    "required": [
      -      "type",
      -      "value"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "properties": {
      -      "type": {
      -        "const": "boolean",
      -        "type": "string"
      -      },
      -      "value": {
      -        "type": "boolean"
      -      }
      -    },
      -    "required": [
      -      "type",
      -      "value"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "properties": {
      -      "type": {
      -        "const": "date",
      -        "type": "string"
      -      },
      -      "value": {
      -        "format": "date-time",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "type",
      -      "value"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "properties": {
      -      "cachedValue": {
      -        "anyOf": [
      -          {
      -            "maxLength": 32767,
      -            "type": "string"
      -          },
      -          {
      -            "type": "number"
      -          },
      -          {
      -            "type": "boolean"
      -          },
      -          {
      -            "type": "null"
      -          },
      -          {
      -            "properties": {
      -              "type": {
      -                "const": "blank",
      -                "type": "string"
      -              }
      -            },
      -            "required": [
      -              "type"
      -            ],
      -            "type": "object"
      -          },
      -          {
      -            "properties": {
      -              "type": {
      -                "const": "string",
      -                "type": "string"
      -              },
      -              "value": {
      -                "maxLength": 32767,
      -                "type": "string"
      -              }
      -            },
      -            "required": [
      -              "type",
      -              "value"
      -            ],
      -            "type": "object"
      -          },
      -          {
      -            "properties": {
      -              "type": {
      -                "const": "number",
      -                "type": "string"
      -              },
      -              "value": {
      -                "type": "number"
      -              }
      -            },
      -            "required": [
      -              "type",
      -              "value"
      -            ],
      -            "type": "object"
      -          },
      -          {
      -            "properties": {
      -              "type": {
      -                "const": "boolean",
      -                "type": "string"
      -              },
      -              "value": {
      -                "type": "boolean"
      -              }
      -            },
      -            "required": [
      -              "type",
      -              "value"
      -            ],
      -            "type": "object"
      -          },
      -          {
      -            "properties": {
      -              "type": {
      -                "const": "date",
      -                "type": "string"
      -              },
      -              "value": {
      -                "format": "date-time",
      -                "type": "string"
      -              }
      -            },
      -            "required": [
      -              "type",
      -              "value"
      -            ],
      -            "type": "object"
      -          }
      -        ]
      -      },
      -      "formula": {
      -        "maxLength": 8193,
      -        "minLength": 1,
      -        "type": "string"
      -      },
      -      "type": {
      -        "const": "formula",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "type",
      -      "formula"
      -    ],
      -    "type": "object"
      -  }
      -]
    • addedInput schema / properties / edits / items / properties / rows / items / items / description
      Added value: +"A string, number, boolean or null, or {type:\"formula\",formula,cachedValue?}, {type:\"date\",value:ISO time}, {type:\"blank\"}"
    • addedInput schema / properties / edits / items / properties / rows / items / items / type
      Added value: +[
      +  "string",
      +  "number",
      +  "boolean",
      +  "null",
      +  "object"
      +]
    • removedInput schema / properties / edits / items / properties / value / anyOf
      Removed value: -[
      -  {
      -    "maxLength": 32767,
      -    "type": "string"
      -  },
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "boolean"
      -  },
      -  {
      -    "type": "null"
      -  },
      -  {
      -    "properties": {
      -      "type": {
      -        "const": "blank",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "type"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "properties": {
      -      "type": {
      -        "const": "string",
      -        "type": "string"
      -      },
      -      "value": {
      -        "maxLength": 32767,
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "type",
      -      "value"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "properties": {
      -      "type": {
      -        "const": "number",
      -        "type": "string"
      -      },
      -      "value": {
      -        "type": "number"
      -      }
      -    },
      -    "required": [
      -      "type",
      -      "value"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "properties": {
      -      "type": {
      -        "const": "boolean",
      -        "type": "string"
      -      },
      -      "value": {
      -        "type": "boolean"
      -      }
      -    },
      -    "required": [
      -      "type",
      -      "value"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "properties": {
      -      "type": {
      -        "const": "date",
      -        "type": "string"
      -      },
      -      "value": {
      -        "format": "date-time",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "type",
      -      "value"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "properties": {
      -      "cachedValue": {
      -        "anyOf": [
      -          {
      -            "maxLength": 32767,
      -            "type": "string"
      -          },
      -          {
      -            "type": "number"
      -          },
      -          {
      -            "type": "boolean"
      -          },
      -          {
      -            "type": "null"
      -          },
      -          {
      -            "properties": {
      -              "type": {
      -                "const": "blank",
      -                "type": "string"
      -              }
      -            },
      -            "required": [
      -              "type"
      -            ],
      -            "type": "object"
      -          },
      -          {
      -            "properties": {
      -              "type": {
      -                "const": "string",
      -                "type": "string"
      -              },
      -              "value": {
      -                "maxLength": 32767,
      -                "type": "string"
      -              }
      -            },
      -            "required": [
      -              "type",
      -              "value"
      -            ],
      -            "type": "object"
      -          },
      -          {
      -            "properties": {
      -              "type": {
      -                "const": "number",
      -                "type": "string"
      -              },
      -              "value": {
      -                "type": "number"
      -              }
      -            },
      -            "required": [
      -              "type",
      -              "value"
      -            ],
      -            "type": "object"
      -          },
      -          {
      -            "properties": {
      -              "type": {
      -                "const": "boolean",
      -                "type": "string"
      -              },
      -              "value": {
      -                "type": "boolean"
      -              }
      -            },
      -            "required": [
      -              "type",
      -              "value"
      -            ],
      -            "type": "object"
      -          },
      -          {
      -            "properties": {
      -              "type": {
      -                "const": "date",
      -                "type": "string"
      -              },
      -              "value": {
      -                "format": "date-time",
      -                "type": "string"
      -              }
      -            },
      -            "required": [
      -              "type",
      -              "value"
      -            ],
      -            "type": "object"
      -          }
      -        ]
      -      },
      -      "formula": {
      -        "maxLength": 8193,
      -        "minLength": 1,
      -        "type": "string"
      -      },
      -      "type": {
      -        "const": "formula",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "type",
      -      "formula"
      -    ],
      -    "type": "object"
      -  }
      -]
    • addedInput schema / properties / edits / items / properties / value / description
      Added value: +"A string, number, boolean or null, or {type:\"formula\",formula,cachedValue?}, {type:\"date\",value:ISO time}, {type:\"blank\"}"
    • addedInput schema / properties / edits / items / properties / value / type
      Added value: +[
      +  "string",
      +  "number",
      +  "boolean",
      +  "null",
      +  "object"
      +]
    • removedInput schema / properties / edits / items / properties / values / items / items / anyOf
      Removed value: -[
      -  {
      -    "maxLength": 32767,
      -    "type": "string"
      -  },
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "boolean"
      -  },
      -  {
      -    "type": "null"
      -  },
      -  {
      -    "properties": {
      -      "type": {
      -        "const": "blank",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "type"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "properties": {
      -      "type": {
      -        "const": "string",
      -        "type": "string"
      -      },
      -      "value": {
      -        "maxLength": 32767,
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "type",
      -      "value"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "properties": {
      -      "type": {
      -        "const": "number",
      -        "type": "string"
      -      },
      -      "value": {
      -        "type": "number"
      -      }
      -    },
      -    "required": [
      -      "type",
      -      "value"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "properties": {
      -      "type": {
      -        "const": "boolean",
      -        "type": "string"
      -      },
      -      "value": {
      -        "type": "boolean"
      -      }
      -    },
      -    "required": [
      -      "type",
      -      "value"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "properties": {
      -      "type": {
      -        "const": "date",
      -        "type": "string"
      -      },
      -      "value": {
      -        "format": "date-time",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "type",
      -      "value"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "properties": {
      -      "cachedValue": {
      -        "anyOf": [
      -          {
      -            "maxLength": 32767,
      -            "type": "string"
      -          },
      -          {
      -            "type": "number"
      -          },
      -          {
      -            "type": "boolean"
      -          },
      -          {
      -            "type": "null"
      -          },
      -          {
      -            "properties": {
      -              "type": {
      -                "const": "blank",
      -                "type": "string"
      -              }
      -            },
      -            "required": [
      -              "type"
      -            ],
      -            "type": "object"
      -          },
      -          {
      -            "properties": {
      -              "type": {
      -                "const": "string",
      -                "type": "string"
      -              },
      -              "value": {
      -                "maxLength": 32767,
      -                "type": "string"
      -              }
      -            },
      -            "required": [
      -              "type",
      -              "value"
      -            ],
      -            "type": "object"
      -          },
      -          {
      -            "properties": {
      -              "type": {
      -                "const": "number",
      -                "type": "string"
      -              },
      -              "value": {
      -                "type": "number"
      -              }
      -            },
      -            "required": [
      -              "type",
      -              "value"
      -            ],
      -            "type": "object"
      -          },
      -          {
      -            "properties": {
      -              "type": {
      -                "const": "boolean",
      -                "type": "string"
      -              },
      -              "value": {
      -                "type": "boolean"
      -              }
      -            },
      -            "required": [
      -              "type",
      -              "value"
      -            ],
      -            "type": "object"
      -          },
      -          {
      -            "properties": {
      -              "type": {
      -                "const": "date",
      -                "type": "string"
      -              },
      -              "value": {
      -                "format": "date-time",
      -                "type": "string"
      -              }
      -            },
      -            "required": [
      -              "type",
      -              "value"
      -            ],
      -            "type": "object"
      -          }
      -        ]
      -      },
      -      "formula": {
      -        "maxLength": 8193,
      -        "minLength": 1,
      -        "type": "string"
      -      },
      -      "type": {
      -        "const": "formula",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "type",
      -      "formula"
      -    ],
      -    "type": "object"
      -  }
      -]
    • addedInput schema / properties / edits / items / properties / values / items / items / description
      Added value: +"A string, number, boolean or null, or {type:\"formula\",formula,cachedValue?}, {type:\"date\",value:ISO time}, {type:\"blank\"}"
    • addedInput schema / properties / edits / items / properties / values / items / items / type
      Added value: +[
      +  "string",
      +  "number",
      +  "boolean",
      +  "null",
      +  "object"
      +]
    • changedInput schema / properties / workSessionId / description
      Previous value: -"Work session from create_work_session. Pass the same ID on every call in this conversation; omit for legacy unscoped work."New value: +"From create_work_session"
  3. Changed1 schema field changed
    • addedInput schema / properties / workSessionId
      Added value: +{
      +  "description": "Work session from create_work_session. Pass the same ID on every call in this conversation; omit for legacy unscoped work.",
      +  "format": "uuid",
      +  "type": "string"
      +}
  4. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Annotations only say this is a non-read-only, non-destructive, closed-world write; the description adds substantially more – output goes to a new file while the original is untouched, styles, charts, images, merged cells, tables and VBA macros are preserved, VBA is never executed, and formulas recalculate where supported. It also sets expectations about the response (reports what was preserved), which is exactly the behavioral context the annotations cannot carry.

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

Conciseness4/5

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

Dense but front-loaded: the core action and preservation guarantees come first, and the routing hint to edit_block follows. Every clause carries information (formats, output path, preservation list, macro safety, output reporting), with only minor density cost from packing six facts into two sentences.

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

Completeness4/5

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

With no output schema, the note that it 'reports what was preserved' usefully signals the return value, and the preservation/VBA guarantees close the biggest risk gaps for a mutation tool whose annotations already declare it non-destructive. What remains missing is failure behavior (existing outputPath, unsupported features) and any hint about structuring the edits array.

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

Parameters3/5

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

Schema description coverage is only 40%, so the description has to carry weight; it does clarify the inputPath/outputPath relationship (new file, original kept), which the schema leaves undescribed. However, it says nothing about the nested edits array (cell vs range vs rows vs values precedence), sheetName vs sheetIndex, or deviceId/workSessionId, which are the hardest parameters to use correctly.

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?

States a specific verb and resource (edit cells or ranges, append rows in an Excel workbook), the supported formats (xlsx, xlsm, xls), and the output model (writes to a new outputPath, keeps the original). It also names the sibling it complements (edit_block), so an agent can tell the two apart without opening either schema.

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

Usage Guidelines4/5

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

Gives an explicit selection rule: use this when edit_block refuses an in-place edit. That condition is concrete and rules out the main confusion case. It stops short of stating when not to use it or how it relates to edit_docx/other alternatives, so it is clear context without full exclusions.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources