Skip to main content
Glama
U-C4N
by U-C4N

Find and Replace Text

text_find_replace

Find and replace literal text in AutoCAD TEXT, MTEXT, and block attributes, including definitions, with optional case matching and dry-run preview.

Instructions

Replace text in TEXT, MTEXT and block attributes (ATTRIB and ATTDEF).

searched_types is on the response because "no matches" and "that type was never searched" are different answers. Block definitions are included, so the next insert does not reintroduce the old text. DIMENSION text is out of scope: its text field holds the <> override placeholder rather than the measurement, so editing it would break the association. A multi-line attribute is matched and rewritten as the whole value (Line1\PLine2), the same value block_get_attributes reports and block_explode bursts.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
findYesLiteral text to search for (not a regex).
layerNoRestrict to one layer. Empty searches every layer.
dry_runNoReport what would change without changing it.
replaceYesReplacement text.
match_caseNoCase-sensitive search.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.5.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=false annotation: it discloses the side effect that block *definitions* are rewritten (so re-inserts don't resurrect old text), that searched_types is returned to disambiguate 'no matches' from 'type never searched', and how multi-line attribute values are represented and rewritten. These are non-obvious behavioral traits an agent needs.

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?

Front-loads the affected entity types, then justifies each constraint (searched_types, block definitions, DIMENSION exclusion, multi-line attrs) without padding. Slightly dense and reliant on backticked identifiers, but every sentence carries information.

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 an output schema, this covers what an agent needs: scope, exclusions with rationale, side effects on block definitions, and edge-case handling for multi-line attributes. Nothing material is left inferred.

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?

Schema description coverage is 100%, so find/replace/layer/dry_run/match_case are already documented, and the description adds no parameter-level syntax or defaults. Its mention of searched_types relates to the response, not an input parameter, so it earns only the baseline.

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+resource (replace text) and immediately bounds the resource set: TEXT, MTEXT, ATTRIB and ATTDEF. It also carves out what is NOT in scope (DIMENSION text) with a concrete reason, so an agent can distinguish this from a generic text editor without opening the schema.

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 a clear when-to-use context (bulk/global text replacement across text entities and block attributes) plus an explicit exclusion for DIMENSION text. It does not name a sibling alternative such as entity_edit_text for single-entity edits, so it stops short of full when-not routing.

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

Deploy Server

Other Tools