Skip to main content
Glama

Edit DAT content (surgical)

edit_dat_content
Destructive

Replace a specific substring in a Text or Table DAT's text. Requires exactly one match by default, or set replace_all to change every occurrence.

Instructions

Surgically replace a substring inside a Text or Table DAT's .text. Without replace_all, requires exactly one match — 0 or >1 occurrences is an error, forcing the caller to add context or set replace_all. Use set_dat_content to overwrite an entire DAT's text in place; use this to make a targeted edit.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dat_pathYesAbsolute path to the Text or Table DAT to edit (e.g. '/project1/mytext1').
new_stringYesReplacement text. May be empty to delete the matched substring.
old_stringYesExact substring to find. Must match at least once. Empty strings are rejected.
replace_allNoWhen false (default), requires exactly one match — 0 or >1 occurrences is an error. Set true to replace every occurrence.
Behavior4/5

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

Annotations already declare readOnlyHint=false and destructiveHint=true, so the mutation nature is known. The description adds valuable behavioral context: the error condition when 0 or >1 matches occur without `replace_all`, and the requirement to add context. This goes beyond annotations but doesn't mention potential side effects on Table DAT structure or whether the edit triggers a cook, so it's not a 5.

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 deliver a clear purpose, error semantics, and an alternative tool without any filler. The main verb and target appear up front, and every clause earns its place. This is a model of concise, high-signal description.

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 mutation tool with no output schema, the description covers the target, the matching rules, the `replace_all` switch, and the alternative tool. It's missing details about what happens on error (beyond saying it's an error) and the return value, but the core selection and invocation guidance is complete for the agent's needs.

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?

Schema coverage is 100%, so the baseline is 3. The description adds meaning to `replace_all` by explaining the exact-match error behavior and that setting it true replaces every occurrence. This is a genuine semantic addition beyond the schema's 'Replace every occurrence' intent, pushing the score above 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?

The description uses a specific verb+resource construct: 'Surgically replace a substring inside a Text or Table DAT's `.text`.' This precisely defines the operation and scope. It also distinguishes from the sibling set_dat_content by explicitly contrasting targeted replacement with full overwrite, making the tool's purpose unambiguous.

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

Usage Guidelines5/5

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

The description provides explicit guidance: use this tool for targeted edits, and use set_dat_content to overwrite an entire DAT's text. It also explains the critical `replace_all` behavior and the exact-match requirement, giving the caller clear usage context and an alternative tool for the other use case.

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/lucasmaher-hash/touch-designer-mcp'

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