Skip to main content
Glama

Format Text

format_text
Destructive

Apply character formatting (bold, italic, color, highlight) or change case (upper, lower, title, sentence) to specific text ranges or matched substrings in Word documents.

Instructions

Apply character formatting or change case. formatting: bold, italic, underline, strike, font, size_pt, color, highlight and more (a wrong key lists all). case: upper|lower|title|sentence. Target: range={start,end}, find or both; one of formatting or case per call. find formats just that SUBSTRING: the run splits at the matched offsets, each fragment keeping its other formatting. A range without find takes whole paragraphs, mark included. Auto-backup; atomic save. Formatting is live-capable; case is file mode only.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
caseNo
findNo
liveNoauto: file or live; force: live; off: refuseauto
rangeNo
backupNo
file_pathYes
formattingNo
occurrenceNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv2.2.1
    • addedInput schema / properties / live / description
      Added value: +"auto: file or live; force: live; off: refuse"
    • addedInput schema / properties / live / enum
      Added value: +[
      +  "auto",
      +  "force",
      +  "off"
      +]
  2. 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"
      +]
  3. Changed1 schema field changedv1.6.1
    • addedInput schema / properties / live
      Added value: +{
      +  "default": "auto",
      +  "type": "string"
      +}
  4. First observedv1.2.1

TDQS

A4.4/5.0
Behavior5/5

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

Goes well beyond the destructiveHint=true annotation by disclosing auto-backup, atomic save, substring run splitting with preservation of other formatting, whole-paragraph behavior including marks, and the live/file-mode restriction. These are exactly the side-effect and mutation details an agent needs. No contradiction with annotations.

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?

Dense and front-loaded; every clause adds operational information and there is no filler or repetition. The telegraphic style is justified by the number of constraints the description must convey.

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 destructive, 8-parameter tool with an output schema, it covers targeting, side effects, and live mode well. The missing piece is occurrence semantics, and the live values auto/force/off are only implied by 'live-capable' rather than spelled out. Still, most essential call decisions are supported.

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 only 13% schema coverage, the description compensates substantially: it enumerates formatting fields, case values, range/find targeting, and backup/live semantics. The main gap is the occurrence parameter, which interacts with find but is not explained.

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: 'Apply character formatting or change case', then enumerates the exact formatting keys and case modes. This clearly distinguishes the tool from sibling paragraph/style tools like set_paragraph_format and apply_style, even though those are not named.

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

Usage Guidelines3/5

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

Provides strong mode-selection constraints: one of formatting or case per call, range vs find targeting, and live vs file-mode capability. However, it never names sibling tools or states when to prefer this over set_paragraph_format, apply_style, or find_text; the agent has to infer the boundary from 'character formatting'.

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