LinkToolAddin/client/tool/ArcGisPro.cs

21 lines
641 B
C#

using System.Collections.Generic;
using System.ComponentModel;
using System.Threading.Tasks;
using LinkToolAddin.server;
using ModelContextProtocol.Server;
using Newtonsoft.Json;
namespace LinkToolAddin.client.tool;
public class ArcGisPro
{
[McpServerTool, Description("ArcGIS Pro Tool")]
public static async Task<JsonRpcResultEntity> ArcGisProTool(string toolName, List<string> toolParams)
{
// Call the ArcGIS Pro method and get the result
var result = await server.CallArcGISPro.CallArcGISProTool(toolName, toolParams);
// Serialize the result back to a JSON string
return result;
}
}