Skip to main content
Glama

timps_refactoring_agent

Detect code smells and generate a fully refactored version with a diff summary, complexity scores, and an improvement list to reduce complexity and extract functions.

Instructions

Detect code smells and produce a fully refactored version with a diff summary, complexity scores, and improvement list.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesSource code to refactor
goalsNoRefactoring goals e.g. ['reduce_complexity', 'extract_functions']
languageNoProgramming languagepython
Behavior3/5

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

With no annotations, the description carries the full burden. It discloses the outputs (diff summary, complexity scores, improvement list) and implies a non-mutating 'produce a version' rather than directly modifying files, but it doesn't explicitly state whether the tool modifies files or requires any permissions. The return behavior is partially clarified but side effects are ambiguous.

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, information-dense sentence that lists core actions and outputs with no filler. Every clause adds value, making it both concise and front-loaded.

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 tool with 3 params and no output schema, it describes key outputs but lacks guidance on parameter combinations, language support specifics, or tool limitations. The core inputs and expected output artifacts are present, but it feels incomplete for an agent to decide whether this is the right refactoring tool and how to structure goals effectively.

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 coverage is 100%, with each parameter having a description (code, goals, language). The description itself adds no extra parameter detail but the example for goals ('reduce_complexity', 'extract_functions') is in the schema. This meets the baseline but provides no additional semantics beyond schema.

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's action (detect code smells and produce a refactored version) and its specific deliverables (diff summary, complexity scores, improvement list). It distinguishes itself from sibling tools like timps_pr_reviewer or timps_unit_test_writer by focusing on refactoring rather than review or test generation.

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 use for code refactoring via 'detect code smells and produce a fully refactored version', but it doesn't explicitly state when to use this tool versus alternatives or provide exclusions. There is no guidance on when not to use it, such as for simple formatting or full-scale code review.

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/Sandeeprdy1729/timps-swarm'

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