Skip to main content
Glama
Akshay1018

CodeDoc MCP Server

by Akshay1018

refactor_and_optimize

Refactor and optimize code by locating files via case-insensitive, deep path discovery, then applying improvements to the specified file.

Instructions

Refactors and optimizes code. Handles case-insensitivity and deep path discovery.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYes
custom_rulesNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior2/5

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

With no annotations, the description carries the full burden of behavioral disclosure. It adds the detail about handling case-insensitivity and deep path discovery, but fails to disclose side effects, mutability, permission requirements, or any risks associated with refactoring. As a refactor tool, the potential for modifying code is not explicitly stated.

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 very short and front-loaded with the main action. However, the second sentence 'Handles case-insensitivity and deep path discovery.' is vague and may not add clear value. It is still concise and appropriately sized for a tool with minimal parameters.

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 tool has two parameters, an output schema, and no annotations. The description is far too minimal to provide complete context for an agent to select and invoke it correctly. It lacks information about when to use it, what inputs are expected, and what side effects or outputs to anticipate. The presence of an output schema reduces the need to explain return values, but all other contextual aspects remain under-specified.

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

Parameters1/5

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

The schema has 0% description coverage, and the description mentions no parameter names or meanings. It does not explain what 'file_path' should point to or what 'custom_rules' does. The description's mention of 'case-insensitivity and deep path discovery' is tangential and could relate to file_path handling, but it is not explicit enough to compensate for the missing schema descriptions.

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 clearly states the tool's primary function: 'Refactors and optimizes code.' This is a specific verb+resource pairing. However, it does not differentiate from the sibling tool 'evaluate_and_refactor', which likely has similar functionality, so it lacks sibling distinction.

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 like 'evaluate_and_refactor'. The description mentions 'case-insensitivity and deep path discovery' but does not explain the context or prerequisites for use. No exclusions or alternative recommendations are provided.

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/Akshay1018/mcp-codedoc'

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