Bilig WorkPaper
Formula-backed WorkPaper tools for workbook readback, input edits, and JSON persistence.
我該用這個嗎
品質與安全性
根據工具定義與協定合規性的自動化分析。
上下文成本
這是每次將伺服器的工具載入模型上下文時所消耗的約略 token 數量。數量越高,可用於其他工作的注意力就越少。
安裝
一鍵安裝
將以下內容加入你的 `claude_desktop_config.json` 檔案:
{
"mcpServers": {
"bilig-workpaper": {
"command": "npx",
"args": [
"@bilig/workpaper"
]
}
}
}可執行的套件
0.164.11stdio遠端端點
https://bilig.proompteng.ai/mcpstreamable-http它能做什麼
工具清單
工具(8)
🟢list_sheets
Discover sheet names and used dimensions before reading or editing a WorkPaper. Returns metadata only; use read_range or read_cell for values.
輸入結構描述
{
"type": "object",
"additionalProperties": false
}輸出結構描述
{
"type": "object",
"properties": {
"sourcePath": {
"type": "string",
"description": "Absolute JSON file path when the server was started with --workpaper."
},
"writable": {
"type": "boolean",
"description": "Whether set_cell_contents persists edits back to the source JSON file."
},
"sheets": {
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"name",
"dimensions"
],
"properties": {
"id": {
"type": "number"
},
"name": {
"type": "string"
},
"dimensions": {
"type": "object",
"description": "Current used rows and columns for the sheet."
}
}
}
}
},
"required": [
"writable",
"sheets"
],
"additionalProperties": false
}🟢read_range(range, sheetName)
Read calculated values plus serialized formulas/inputs for an A1 range. Use for audit readback after edits; use read_cell for one address.
輸入結構描述
{
"type": "object",
"properties": {
"range": {
"type": "string",
"description": "A1 range such as Summary!A1:B5. If omitted from the range, pass sheetName separately."
},
"sheetName": {
"type": "string",
"description": "Default sheet name when range omits a sheet name, for example Summary."
}
},
"required": [
"range"
],
"additionalProperties": false
}輸出結構描述
{
"type": "object",
"properties": {
"range": {
"type": "string",
"description": "Canonical A1 range including the sheet name."
},
"values": {
"type": "array",
"description": "Two-dimensional array of evaluated cell values."
},
"serialized": {
"type": "array",
"description": "Two-dimensional array of raw serialized cell contents, including formulas."
}
},
"required": [
"range",
"values",
"serialized"
],
"additionalProperties": false
}🟢read_cell(sheetName, address)
Read one cell with calculated value, display text, formula text, formula diagnostics, and serialized content. Use after set_cell_contents to verify readback.
輸入結構描述
{
"type": "object",
"properties": {
"sheetName": {
"type": "string",
"description": "Existing sheet name."
},
"address": {
"type": "string",
"description": "Single A1 cell address such as B3."
}
},
"required": [
"sheetName",
"address"
],
"additionalProperties": false
}輸出結構描述
{
"type": "object",
"properties": {
"address": {
"type": "string",
"description": "Canonical sheet-qualified A1 address."
},
"value": {
"description": "Calculated cell value."
},
"serialized": {
"anyOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "null"
}
],
"description": "Raw serialized cell content; formulas are strings that start with =."
},
"formula": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "Formula text without losing the original calculated value context, or null for literal cells."
},
"displayValue": {
"type": "string",
"description": "Formatted value as a user would see it."
},
"formulaDiagnostics": {
"type": "array",
"description": "Structured formula diagnostics. Empty when the cell has no formula error."
}
},
"required": [
"address",
"value",
"serialized",
"formula",
"displayValue",
"formulaDiagnostics"
],
"additionalProperties": false
}🟡set_cell_contents(sheetName, address, value)
Write raw content to one cell and recalculate dependents in memory only. Start with --writable when the edit should persist to JSON.
輸入結構描述
{
"type": "object",
"properties": {
"sheetName": {
"type": "string",
"description": "Existing sheet name, for example Inputs."
},
"address": {
"type": "string",
"description": "Single A1 cell address such as B3. Ranges are not accepted."
},
"value": {
"type": "string",
"description": "Raw cell content. Formula strings must start with =; plain strings are stored as literals. Strict MCP hosts such as Semantic Kernel require a single parameter type, so pass evaluated numbers/booleans as formulas such as =0.4 or =TRUE(). The server still accepts JSON number, boolean, or null arguments from clients that support them."
}
},
"required": [
"sheetName",
"address",
"value"
],
"additionalProperties": false
}輸出結構描述
{
"type": "object",
"properties": {
"editedCell": {
"type": "string",
"description": "Canonical sheet-qualified address that was edited."
},
"before": {
"type": "object",
"required": [
"address",
"value",
"serialized",
"formula",
"displayValue",
"formulaDiagnostics"
],
"properties": {
"address": {
"type": "string",
"description": "Canonical sheet-qualified A1 address."
},
"value": {
"description": "Calculated cell value."
},
"serialized": {
"anyOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "null"
}
],
"description": "Raw serialized cell content; formulas are strings that start with =."
},
"formula": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "Formula text without losing the original calculated value context, or null for literal cells."
},
"displayValue": {
"type": "string",
"description": "Formatted value as a user would see it."
},
"formulaDiagnostics": {
"type": "array",
"description": "Structured formula diagnostics. Empty when the cell has no formula error."
}
},
"additionalProperties": false
},
"after": {
"type": "object",
"required": [
"address",
"value",
"serialized",
"formula",
"displayValue",
"formulaDiagnostics"
],
"properties": {
"address": {
"type": "string",
"description": "Canonical sheet-qualified A1 address."
},
"value": {
"description": "Calculated cell value."
},
"serialized": {
"anyOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "null"
}
],
"description": "Raw serialized cell content; formulas are strings that start with =."
},
"formula": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "Formula text without losing the original calculated value context, or null for literal cells."
},
"displayValue": {
"type": "string",
"description": "Formatted value as a user would see it."
},
"formulaDiagnostics": {
"type": "array",
"description": "Structured formula diagnostics. Empty when the cell has no formula error."
}
},
"additionalProperties": false
},
"restored": {
"type": "object",
"required": [
"address",
"value",
"serialized",
"formula",
"displayValue",
"formulaDiagnostics"
],
"properties": {
"address": {
"type": "string",
"description": "Canonical sheet-qualified A1 address."
},
"value": {
"description": "Calculated cell value."
},
"serialized": {
"anyOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "null"
}
],
"description": "Raw serialized cell content; formulas are strings that start with =."
},
"formula": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "Formula text without losing the original calculated value context, or null for literal cells."
},
"displayValue": {
"type": "string",
"description": "Formatted value as a user would see it."
},
"formulaDiagnostics": {
"type": "array",
"description": "Structured formula diagnostics. Empty when the cell has no formula error."
}
},
"additionalProperties": false
},
"persistence": {
"type": "object",
"required": [
"persisted",
"serializedBytes"
],
"properties": {
"persisted": {
"type": "boolean"
},
"path": {
"type": "string"
},
"serializedBytes": {
"type": "number"
}
}
},
"checks": {
"type": "object",
"required": [
"persisted",
"restoredMatchesAfter",
"previousSerialized",
"newSerialized"
],
"properties": {
"persisted": {
"type": "boolean"
},
"restoredMatchesAfter": {
"type": "boolean",
"description": "True when exported and re-imported JSON preserves the edited cell readback."
},
"previousSerialized": {
"anyOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "null"
}
],
"description": "Raw serialized cell content; formulas are strings that start with =."
},
"newSerialized": {
"anyOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "null"
}
],
"description": "Raw serialized cell content; formulas are strings that start with =."
}
}
}
},
"required": [
"editedCell",
"before",
"after",
"restored",
"persistence",
"checks"
],
"additionalProperties": false
}🟡set_cell_contents_and_readback(sheetName, address, value, readbackRange, readbackSheetName)
Write raw content to one cell, recalculate dependents, read a dependent range in the same tool call, and return persistence proof. Use this for stateless MCP clients such as hosted Open WebUI integrations.
輸入結構描述
{
"type": "object",
"properties": {
"sheetName": {
"type": "string",
"description": "Existing sheet name for the cell to edit, for example Inputs."
},
"address": {
"type": "string",
"description": "Single A1 cell address to edit, such as B3. Ranges are not accepted."
},
"value": {
"type": "string",
"description": "Raw cell content. Formula strings must start with =; plain strings are stored as literals. Strict MCP hosts require a single parameter type, so pass evaluated numbers/booleans as formulas such as =0.4 or =TRUE(). The server still accepts JSON number, boolean, or null arguments from clients that support them."
},
"readbackRange": {
"type": "string",
"description": "Dependent A1 range to read before and after the edit, for example Summary!A1:B5."
},
"readbackSheetName": {
"type": "string",
"description": "Default sheet name when readbackRange omits a sheet name."
}
},
"required": [
"sheetName",
"address",
"value",
"readbackRange"
],
"additionalProperties": false
}輸出結構描述
{
"type": "object",
"properties": {
"editedCell": {
"type": "string",
"description": "Canonical sheet-qualified address that was edited."
},
"readbackRange": {
"type": "string",
"description": "Canonical sheet-qualified range read before and after the edit."
},
"before": {
"type": "object",
"required": [
"address",
"value",
"serialized",
"formula",
"displayValue",
"formulaDiagnostics"
],
"properties": {
"address": {
"type": "string",
"description": "Canonical sheet-qualified A1 address."
},
"value": {
"description": "Calculated cell value."
},
"serialized": {
"anyOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "null"
}
],
"description": "Raw serialized cell content; formulas are strings that start with =."
},
"formula": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "Formula text without losing the original calculated value context, or null for literal cells."
},
"displayValue": {
"type": "string",
"description": "Formatted value as a user would see it."
},
"formulaDiagnostics": {
"type": "array",
"description": "Structured formula diagnostics. Empty when the cell has no formula error."
}
},
"additionalProperties": false
},
"after": {
"type": "object",
"required": [
"address",
"value",
"serialized",
"formula",
"displayValue",
"formulaDiagnostics"
],
"properties": {
"address": {
"type": "string",
"description": "Canonical sheet-qualified A1 address."
},
"value": {
"description": "Calculated cell value."
},
"serialized": {
"anyOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "null"
}
],
"description": "Raw serialized cell content; formulas are strings that start with =."
},
"formula": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "Formula text without losing the original calculated value context, or null for literal cells."
},
"displayValue": {
"type": "string",
"description": "Formatted value as a user would see it."
},
"formulaDiagnostics": {
"type": "array",
"description": "Structured formula diagnostics. Empty when the cell has no formula error."
}
},
"additionalProperties": false
},
"beforeReadback": {
"type": "object",
"required": [
"range",
"values",
"serialized"
],
"properties": {
"range": {
"type": "string",
"description": "Canonical A1 range including the sheet name."
},
"values": {
"type": "array",
"description": "Two-dimensional array of evaluated cell values."
},
"serialized": {
"type": "array",
"description": "Two-dimensional array of raw serialized cell contents, including formulas."
}
},
"additionalProperties": false
},
"afterReadback": {
"type": "object",
"required": [
"range",
"values",
"serialized"
],
"properties": {
"range": {
"type": "string",
"description": "Canonical A1 range including the sheet name."
},
"values": {
"type": "array",
"description": "Two-dimensional array of evaluated cell values."
},
"serialized": {
"type": "array",
"description": "Two-dimensional array of raw serialized cell contents, including formulas."
}
},
"additionalProperties": false
},
"restoredReadback": {
"type": "object",
"required": [
"range",
"values",
"serialized"
],
"properties": {
"range": {
"type": "string",
"description": "Canonical A1 range including the sheet name."
},
"values": {
"type": "array",
"description": "Two-dimensional array of evaluated cell values."
},
"serialized": {
"type": "array",
"description": "Two-dimensional array of raw serialized cell contents, including formulas."
}
},
"additionalProperties": false
},
"persistence": {
"type": "object",
"required": [
"persisted",
"serializedBytes"
],
"properties": {
"persisted": {
"type": "boolean"
},
"path": {
"type": "string"
},
"serializedBytes": {
"type": "number"
}
}
},
"checks": {
"type": "object",
"required": [
"persisted",
"readbackChanged",
"restoredReadbackMatchesAfter",
"previousSerialized",
"newSerialized"
],
"properties": {
"persisted": {
"type": "boolean"
},
"readbackChanged": {
"type": "boolean",
"description": "True when the dependent readback values differ after the edit."
},
"restoredReadbackMatchesAfter": {
"type": "boolean",
"description": "True when exported and re-imported JSON preserves the dependent readback range."
},
"previousSerialized": {
"anyOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "null"
}
],
"description": "Raw serialized cell content; formulas are strings that start with =."
},
"newSerialized": {
"anyOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "null"
}
],
"description": "Raw serialized cell content; formulas are strings that start with =."
}
}
}
},
"required": [
"editedCell",
"readbackRange",
"before",
"after",
"beforeReadback",
"afterReadback",
"restoredReadback",
"persistence",
"checks"
],
"additionalProperties": false
}🟢get_cell_display_value(sheetName, address)
Return the formatted display string for one cell. Use when an agent needs what a user would see, not the raw numeric value.
輸入結構描述
{
"type": "object",
"properties": {
"sheetName": {
"type": "string",
"description": "Existing sheet name."
},
"address": {
"type": "string",
"description": "Single A1 cell address such as B3."
}
},
"required": [
"sheetName",
"address"
],
"additionalProperties": false
}輸出結構描述
{
"type": "object",
"properties": {
"address": {
"type": "string"
},
"displayValue": {
"type": "string"
}
},
"required": [
"address",
"displayValue"
],
"additionalProperties": false
}🟢export_workpaper_document(includeConfig)
Export the current WorkPaper JSON document for persistence, review, or handoff to another agent. Does not write files by itself.
輸入結構描述
{
"type": "object",
"properties": {
"includeConfig": {
"type": "boolean",
"default": true,
"description": "Include workbook configuration metadata in the exported JSON. Defaults to true."
}
},
"additionalProperties": false
}輸出結構描述
{
"type": "object",
"properties": {
"sourcePath": {
"type": "string"
},
"document": {
"type": "object",
"description": "Persisted WorkPaper JSON document."
},
"serializedBytes": {
"type": "number"
}
},
"required": [
"document",
"serializedBytes"
],
"additionalProperties": false
}🟢validate_formula(formula)
Validate formula syntax with the WorkPaper parser before writing it to a cell. This checks syntax only; use set_cell_contents plus readback to evaluate.
輸入結構描述
{
"type": "object",
"properties": {
"formula": {
"type": "string",
"description": "Formula string including the leading =, for example =SUM(Inputs!B2:B4)."
}
},
"required": [
"formula"
],
"additionalProperties": false
}輸出結構描述
{
"type": "object",
"properties": {
"formula": {
"type": "string"
},
"valid": {
"type": "boolean"
}
},
"required": [
"formula",
"valid"
],
"additionalProperties": false
}社群
證據