Skip to main content
Glama

replace_in_note

Find and replace text in a note body with options for regex, case sensitivity, whole-word matching, replacement limit, and dry-run mode to preview changes before writing.

Instructions

Find and replace text within a note body. Supports literal and regex search, case sensitivity, whole-word matching, and a replacement limit. Frontmatter is never touched. Use dryRun to preview matches before writing.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesVault-relative path to the note.
findYesText or pattern to find.
replaceYesReplacement text. Supports $1, $2, … backreferences in regex mode.
regexNoTreat find as a regular expression. Default false.
caseSensitiveNoCase-sensitive matching. Default false.
wholeWordNoMatch whole words only (\b boundary). Default false.
limitNoMaximum number of replacements. Omit to replace all.
dryRunNoIf true, report matches without writing. Default false.
Behavior4/5

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

With no annotations provided, the description carries full burden. It discloses supported features (literal/regex, case sensitivity, whole-word, limit, dryRun) and a critical safety note ('Frontmatter is never touched'). Missing details on return value or error handling, but overall transparent.

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 only two sentences, both front-loaded with key information: purpose, features, and a usage tip. No redundant words; every sentence adds value.

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?

Given 8 parameters and no output schema, the description covers purpose, features, and one safety aspect (frontmatter). It lacks details on return values or prerequisites, but for a straightforward find-and-replace tool, it is fairly complete.

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 baseline is 3. The description adds a summary of features (e.g., 'backreferences' hint in replace) but does not significantly enhance understanding beyond the schema's existing parameter descriptions.

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 'Find and replace text within a note body,' which is specific and actionable. It distinguishes itself from siblings like patch_note by noting 'Frontmatter is never touched,' ensuring the agent knows this tool is for body-only text replacement.

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 provides a clear tip to 'Use dryRun to preview matches before writing,' guiding safe usage. However, it does not explicitly specify when to avoid this tool (e.g., for frontmatter changes) or name direct siblings, leaving some ambiguity.

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/shaqmughal/seekstone'

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