Skip to main content
Glama

sed_add

Add sed expressions to a batch queue for a file on an OpenWrt router. Edits accumulate until execution, enabling complex multi-edit operations to be built and applied efficiently.

Instructions

Add one or more sed expressions to the batch queue for a file. Expressions are NOT executed immediately — they accumulate until sed_execute is called. This allows building up complex multi-edit operations efficiently.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesAbsolute path to the target file on the router
expressionsYesArray of sed expressions to queue. Examples: 's/old/new/g' (substitute), '5d' (delete line 5), '3i\\new line' (insert before line 3), '$a\\appended line' (append at end), '10,20s/foo/bar/' (substitute in line range)
Behavior4/5

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

The description discloses the critical behavioral trait of deferred execution and accumulation, which is not in the schema or annotations. However, it could further explain queue lifecycle (e.g., per-file scope, append behavior) and error handling, but it goes beyond a minimal description.

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 with no redundancy; the first sentence states the action, the second clarifies key behavior. Highly efficient and front-loaded.

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?

The description covers the essential purpose and deferred-execution behavior. It doesn't fully specify queue lifecycle, but the sibling tools (sed_execute, sed_clear) imply the rest. Adequate for a simple tool with full parameter schema.

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?

The schema already provides full parameter descriptions for path and expressions, including examples. The description adds only the context that expressions are enqueued, not immediate, which doesn't materially enhance parameter understanding.

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 explicitly states the tool's action: 'Add one or more sed expressions to the batch queue for a file.' This clearly distinguishes it from siblings like sed_execute, sed_preview, and sed_clear by emphasizing the queueing behavior.

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 says expressions are 'NOT executed immediately — they accumulate until sed_execute is called,' which clearly indicates when to use this tool: when building up multiple edits before execution. It doesn't name alternatives explicitly but implies the workflow.

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/haode01/openwrt-mcp-server'

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