Skip to content

MEAI Tools

Example showing how to create MEAI AIFunction tools for use with any IChatClient.

This example assumes using CVAT; is in scope and apiKey contains your CVAT API key.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
// Create CVAT AIFunction tools for use with any IChatClient.
// These tools allow AI agents to interact with CVAT for
// computer vision annotation workflows.
using var client = new CVATClient(apiKey);

// Create tools for common CVAT operations:
var listProjectsTool = client.AsListProjectsTool();
var getTaskTool = client.AsGetTaskTool();
var listLabelsTool = client.AsListLabelsTool();
var getJobStatusTool = client.AsGetJobStatusTool();

// Verify all tools are created successfully:

// These tools can be passed to any IChatClient implementation:
// var response = await chatClient.GetResponseAsync(
//     "List all annotation projects",
//     new ChatOptions
//     {
//         Tools = [listProjectsTool, getTaskTool, listLabelsTool, getJobStatusTool],
//     });