Skip to main content
Glama

generate-code-stub

Create code stubs for functions, classes, or methods in various languages based on detailed descriptions and optional file context.

Instructions

Generates a code stub (function, class, etc.) in a specified language based on a description. Can optionally use content from a file (relative path) as context.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
classPropertiesNoFor classes: list of properties with names, optional types, and descriptions.
contextFilePathNoOptional relative path to a file whose content should be used as additional context.
descriptionYesDetailed description of what the stub should do, including its purpose, parameters, return values, or properties.
languageYesThe programming language for the stub (e.g., 'typescript', 'python', 'javascript')
methodsNoFor classes/interfaces: list of method signatures with names and descriptions.
nameYesThe name of the function, class, interface, etc.
parametersNoFor functions/methods: list of parameters with names, optional types, and descriptions.
returnTypeNoFor functions/methods: the expected return type string.
stubTypeYesThe type of code structure to generate (function, class, etc.)

Other Tools

Related 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/freshtechbro/vibe-coder-mcp'

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