IToolPropertyBuilder interface

Interface for the fluent API builder for creating MCP Tool properties This acts as a bridge between the implementation and type declarations

Extends

Omit<Arg, never>

Properties

description

A description of the property. This provides additional context about the purpose or usage of the property.

isArray

Indicates whether the property is an array type.

isRequired

Indicates whether the property is required.

propertyType

The type of the property.

Methods

asArray()

Mark the property as an array type

boolean()

Set the property type to boolean

datetime()

Set the property type to datetime

describe(string)

Set the description for the property

double()

Set the property type to double

integer()

Set the property type to integer

long()

Set the property type to long

number()

Set the property type to number

object()

Set the property type to object

optional()

Mark the property as optional

string()

Set the property type to string

Property Details

description

A description of the property. This provides additional context about the purpose or usage of the property.

description: string

Property Value

string

isArray

Indicates whether the property is an array type.

isArray: boolean

Property Value

boolean

isRequired

Indicates whether the property is required.

isRequired: boolean

Property Value

boolean

propertyType

The type of the property.

propertyType: string

Property Value

string

Method Details

asArray()

Mark the property as an array type

function asArray(): IToolPropertyBuilder

Returns

boolean()

Set the property type to boolean

function boolean(): IToolPropertyBuilder

Returns

datetime()

Set the property type to datetime

function datetime(): IToolPropertyBuilder

Returns

describe(string)

Set the description for the property

function describe(description: string): IToolPropertyBuilder

Parameters

description

string

Description of the property's purpose

Returns

double()

Set the property type to double

function double(): IToolPropertyBuilder

Returns

integer()

Set the property type to integer

function integer(): IToolPropertyBuilder

Returns

long()

Set the property type to long

function long(): IToolPropertyBuilder

Returns

number()

Set the property type to number

function number(): IToolPropertyBuilder

Returns

object()

Set the property type to object

function object(): IToolPropertyBuilder

Returns

optional()

Mark the property as optional

function optional(): IToolPropertyBuilder

Returns

string()

Set the property type to string

function string(): IToolPropertyBuilder

Returns