Skip to main content
Glama

find_replace_text

Destructive

Find and replace text strings or regex patterns across all text layers in a Figma page or subtree. Specify a root node to scope the search, or leave blank to search the entire page.

Instructions

Find and replace text content across all TEXT nodes in a subtree. Searches the entire current page if no nodeId is given.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
findYesText string (or regex pattern when useRegex=true) to search for
nodeIdNoRoot node ID to scope the search. Defaults to the entire current page.
replaceYesReplacement string (use empty string to delete matches)
useRegexNoTreat find as a regular expression (default false)
regexFlagsNoRegex flags e.g. 'gi' (default 'g'). Only used when useRegex=true.
Behavior4/5

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

Annotations already mark destructiveHint=true and openWorldHint=true. The description adds value by explaining that an empty replace string deletes matches and that searching scopes to a subtree or entire page. 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?

Two sentences, front-loaded with the core action. Every sentence adds value: first sentence states the main operation, second clarifies scope and default behavior. No fluff.

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 5-parameter tool with no output schema, the description covers the essential scope behavior and delete capability. It is complete enough for an agent to understand when and how to invoke it. Could mention return value but not necessary.

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 the schema already documents each parameter's purpose. The description does not add new parameter-level information beyond what the schema provides, so baseline 3 is appropriate.

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 it finds and replaces text across all text nodes in a subtree, with fallback to entire page if no nodeId. This is a specific verb+resource+scope that distinguishes it from siblings like set_text (single node) or batch_rename_nodes (node renaming).

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?

It mentions when to use nodeId to scope search and implies use of regex flags, but does not explicitly state when not to use this tool or suggest alternatives for single-node changes. Still, the context is clear enough for an agent.

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

Install Server

Other Tools

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/vkhanhqui/figma-mcp-go'

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