McpPromptArgumentBuilder class

Płynny kreator do deklarowania argumentów promptu MCP na mapie w kształcie promptArguments rekordu. Klucz mapy podaje nazwę argumentu.

Domyślnie argumenty są opcjonalne; wywołanie .isRequired() , aby oznaczyć je jako obowiązkowe.

Przykład

promptArguments: {
    function_name: promptArg.describe('The function to document.').isRequired(),
    style: promptArg.describe("Documentation style (e.g., 'concise', 'verbose')."),
}

Metody

describe(string)

Ustaw opis argumentu.

isRequired()

Zaznacz argument według potrzeb. Domyślna opcja jest opcjonalna.

Szczegóły metody

describe(string)

Ustaw opis argumentu.

function describe(description: string): this

Parametry

description

string

Zwraca

this

isRequired()

Zaznacz argument według potrzeb. Domyślna opcja jest opcjonalna.

function isRequired(): this

Zwraca

this