Skip to main content
Glama
TXAVLOG
by TXAVLOG

edit_code

Replace exact code snippets to modify functions or blocks, avoiding full-file overwrites.

Instructions

QUICK EDIT: Replace a specific code snippet with a new one. AI should use this tool to modify functions or code blocks without overwriting the entire file.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
newCodeYesNew code to replace with
oldCodeYesOld code to replace (must match exactly)
filePathYesFile path
allow_external_accessNoSet to true to allow modifying files outside the project root. User must explicitly approve this action.
Behavior2/5

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

With no annotations, the description carries the full burden of behavioral disclosure. It mentions the 'without overwriting entire file' trait, but does not explain what happens if oldCode is not found, whether all occurrences are replaced, or any side effects. This is a mutation tool, and those missing details are significant. The description also does not mention the allow_external_access authorization requirement, which is left entirely to the schema.

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 a single sentence with a direct instruction, front-loading the core action. It has no filler and every word earns its place, making it an example of efficient conciseness.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool is simple and the schema is rich, but there is no output schema and the description does not explain return values, error handling, or the special authorization for external access. These gaps matter because the tool is a mutation with no annotations, yet the schema covers some missing details, so an above-minimal but clearly incomplete score of 3 fits.

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 input schema covers all four parameters with descriptions (coverage 100%), so the baseline is 3. The description adds no parameter-specific meaning beyond the schema, so it neither improves nor detracts from the schema's explanation.

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 tool replaces a specific code snippet with a new one, using the verb 'replace' and resource 'code snippet'. It also distinguishes itself from whole-file tools by noting it does not overwrite the entire file, making its purpose unambiguous even among sibling file-editing tools.

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 provides clear usage context by instructing the AI to use this tool for modifying functions or code blocks without overwriting the whole file, which implies when it should be used. However, it does not explicitly exclude alternatives or mention when not to use it, so it falls short of a 5.

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/TXAVLOG/txamcp'

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