I tried to make my first steps with AI Components in Combination with C++ Builider. Specifically MCP-Servers are interesting for us.
I can't make it to work. So maybe you can help me.
I tried to build the Weather-Example. Is the Builder Pattern working with C++ Builder? I didn't managed to make it work. So i tried the traditinal way. With this it works better, but i am struggling to add a Method for my tool.
Here's the Code:
void __fastcall TForm6::btnStartenClick(TObject *Sender)
{
	this->TMSMCPServer->Start();
	TTMSMCPTool *pTool = this->TMSMCPServer->Tools->Add();
	pTool->Name = L"WeatherRequest";
	pTool->Description = L"Gets the Weather for a specific City";
	pTool->ReturnType = ptString;
	pTool->Method = this->GetWeather;
	TTMSMCPToolProperty *pProperty = pTool->Properties->Add();
	pProperty->Name = L"City";
	pProperty->Description = L"Specifies the City for which to get the Weather";
	pProperty->Type = ptString;
	pProperty->Required = true;
	this->Memo->Lines->Add(L"Server started");
}
//---------------------------------------------------------------------------
TValue __fastcall TForm6::GetWeather(const DynamicArray<TValue> &args)
{
	return TValue::From<String>(L"Sunny");
}
//---------------------------------------------------------------------------
Can you point me in the right direction?
An additional Question: Attributes for MCP-Server as in Delphi - are these going to work in C++ Builder? These would be very conveniant for us.
Thank you!