Skip to main content
Glama

hpc_edit_file

Replace an exact string in a file in a writable HPC cluster path. Fails if the old string is not unique unless replace_all is true.

Instructions

Replace an exact string in a file in a writable location. Fails if old_string is not unique unless replace_all=true.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesAbsolute path on the cluster
new_stringYes
old_stringYes
replace_allNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, destructiveHint=false and openWorldHint=false, so the safety profile is covered. The description adds genuinely useful behavior the annotations do not: the operation is an exact-string match, it fails when old_string is ambiguous, and it requires a writable path.

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 short sentences, zero filler. The core action is front-loaded and the failure condition follows immediately, which is exactly the ordering an agent needs.

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?

With no output schema and only hint-level annotations, the description covers the essential contract: exact-match edit, uniqueness failure, writable-path requirement. It omits secondary behavior such as whether a missing file is created and whether the edit is atomic, which are minor for a straightforward string-replacement tool.

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% (only path is documented), so the description must carry weight. It explains old_string as an exact match target, the uniqueness precondition, and the replace_all escape hatch, which is real added meaning. new_string's semantics remain unstated, though its meaning is largely self-evident.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource: 'Replace an exact string in a file in a writable location.' An agent can distinguish this from a whole-file write. It does not name or contrast any sibling (e.g. hpc_write_file), so it stops short of full sibling differentiation.

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?

Usage is implied by the uniqueness rule and the 'writable location' constraint, which guides whether the tool will succeed. There is no explicit statement of when to prefer this over hpc_write_file or a create-if-missing alternative.

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