McpPromptArgumentBuilder class
Fluent builder for declaring MCP prompt arguments in a record-shaped
promptArguments map. The key of the map supplies the argument name.
By default arguments are optional; call .isRequired() to mark them required.
Example
promptArguments: {
function_name: promptArg.describe('The function to document.').isRequired(),
style: promptArg.describe("Documentation style (e.g., 'concise', 'verbose')."),
}
Methods
| describe(string) | Set the argument's description. |
| is |
Mark the argument as required. Default is optional. |
Method Details
describe(string)
Set the argument's description.
function describe(description: string): this
Parameters
- description
-
string
Returns
this
isRequired()
Mark the argument as required. Default is optional.
function isRequired(): this
Returns
this