Skip to main content
Glama

create_office_document

Create new Word, Excel, or PowerPoint files from structured content blocks: headings, paragraphs, formulas, tables, images, and LaTeX-style markup, saved to a chosen output path.

Instructions

Create a NEW Word (.docx), Excel (.xlsx), or PowerPoint (.pptx) file from a structured content list of typed blocks (heading, paragraph, formula, table, image), with LaTeX-style markup (\bfseries{bold}) and math formulas (\frac{a}{b}). Writes to output_path (default: a temp file) and persists. To edit an existing file, use edit_office_document. Excel blocks may carry: sheet_name, cell+formula, freeze, chart_type+chart_data_range, number_format, conditional_format, data_validation, hyperlink, named_range. PPT blocks may carry: slide_index, slide_layout, notes, transition, chart_type+chart_data, rows (table), path (picture), fill/line (shape). Multiple PPT text/table/chart blocks stack onto one slide unless slide_index is set.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
styleNoGlobal document style.
formatYesDocument format: - "docx": Word document — reports, letters, contracts, proposals - "xlsx": Excel workbook — spreadsheets, data tables, charts - "pptx": PowerPoint — slides, presentations, pitch decks
contentYesOrdered list of content blocks.
optionsNoTool options.
metadataNoDocument metadata (title, author, etc.).
output_pathNoOutput file path.
template_dataNoKey-value pairs to fill {{placeholder}} in content.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed16 schema fields changedv0.8.0
    • addedInput schema / $defs / ContentBlock / properties / cell
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Target cell reference, e.g. \"A1\" (Excel). Used by formula/hyperlink/write_cell.",
      +  "title": "Cell"
      +}
    • addedInput schema / $defs / ContentBlock / properties / chart_data
      Added value: +{
      +  "anyOf": [
      +    {
      +      "items": {
      +        "items": {},
      +        "type": "array"
      +      },
      +      "type": "array"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "PPT chart data: first row series names, then [category, *values] rows.",
      +  "title": "Chart Data"
      +}
    • addedInput schema / $defs / ContentBlock / properties / chart_data_range
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Excel chart data range, e.g. \"Sheet1!A1:B10\".",
      +  "title": "Chart Data Range"
      +}
    • addedInput schema / $defs / ContentBlock / properties / chart_type
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Chart type: bar, line, pie, area, doughnut, scatter (Excel/PPT).",
      +  "title": "Chart Type"
      +}
    • addedInput schema / $defs / ContentBlock / properties / conditional_format
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Excel conditional format spec, e.g. \"B2:B100=color_scale\" or \"C1:C5=cell_is:greaterThan:20\".",
      +  "title": "Conditional Format"
      +}
    • addedInput schema / $defs / ContentBlock / properties / data_validation
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Excel data validation spec, e.g. \"C2:C50=list:yes,no\" or \"B1:B10=whole:1:100\".",
      +  "title": "Data Validation"
      +}
    • addedInput schema / $defs / ContentBlock / properties / formula
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Excel formula string, e.g. \"=SUM(B1:B10)\". Requires cell.",
      +  "title": "Formula"
      +}
    • addedInput schema / $defs / ContentBlock / properties / freeze
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Excel freeze panes cell, e.g. \"A2\".",
      +  "title": "Freeze"
      +}
    • addedInput schema / $defs / ContentBlock / properties / hyperlink
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "URL to hyperlink the cell given by `cell` to (Excel).",
      +  "title": "Hyperlink"
      +}
    • addedInput schema / $defs / ContentBlock / properties / named_range
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Excel named range spec, e.g. \"MyRange=A1:B2\".",
      +  "title": "Named Range"
      +}
    • addedInput schema / $defs / ContentBlock / properties / notes
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "PPT speaker notes text for the target slide.",
      +  "title": "Notes"
      +}
    • addedInput schema / $defs / ContentBlock / properties / number_format
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Excel number format spec, e.g. \"A1:A10=0.00%\".",
      +  "title": "Number Format"
      +}
    • addedInput schema / $defs / ContentBlock / properties / sheet_name
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Target worksheet name (Excel). Routes write/formula/style to this sheet.",
      +  "title": "Sheet Name"
      +}
    • addedInput schema / $defs / ContentBlock / properties / slide_index
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Target slide index (0-based) for PPT content (tables/charts/text). None = current/last slide.",
      +  "title": "Slide Index"
      +}
    • addedInput schema / $defs / ContentBlock / properties / slide_layout
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "PPT slide layout name or index (applied on slide creation).",
      +  "title": "Slide Layout"
      +}
    • addedInput schema / $defs / ContentBlock / properties / transition
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "PPT slide transition name, e.g. \"fade\".",
      +  "title": "Transition"
      +}
  2. Changed4 schema fields changed
    • addedInput schema / $defs / ToolOptions / properties / action
      Added value: +{
      +  "anyOf": [
      +    {
      +      "enum": [
      +        "compare",
      +        "snapshot",
      +        "list_snapshots",
      +        "restore"
      +      ],
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Sub-operation for compare_documents: \"compare\" (default) diffs two documents; \"snapshot\" records path_a state; \"list_snapshots\" lists recorded snapshots; \"restore\" writes a snapshot back to path_b.",
      +  "title": "Action"
      +}
    • addedInput schema / $defs / ToolOptions / properties / snapshot_dir
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Directory to store/read document snapshots (default: ~/.tianshang-scribe/snapshots/).",
      +  "title": "Snapshot Dir"
      +}
    • addedInput schema / $defs / ToolOptions / properties / snapshot_id
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Snapshot identifier used by the restore action.",
      +  "title": "Snapshot Id"
      +}
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "title": "create_office_documentDictOutput",
      +  "type": "object"
      +}
  3. First observedv0.3.0

TDQS

A4.4/5.0
Behavior4/5

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

Reveals concrete behaviors: persists output, default temp file, PPT block stacking overwrites slides unless slide_index provided. This goes well beyond the annotations. Could mention whether it overwrites existing output_path files (destructiveHint=false but not stated) — that's the main gap.

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 moderately long but front-loaded with the core action ('Create a NEW Word, Excel, or PowerPoint file') and switches to the sibling tool early. The format-specific details (Excel vs PPT block properties) are useful but slightly dense; still, they are organized and valuable. Minor redundancy with the schema ('action' default, 'output_path' default) but not bloated.

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?

Covers most end-to-end context: when to use, what formats are supported, how blocks map to formats, output behavior, and the sibling tool for editing. Given 7 parameters and nested blocks, it could add a short example or note about template_data interplay, but it's already quite complete. The block types in description map well to schema fields (cell, formula, rows, style, template_data).

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?

Although schema coverage is 100% (7 parameters fully described), the description adds significant semantic value: it explains the relationship between blocks and formats (Excel-only properties like cell/formula, PPT-only like slide_index/transition), clarifies 'Writes to output_path (default: a temp file) and persists', and emphasizes that unlisted-block properties are typed. The schema defines the shape; the description explains usage semantics (stacking, default behavior, format applicability), which is exactly what an agent needs.

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 states a specific action ('Create a NEW Word, Excel, or PowerPoint file') with a clear verb ('create'), object ('office document'), and scope (docx/xlsx/pptx). It explicitly says 'To edit an existing file, use edit_office_document', which differentiates it from the editing sibling. The description also names the three supported formats and details per-format capabilities (Excel blocks with formulas/conditional formatting, PPT blocks with slides/transitions), so an agent can unambiguously tell what this tool produces and how it differs from edit_office_document.

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 clear context (create vs edit, format selection) and explicitly mentions the alternative tool. Missing explicit 'when NOT to use' exclusions beyond the edit case, but the guidance is sufficient.

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

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/Tianshang301/TianshangScribe'

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