Skip to main content
Glama

generate_javascript_function

generate_javascript_function

Generate ES2022 JavaScript or TypeScript functions with JSDoc for browser or Node runtime to accelerate SAPUI5 and Fiori development.

Instructions

Generate an ES2022 JavaScript or TypeScript function with JSDoc for browser or Node runtime.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
descriptionYes
runtimeYes
typescriptNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYes
runtimeYes
typescriptYes
functionNameYes
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It mentions ES2022 standard and JSDoc inclusion, which are useful behavioral details. However, it doesn't address critical aspects like: whether this creates new files or returns code strings, what permissions are needed, error handling behavior, or any rate limits. For a code generation tool with zero annotation coverage, this leaves significant gaps.

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 extremely concise - a single sentence that efficiently communicates the core functionality. Every word earns its place: 'Generate' (action), 'ES2022 JavaScript or TypeScript function' (what), 'with JSDoc' (additional feature), 'for browser or Node runtime' (context). There's no wasted verbiage or redundancy.

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 has an output schema (which presumably documents the return format), the description doesn't need to explain return values. However, for a code generation tool with 3 parameters and no annotations, the description is somewhat minimal. It covers the basic purpose and runtime context but lacks information about behavioral constraints, error conditions, or detailed parameter guidance that would make it more complete.

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 0%, so the schema provides no parameter documentation. The description doesn't mention any of the three parameters (description, runtime, typescript) explicitly. However, it implies the 'runtime' parameter by mentioning 'browser or Node runtime' and hints at 'typescript' by including TypeScript in the scope. This provides some semantic context but doesn't fully compensate for the complete lack of parameter documentation in the schema.

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 purpose: generating JavaScript/TypeScript functions with JSDoc for specific runtimes. It specifies the verb 'generate' and resource 'function', and distinguishes from siblings like 'refactor_javascript_code' or 'lint_javascript_code' by focusing on creation rather than modification or analysis. However, it doesn't explicitly differentiate from other generate_* tools like 'generate_ui5_controller', leaving some ambiguity.

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?

The description provides minimal usage guidance. It mentions 'browser or Node runtime' which gives some context, but offers no explicit guidance on when to use this tool versus alternatives like 'refactor_javascript_code' for modifying existing code or 'generate_ui5_controller' for UI5-specific generation. There are no when-not-to-use statements or prerequisite information.

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