Skip to main content
Glama

refactor_javascript_code

refactor_javascript_code

Transform JavaScript code to modern syntax while maintaining readability for SAPUI5 and Fiori applications.

Instructions

Refactor JavaScript code using modern syntax while preserving readability.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
changesYes
refactoredCodeYes
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. It mentions the action ('refactor') and goals ('modern syntax', 'preserving readability') but lacks critical behavioral details: it doesn't specify if this is a read-only or mutating operation, what permissions are needed, how errors are handled, or any rate limits. For a code transformation tool with zero annotation coverage, this is a significant gap in transparency.

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, efficient sentence that front-loads the core action ('refactor JavaScript code') and adds qualifying goals without waste. Every word earns its place, making it easy to parse quickly.

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?

Given the tool's complexity (code refactoring), lack of annotations, and an output schema (which covers return values), the description is minimally adequate. It states what the tool does but misses key contextual details like behavioral traits, parameter explanations, and usage guidelines. The output schema mitigates some gaps, but overall completeness is limited.

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?

The input schema has 1 parameter with 0% description coverage, so the schema provides no semantic context. The description doesn't mention the 'code' parameter at all, failing to compensate for the schema gap. However, with only one parameter, the baseline is higher; the tool's purpose implies the parameter is JavaScript code to refactor, but this is inferred rather than explicitly stated.

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 verb ('refactor') and resource ('JavaScript code') with specific goals ('using modern syntax while preserving readability'). It distinguishes from siblings like 'lint_javascript_code' (which likely focuses on style/errors) and 'generate_javascript_function' (which creates new code). However, it doesn't explicitly differentiate from all siblings, such as 'validate_javascript_code' which might overlap in scope.

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?

No explicit guidance on when to use this tool versus alternatives like 'lint_javascript_code' or 'validate_javascript_code' is provided. The description implies usage for modernizing code but doesn't specify prerequisites, constraints, or exclusions. This leaves the agent to infer context from sibling names alone.

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/santiagosanmartinn/mcpui5server'

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