Skip to main content
Glama

format_text

Apply character formatting or change case to selected text in Word documents using a range or search query. Supports bold, italic, color, highlight, small caps, and more, with automatic backup.

Instructions

Apply character formatting or change case on a text range. formatting: bold, italic, underline, strike, font, size_pt, color, highlight, small_caps, char_spacing_pt, language, east_asian_language, and more. case: upper | lower | title | sentence. Target: range={start,end}, find, or both; one of formatting or case per call. Auto-backup in file mode (backup=False skips rotation); atomic validated save. Formatting goes live on open documents (serialized); case is file-mode only. For batches, use apply_edits.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
caseNo
findNo
liveNoauto
rangeNo
backupNo
file_pathYes
formattingNo
occurrenceNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed11 schema fields changedv2.0.0
    • addedInput schema / properties / case
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null
      +}
    • removedInput schema / properties / formatting / additionalProperties
      Removed value: -true
    • addedInput schema / properties / formatting / anyOf
      Added value: +[
      +  {
      +    "additionalProperties": true,
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / formatting / default
      Added value: +null
    • removedInput schema / properties / formatting / type
      Removed value: -"object"
    • addedInput schema / properties / occurrence / anyOf
      Added value: +[
      +  {
      +    "type": "integer"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / properties / occurrence / default
      Previous value: -1New value: +null
    • removedInput schema / properties / occurrence / type
      Removed value: -"integer"
    • removedInput schema / properties / paragraph_index
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "type": "integer"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ],
      -  "default": null
      -}
    • addedInput schema / properties / range
      Added value: +{
      +  "anyOf": [
      +    {
      +      "additionalProperties": true,
      +      "type": "object"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null
      +}
    • changedInput schema / required
      Previous value: -[
      -  "file_path",
      -  "formatting"
      -]New value: +[
      +  "file_path"
      +]
  2. Changed1 schema field changedv1.6.1
    • addedInput schema / properties / live
      Added value: +{
      +  "default": "auto",
      +  "type": "string"
      +}
  3. First observedv1.2.1

TDQS

A4.1/5.0
Behavior4/5

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

The description discloses important side effects and behaviors: auto-backup behavior, atomic validated saves, live application to open documents, and file-mode-only casing. Since the only annotation is readOnlyHint=false, these extra details carry the behavioral transparency burden well, though it stops short of describing failure modes or permissions.

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 compact and information-dense, with no redundant wording. Every sentence adds useful guidance about targeting, constraints, side effects, or sibling-tool distinction.

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?

The description covers the main invocation scenarios and important save/live behaviors, but it is incomplete for a tool with eight parameters and no schema-level descriptions. Missing occurrence semantics and exact accepted values for formatting/case leave gaps, though the presence of an output schema reduces the need to describe return values.

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?

With 0% schema description coverage, the description must compensate for parameter meaning. It explains formatting, case, range, find, backup, and live mode, but it leaves occurrence completely unexplained and does not specify exact formatting keys or case value formats. The required file_path is also only implied, not described.

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 ('Apply character formatting or change case') and a specific resource ('on a text range'), making the tool's purpose immediately clear. It also distinguishes itself from the sibling batch tool by noting 'For batches, use apply_edits.'

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?

The description gives direct usage constraints: target can be range, find, or both; only one of formatting or case per call; and it explicitly redirects batch needs to apply_edits. It could say more about when to prefer format_text over other sibling formatting tools, but the core selection guidance is present.

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