Skip to main content
Glama

Arezzo

用于 Google Docs API 操作的确定性编译器。

你无法通过自行构建 batchUpdate 请求来安全地修改 Google 文档。该 API 使用 UTF-16 代码单元和级联索引偏移——如果在位置 50 插入 10 个字符,那么批处理中所有后续的索引都会出错。任何一次计算失误都会在没有错误消息的情况下静默损坏文档。

Arezzo 将语义意图编译为正确的请求序列。你只需告诉它你想做什么,它会处理索引算术。

面向 AI 代理 (MCP 工具)

Arezzo 通过模型上下文协议 (Model Context Protocol) 公开三个工具:

read_document(document_id)
  → Returns the document's structural map: headings with hierarchy,
    named ranges, tables, section boundaries. Call this before editing
    so you know what addresses are available.

edit_document(document_id, operations)
  → Compiles operations into correct batchUpdate requests and executes
    them. Handles UTF-16 arithmetic, cascading index shifts, and
    OT-compatible request ordering. Supported operations: insert/delete/
    replace text, formatting (bold, italic, headings, links), tables,
    lists, images, headers/footers, footnotes, named ranges.

validate_operations(document_id, operations)
  → Compile-only dry run. Returns the compiled requests for inspection
    without executing. Use before edit_document when uncertain.

操作格式

{
  "type": "insert_text",
  "address": {"heading": "Revenue Analysis"},
  "params": {"text": "New paragraph content.\n"}
}

寻址模式:

  • {"heading": "Section Name"} — 按标题文本

  • {"named_range": "range_name"} — 按命名范围

  • {"bookmark": "bookmark_id"} — 按书签 ID

  • {"start": true} — 文档开头

  • {"end": true} — 文档末尾

  • {"index": 42} — 绝对 UTF-16 索引

操作类型: insert_text, delete_content, replace_all_text, replace_section, update_text_style, update_paragraph_style, insert_bullet_list, insert_table, insert_table_row, insert_table_column, delete_table_row, delete_table_column, insert_image, create_header, create_footer, create_footnote, create_named_range, replace_named_range_content, insert_page_break

推荐工作流

read_document → edit_document → (if structural changes) read_document → edit_document

编辑前务必先读取。在插入结构元素(表格、页眉、页脚)后,请再次读取以获取新的元素索引,然后再在其中添加内容。

Related MCP server: google-docs-mcp

安装

pip install arezzo
arezzo init

arezzo init 将引导你完成 Google OAuth 设置,并为你的 MCP 客户端编写平台配置文件。

设置

先决条件: 一个已启用 Google Docs API 并拥有 OAuth 2.0 客户端 ID(桌面应用类型)的 Google Cloud 项目。

arezzo init

向导将:

  1. 将你的 credentials.json 复制到 ~/.config/arezzo/

  2. 运行 OAuth 同意流程(浏览器会打开一次)

  3. 为 Claude Code、Cursor 和 VS Code 生成配置文件

对于 Claude Desktop,arezzo init 会打印出需要手动添加的配置块。

平台配置

运行 arezzo init 后,配置文件会被写入你的项目目录:

Claude Code / Cursor (.mcp.json):

{
  "mcpServers": {
    "arezzo": {
      "command": "arezzo"
    }
  }
}

VS Code (.vscode/mcp.json):

{
  "servers": {
    "arezzo": {
      "type": "stdio",
      "command": "arezzo"
    }
  }
}

Claude Desktop (macOS 上为 ~/Library/Application Support/Claude/claude_desktop_config.json):

{
  "mcpServers": {
    "arezzo": {
      "command": "arezzo"
    }
  }
}

为什么存在 Arezzo

Google Docs 的 batchUpdate API 基于 UTF-16 代码单元和绝对索引位置运行。每一次字符插入或删除都会改变所有后续的索引。在包含多次修改的批处理中,每个请求的索引都必须考虑同一批处理中所有先前请求的影响。

要正确实现这一点,需要:

  • UTF-16 长度计算(而非 Python 的 len() — 代理对的计数方式不同)

  • 同类型修改的逆序执行(从末尾到开头删除)

  • 两阶段编译(内容修改先于格式修改)

  • 跨多步操作的级联偏移跟踪

Arezzo 以确定性的方式处理这些问题。相同的输入总是产生相同的输出。没有推理,没有猜测,没有“通常有效”。

架构

semantic operation
    ↓
arezzo.parser.parse_document()    — build heading/range/bookmark indexes
    ↓
arezzo.address.resolve_address()  — semantic reference → document index
    ↓
arezzo.operations.*               — operation → batchUpdate request(s)
    ↓
arezzo.index.sort_requests()      — OT-compatible mutation ordering
    ↓
correct batchUpdate request sequence

该引擎是一个纯函数:compile_operations(doc, operations) → requests。确定性。无副作用。无 API 调用。

MCP 服务器 (arezzo.server) 使用 Google Docs API I/O 和行为引导字段(next_step, present_to_user, document_reality)封装了该引擎。

许可证

MIT — Convergent Methods, LLC

Available Tools

3 tools
edit_documentA

Make changes to a Google Doc with correct index arithmetic.

You cannot safely modify a Google Doc by constructing batchUpdate
requests yourself. The API uses UTF-16 code units with cascading index
shifts — insert 10 characters at position 50, and every subsequent
index in your batch is wrong. A single miscalculation silently corrupts
the document with no error message. This tool compiles your semantic
intent into a correct request sequence.

**Recommended flow:** call read_document first, then describe your
changes using heading names or named ranges as addresses.

Valid operation types: insert_text, delete_content, replace_all_text,
replace_section, update_text_style, update_paragraph_style,
create_paragraph_bullets, convert_to_list, insert_table,
insert_table_row, insert_table_column, delete_table_row,
delete_table_column, insert_bullet_list, insert_numbered_list,
insert_page_break, insert_inline_image, create_header, create_footer,
create_footnote, create_named_range, delete_named_range,
replace_named_range_content.

Args:
    document_id: The Google Docs document ID.
    operations: List of operation dicts. Each has:
        - type: one of the operation types listed above
        - address: target location ({"heading": "Budget"}, {"start": true}, etc.)
        - params: operation-specific parameters
ParametersJSON Schema
NameRequiredDescriptionDefault
document_idYes
operationsYes

TDQS

A4.9/5.0
Behavior5/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It thoroughly explains critical behavioral traits: the tool prevents index miscalculation issues that could silently corrupt documents, compiles semantic intent into correct sequences, and lists all valid operation types. This goes well beyond basic functionality disclosure.

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?

The description is appropriately sized and well-structured with clear sections: problem context, recommended flow, operation types, and parameter documentation. While comprehensive, every sentence adds value, though the operation type list is lengthy but necessary for completeness.

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

Completeness5/5

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

For a mutation tool with no annotations and no output schema, the description provides exceptional completeness. It covers the why (index arithmetic dangers), how (recommended flow), what (operation types), and parameter details. The only minor gap is lack of explicit error handling information, but this is compensated by the thorough behavioral context.

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

Parameters5/5

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

With 0% schema description coverage, the description fully compensates by explaining both parameters in detail. It defines document_id as 'The Google Docs document ID' and provides comprehensive documentation for the operations parameter structure, including the type field with all valid values, address field examples, and params field purpose.

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 clearly states the tool's purpose: 'Make changes to a Google Doc' with specific details about handling index arithmetic and compiling semantic intent into correct request sequences. It distinguishes from sibling tools by mentioning read_document as part of the recommended flow and implicitly contrasting with validate_operations by focusing on execution rather than validation.

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 provides explicit usage guidance: 'call read_document first, then describe your changes using heading names or named ranges as addresses.' It also implicitly advises against manual batchUpdate construction by explaining the risks, effectively stating when not to use alternatives.

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

read_documentA

See what the document contains before you edit it.

Returns the document's structural map — headings with hierarchy, named
ranges with boundaries, tables with dimensions, inline objects, and
section boundaries. Without this, you're editing blind: you don't know
what headings exist, where sections start, or what named ranges are
available for targeting.

**Call this before edit_document.** The structural map shows what
addresses are available (heading names, named range names) so your edit
operations target the right locations.

Args:
    document_id: The Google Docs document ID (from the URL).
ParametersJSON Schema
NameRequiredDescriptionDefault
document_idYes

TDQS

A4.6/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It clearly describes what the tool returns ('structural map — headings with hierarchy, named ranges with boundaries, tables with dimensions, inline objects, and section boundaries') and explains the operational context ('so your edit operations target the right locations'). However, it doesn't mention potential limitations like document size constraints or authentication requirements.

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

Conciseness5/5

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

The description is well-structured and efficiently written. The first sentence states the core purpose, followed by specific details about the return value, then the operational guidance. Every sentence adds value, with no redundant information. The bold text effectively emphasizes the key usage instruction.

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?

For a single-parameter tool with no annotations and no output schema, the description provides excellent context about what the tool does, when to use it, and what it returns. However, without an output schema, the description could benefit from more detail about the exact format of the structural map return value, though it does list the key components that will be included.

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

Parameters4/5

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

With 0% schema description coverage, the description must compensate for the lack of parameter documentation. It provides the single parameter 'document_id' with clear semantics ('The Google Docs document ID from the URL'), which fully covers the one required parameter. The description doesn't need to explain parameter format beyond what's already stated.

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 clearly states the tool's purpose with specific verbs ('see what the document contains', 'returns the document's structural map') and resources ('document', 'headings', 'named ranges', 'tables', 'inline objects', 'section boundaries'). It explicitly distinguishes from the sibling edit_document by explaining this is for viewing structure before editing.

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 provides explicit guidance on when to use this tool: 'Call this before edit_document' and explains why ('Without this, you're editing blind'). It also mentions the alternative edit_document by name and explains the relationship between the tools.

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

validate_operationsA

Check whether edit operations would succeed without executing them.

Returns the compiled batchUpdate requests plus validation status. Use
this when you want to inspect the exact API calls before they execute,
or when debugging why an edit might fail. Catches address resolution
errors, ambiguous headings, out-of-bounds indices, and invalid
operation parameters.

**Use this before edit_document when uncertain.** Shows exactly what
Arezzo would send to the Google Docs API.

Args:
    document_id: The Google Docs document ID.
    operations: List of operation dicts (same format as edit_document).
ParametersJSON Schema
NameRequiredDescriptionDefault
document_idYes
operationsYes

TDQS

A4.7/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden and does well by disclosing key behavioral traits: it's a validation-only tool that doesn't execute changes, returns compiled batchUpdate requests and validation status, and catches specific error types (address resolution errors, ambiguous headings, etc.). It could improve by mentioning rate limits or auth needs, but covers core behavior adequately.

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

Conciseness5/5

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

The description is appropriately sized and front-loaded, with the first sentence stating the core purpose. Every sentence adds value: the second explains returns and use cases, the third details error types, and the fourth provides explicit usage guidance. The Args section efficiently clarifies parameters without redundancy.

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?

Given 2 parameters with 0% schema coverage and no output schema, the description does an excellent job explaining inputs and behavior. It falls short of a 5 because it doesn't fully describe the return format (e.g., structure of validation status) or potential error responses, which would be helpful despite no output schema.

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

Parameters5/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 fully. It adds significant meaning beyond the bare schema by explaining both parameters: 'document_id' is clarified as 'The Google Docs document ID' and 'operations' as 'List of operation dicts (same format as edit_document)', providing crucial context about format and relationship to sibling tools.

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 clearly states the tool's purpose with specific verbs ('check whether edit operations would succeed without executing them') and distinguishes it from siblings by explicitly mentioning 'edit_document' as the alternative for actual execution. It specifies the resource (edit operations on Google Docs) and the unique validation aspect.

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 provides explicit guidance on when to use this tool ('when you want to inspect the exact API calls before they execute, or when debugging why an edit might fail') and when not to use it (implied by suggesting use before 'edit_document when uncertain'). It clearly names the alternative sibling tool ('edit_document') for actual execution.

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

TDQS

A4.8/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose: read_document retrieves structure, edit_document applies changes, and validate_operations validates changes without execution. There is no overlap in functionality, and the descriptions explicitly differentiate their roles in the workflow.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern (edit_document, read_document, validate_operations) with clear, descriptive verbs. The naming is uniform and predictable across the set, enhancing usability.

Tool Count5/5

With 3 tools, the server is well-scoped for its purpose of safe Google Docs editing. Each tool earns its place by covering essential steps: reading, validating, and editing, with no redundancy or missing core functions.

Completeness5/5

The tool set provides complete coverage for the domain of safe document editing: read_document for inspection, edit_document for modifications, and validate_operations for pre-execution checks. There are no gaps, and the tools support a full workflow from start to finish.

Maintenance

ActivityInactive
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

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/ConvergentMethods/arezzo'

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