Skip to main content
Glama
ZMC1011

Keil5 MCP Server

by ZMC1011

source_edit

Replace a line range in a source file with new content; the original is automatically backed up to .keil-mcp-backups/ for recovery.

Instructions

Edit a source file; original is automatically backed up to .keil-mcp-backups/.

Args: file: path to source file start_line / end_line: 1-based inclusive line range to replace new_content: replacement text (can be multi-line)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileYes
end_lineYes
start_lineYes
new_contentYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior3/5

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

The description discloses an important behavioral trait: the original file is automatically backed up to .keil-mcp-backups/. This provides useful safety context for a mutating operation. However, with no annotations present, it does not cover other behaviors such as whether the file must already exist, what happens with invalid line ranges, or what the tool returns.

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 compact and front-loaded with the core purpose and backup behavior, followed by a clear parameter list. Every sentence provides useful information with no filler or repetition.

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 simple four-parameter edit tool, the description covers purpose, backup safety, and parameter semantics adequately. It lacks explicit mention of return values, error cases, or prerequisites, but the tool is straightforward enough that these are not critical gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, but the description fully compensates by explaining every parameter: file path, 1-based inclusive line range for start and end lines, and multi-line replacement text. This adds essential meaning beyond the bare schema titles.

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 ('Edit a source file') and the target resource, making it obvious this tool modifies files rather than reading or searching them. It distinguishes itself from sibling tools like source_read and source_search by the verb and the implied write operation.

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

Usage Guidelines3/5

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

The usage is implied by the description: when a source file needs modification, this tool is appropriate. However, there is no explicit guidance about when not to use it, nor are alternatives such as source_read or source_search mentioned for comparison.

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