Skip to main content
Glama

replace_in_note

Replace text or regex patterns inside a note body with options for case sensitivity, whole-word matching, and dry-run preview. Never touches frontmatter and supports guarded writes.

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
findYesText or pattern to find.
pathYesVault-relative path to the note.
limitNoMaximum number of replacements. Omit to replace all.
regexNoTreat find as a regular expression. Default false.
dryRunNoIf true, report matches without writing. Default false.
replaceYesReplacement text. Supports $1, $2, … backreferences in regex mode.
prevHashNoOptional compare-and-swap guard: the contentHash from a prior read. Fails with hash_conflict if the note changed since.
wholeWordNoMatch whole words only (\b boundary). Default false.
caseSensitiveNoCase-sensitive matching. Default false.
Behavior3/5

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

No annotations are provided, so the description carries the burden of behavioral disclosure. It does disclose the dryRun capability, the replacement-limit behavior, and the frontmatter exclusion. Missing is the return format (does it report match counts?), how dryRun reports matches, and any write-conflict behavior beyond prevHash, though prevHash is documented at the schema level. The description adds some value but doesn't fully characterize mutation behavior or outputs.

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 three sentences, front-loaded with the core purpose, then the key features, then the important usage guidance (dryRun). Every sentence earns its place with no filler or redundancy.

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?

For a 9-parameter mutation tool with no output schema and no annotations, the description is reasonably complete but leaves the return/result details unaddressed. It doesn't describe what dryRun reports (match count? locations?), what errors look like beyond hash_conflict, or clarify regex backreference behavior beyond schema. The prevHash compare-and-swap is documented but not explicitly tied to concurrency scenarios in the description. Adequate but could do more for a tool this complex.

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 all 9 parameters are individually documented at the schema level. The description adds the frontmatter-exclusion note and the dryRun preview concept, but doesn't add meaning beyond the schema for parameters like regex, wholeWord, or caseSensitive (which are already well-documented). With full schema coverage, the 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 the action ('Find and replace text within a note body'), the resource (a note body), and enumerates the supported options (literal/regex, case sensitivity, whole-word, replacement limit). It distinguishes itself from sibling tools by clarifying it operates on a note's body and that frontmatter is never touched, differentiating it from patch_frontmatter and patch_note.

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 clarifies the key scoping guardrail ('Frontmatter is never touched') and explicitly mentions dryRun as a preview mechanism, providing contextual usage guidance. However, it doesn't explicitly name alternatives or state when NOT to use it versus siblings like patch_note, though the scoping and dryRun mention give reasonable context.

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