McpPromptArgumentBuilder class
用于在记录形状 promptArguments 地图中声明 MCP 提示参数的流畅构建器。 映射键提供参数名称。
默认情况下,参数为 可选;调用 .isRequired() 以标记为必需。
示例
promptArguments: {
function_name: promptArg.describe('The function to document.').isRequired(),
style: promptArg.describe("Documentation style (e.g., 'concise', 'verbose')."),
}
方法
| describe(string) | 设置参数的描述。 |
| is |
将该参数标记为必需。 默认为可选。 |
方法详细信息
describe(string)
设置参数的描述。
function describe(description: string): this
参数
- description
-
string
返回
this
isRequired()
将该参数标记为必需。 默认为可选。
function isRequired(): this
返回
this