Skip to main content
Glama

block_code_mutate

Atomically replace a symbol's implementation in an architecture block, then run automated verification and roll back if tests fail.

Instructions

Atomically mutate a specific AST symbol's implementation bound to an architecture Block. Replaces only the targeted symbol body, runs automated verification with terminal log sanitization, and automatically rolls back if tests fail.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
symbolYes
blockIdYes
newCodeYes
projectRootNo
verifyCommandNo
includeStructuredNo

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior5/5

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

With no annotations provided, the description carries the full burden and does so well. It discloses atomicity, targeted replacement, automated verification, terminal log sanitization, and automatic rollback on test failure, giving the agent a clear behavioral model beyond 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?

A single, dense sentence front-loads the core purpose and then adds key behavioral qualifiers without waste. Every clause contributes meaningful information, making this appropriately concise and well-structured.

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

Completeness2/5

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

The high-level behavior is clear, but the tool has six parameters, no output schema, and no annotations, and the description omits parameter semantics, return behavior, and prerequisites. An agent would likely need additional context to invoke this correctly, especially for includeStructured and verifyCommand.

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

Parameters2/5

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

Schema description coverage is 0%, and the description does not explain most parameters. While blockId, symbol, and newCode are inferable from the prose, verifyCommand, includeStructured, and projectRoot lack meaningful explanation, leaving the agent to guess at their formatting and purpose.

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 identifies the specific action (atomically mutate), the resource (a specific AST symbol implementation bound to an architecture Block), and the scope (only the targeted symbol body). This distinguishes it well from sibling tools like graph_mutate or change_set_revert.

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 description implies usage: it is for mutating a specific symbol within a Block when automated verification and rollback are desired. However, it does not explicitly state when to prefer this over alternatives or when not to use it, leaving some inference to the agent.

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

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/yubinbin32-ops/Mdflow-Canvas'

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