Skip to main content
Glama

coeus_refactor_code

Refactor source code by generating or suggesting improvements tailored to your goal, language, and refactor type.

Instructions

Suggest or generate refactors for supplied source code

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesCode
goalNoGoal
modelNoModel
languageNoLanguage
output_formatNoOutput format
refactor_typeNoRefactor type

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It does not state whether the tool returns suggestions, rewrites code, writes files, requires specific permissions, or otherwise behaves beyond 'suggest or generate refactors.'

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

Conciseness4/5

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

The description is a single concise sentence that front-loads the core action and resource. It contains no filler, though it is terse enough that some important contextual information is absent.

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?

With six parameters, no output schema, no annotations, and many sibling tools, this description is too thin for reliable invocation. An agent would not know what values to supply for goal, language, output_format, or refactor_type, nor what the tool returns.

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 baseline is 3 even though the parameter descriptions are tautological ('Code', 'Goal', 'Model'). The tool description adds almost no meaning to the parameters and does not clarify valid values for goal, model, language, output_format, or refactor_type.

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 states a clear action ('Suggest or generate refactors') and a specific resource ('supplied source code'), which makes the tool's core function understandable. It is distinct enough from siblings like coeus_review_code or coeus_explain_code because it centers on refactoring, though it does not explicitly call out those differences.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no guidance on when to use this tool versus alternatives. The description never mentions when refactoring is preferred over reviewing, explaining, or analyzing code, and it provides no exclusions or preconditions.

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