Skip to main content
Glama

list_refactorings

Read-onlyIdempotent

List available refactorings from all backends, filtering by language or category, to view their parameter contracts.

Instructions

List available refactorings with their parameter contracts.

Returns the catalog of available refactorings from all enabled backends, optionally filtered by language and/or category.

Args: language: Filter by language (e.g., 'python'). If not specified, returns all. category: Filter by Fowler category (e.g., 'composing_methods')

Returns: TOON-formatted string containing refactoring specifications.

Categories: - composing_methods: Extract/inline methods, variables - moving_features: Move methods/fields between classes - organizing_data: Encapsulation, type codes - simplifying_conditionals: Guard clauses, polymorphism - simplifying_method_calls: Rename, add/remove parameters - dealing_with_generalization: Pull up/push down, inheritance

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
languageNo
categoryNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

Annotations already mark the tool as readOnlyHint=true and idempotent. The description adds that it returns a TOON-formatted string and lists categories, providing beyond-annotation context. No contradictions.

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 well-structured with a clear purpose sentence followed by Args, Returns, and Categories sections. Every sentence adds value, and it is appropriately sized for the information conveyed.

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

Completeness5/5

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

With an output schema present, the description adequately covers the return format (TOON string) and filtering details. Given the tool's simplicity and existing annotations, it is fully complete.

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

Parameters5/5

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

Schema coverage is 0% with no descriptions in the schema. The description compensates fully by explaining each parameter's purpose, expected values, and defaults, and listing valid category values.

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 starts with 'List available refactorings with their parameter contracts,' clearly stating the tool's action (list) and resource (refactorings). It includes optional filters and categories, distinguishing it from siblings like apply_refactoring or preview_refactoring.

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

Usage Guidelines4/5

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

The description explains optional filters (language, category) and provides a list of valid categories, guiding when to use this tool for exploration. It does not explicitly state when not to use or compare to siblings, but the context is clear.

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/marshally/mcp-refactoring'

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