Skip to main content
Glama
CHRONOS-AGENT

CHRONOS-AGENT

chronos_edit_symbol

Edit a symbol's body or insert code before/after it with AST-bounded changes, preserving formatting and blocking breaking signature edits unless forced.

Instructions

Perform surgical AST-bounded edits (replace_body, insert_before, insert_after) against a fresh disk parse with leading trivia deduplication, indentation/CRLF/BOM preservation, and a 2-stage Tree-sitter syntax + contract blast-radius gate (blocked_requires_force on breaking signature changes with callers unless force=true).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "symbol": "<symbol>",
      "file": "<file>",
      "operation": "<operation>",
      "new_code": "<new_code>"
    },
    "name": "chronos_edit_symbol"
  }
}

Input Schema

NameRequiredDescriptionDefault
fileYesRelative or absolute path within workspace to the target source file
forceNoOverride Stage 2 contract blast-radius block when changing a signature with callers (default: false)
symbolYesTarget symbol name or 'Class/method' path to edit (resolved via fresh disk AST parse)
dry_runNoValidate syntax and contract impact without modifying disk (default: false)
new_codeYesReplacement or inserted code block (indentation and CRLF/LF + BOM are auto-preserved)
operationYesEdit operation: replace_body | insert_before | insert_afterreplace_body
max_answer_charsNoOptional maximum character budget for the response (default: 24000; <= 0 disables truncation)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior4/5

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

With no annotations supplied, the description carries the full behavioral burden and does so well: it discloses that the parse is taken fresh from disk, that leading trivia are deduplicated, that indentation/CRLF/BOM are preserved, and that a two-stage Tree-sitter syntax plus contract blast-radius gate can block with 'blocked_requires_force' unless force is set. Gaps remain around failure semantics (is the block a raised error or a returned status?) and whether a partially applied edit can occur.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

It is a single sentence with no filler, and the core purpose is front-loaded. But the structure is poor: deeply nested parentheticals and stacked jargon ('2-stage Tree-sitter syntax + contract blast-radius gate') make it hard to parse on one read, and unrelated guarantees are packed into the same clause chain.

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?

For a seven-parameter mutation tool with no annotations and no output schema, the description covers mutation behavior and preservation guarantees thoroughly. It is incomplete on the result side: it introduces a 'blocked_requires_force' terminal state without saying how it is surfaced, and gives no indication of what a successful response contains, which matters precisely because there is no output 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?

Schema description coverage is 100%, so the schema already documents all seven parameters including the operation enum and the force/dry_run defaults. The description adds only modestly, mainly restating the force override mechanism and confirming preservation guarantees for new_code; it adds no new syntax, format, or constraint detail beyond the schema.

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?

The description names a specific verb ('edits') and resource ('AST-bounded symbol edits') and enumerates the three operations (replace_body, insert_before, insert_after), so the agent knows what the tool does. It never differentiates itself from the closely-named sibling chronos_refactor_symbol, which is the one ambiguity an agent would most likely face.

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 rather than stated: 'surgical AST-bounded edits' suggests small in-place modifications as opposed to broader refactoring, and the gate sentence effectively declares a precondition (signature changes with callers are blocked unless force=true). However there is no explicit when-to-use/when-not guidance and no named alternative for tasks that exceed a surgical edit.

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