Skip to main content
Glama

hac_self_improve

Update the MCP's own Python modules safely: back up code, run syntax and regression tests, and roll back automatically if tests fail.

Instructions

Self-evolves the MCP by updating one of its own Python modules. Automatically creates a backup, runs syntax checks and full regression test suite. Rolls back immediately if tests fail.

Args: target_file: Relative filename within MCP directory (e.g. 'site_scaffolder.py', 'b2b_org_helper.py') description: Summary of the improvement, fix, or capability being added updated_code: Complete updated Python code for the target module

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
descriptionYes
target_fileYes
updated_codeYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.0.0

TDQS

A4.4/5.0
Behavior5/5

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

With no annotations present, the description carries the full burden and does so well: it discloses the automatic backup, syntax checks, full regression test suite, and immediate rollback on test failure. For a high-risk self-mutation tool this is exactly the safety context an agent needs to trust and invoke it correctly.

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?

Front-loaded with purpose, then behavioral guarantees, then parameter docs. No redundant or filler sentences; each line adds information 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?

Given the high-risk mutation nature, 0% schema coverage, and the existence of an output schema (so return values need not be explained), the description is largely complete. It covers purpose, safety behavior, and all parameters, though it omits any note on permissions or whether a restart is needed for changes to take effect.

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 description coverage is 0%, so the description must compensate, and it does via an Args section documenting all three parameters. It clarifies that target_file is a relative filename (with concrete examples) and that updated_code must be the 'complete updated Python code' rather than a diff, adding meaning the bare schema lacks.

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?

States a specific verb and resource: 'updating one of its own Python modules' to 'self-evolve the MCP.' This clearly distinguishes it from the sibling hac_self_diagnose (which inspects rather than modifies) without the agent needing to open either schema.

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 use case is implied by the description (updating a module to add fixes or capabilities), but there is no explicit when-to-use guidance, no when-not-to-use conditions, and no routing to alternatives such as hac_self_diagnose. Usage is inferable but not stated.

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