Skip to main content
Glama

BCD — Bridge Control Delegate

edit_block

Destructive

Edit a file in place: replaces old_string with new_string, which must occur exactly expected_replacements times (default 1); include nearby lines to make it unique. Spreadsheets: range (e.g. Sheet1!A1:C3) and a 2D content array. DOCX: exact XML (for text across formatting use edit_docx). On a mismatch nothing changes and the closest match is shown.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
rangeNo
contentNo
deviceIdNoComputer name or id from list_devices. Optional with one computer online or a default set.
file_pathYes
new_stringNo
old_stringNo
workSessionIdNoWork session from create_work_session. Pass the same ID on every call in this conversation; omit for legacy unscoped work.
expected_replacementsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / workSessionId
      Added value: +{
      +  "description": "Work session from create_work_session. Pass the same ID on every call in this conversation; omit for legacy unscoped work.",
      +  "format": "uuid",
      +  "type": "string"
      +}
  2. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already establish destructive=true and readOnly=false, but the description adds genuinely new behavior: the operation is atomic on mismatch ('nothing changes') and returns the closest match as feedback. Permission/session requirements for deviceId and workSessionId are left to the schema rather than the 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?

The core replace semantics come first, then format-specific variants, then the failure behavior. Every clause is load-bearing with no filler.

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 an 8-parameter mutation tool with no output schema, the description covers the fallback behavior, format branches, and matching rules. Remaining gaps (device/work session scoping) are handled by schema descriptions, so an agent has enough to invoke it correctly.

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 only 25% (two of eight params documented), so the description has to carry the load and largely does: it explains old_string/new_string semantics, the expected_replacements default of 1 and the uniqueness requirement, plus range and content formats. Only file_path and the session/device params are not elaborated here.

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?

Names a specific verb and resource ('Edit a file in place') and states the exact mechanism ('replaces old_string with new_string ... exactly expected_replacements times'). It also carves out sibling territory by naming edit_docx for the cross-formatting case.

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?

Gives concrete conditions for the spreadsheet case (range plus a 2D content array) and the DOCX case, and routes the cross-formatting scenario to edit_docx. It does not clarify how this differs from edit_spreadsheet, which remains a live alternative for the range/content path.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources