Skip to content

Commit e2fd2ea

Browse files
committed
refactor tts mcp tool
1 parent 360f1b8 commit e2fd2ea

File tree

13 files changed

+2487
-6394
lines changed

13 files changed

+2487
-6394
lines changed

eng/tools/ToolDescriptionEvaluator/prompts.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,24 @@
99
"List all agents in my Azure AI Foundry resource",
1010
"Show me the available agents in my Azure AI Foundry resource"
1111
],
12+
"foundry_agents_create": [
13+
"Create a new Azure AI Foundry agent using instructions in the active editor"
14+
],
1215
"foundry_agents_query-and-evaluate": [
1316
"Query and evaluate an agent in my Azure AI Foundry resource for task_adherence"
1417
],
18+
"foundry_agents_get-sdk-sample": [
19+
"Create a CLI app that can talk to an Azure AI Foundry Agent using Python SDK"
20+
],
21+
"foundry_threads_create": [
22+
"Create an Azure AI Foundry thread to hold the conversation"
23+
],
24+
"foundry_threads_list": [
25+
"List my AI Foundry threads"
26+
],
27+
"foundry_threads_get-messages": [
28+
"Show me the messages in the AI Foundry thread with id <thread_id>"
29+
],
1530
"foundry_knowledge_index_list": [
1631
"List all knowledge indexes in my AI Foundry project",
1732
"Show me the knowledge indexes in my AI Foundry project"

eng/tools/ToolDescriptionEvaluator/results.md

Lines changed: 1851 additions & 5876 deletions
Large diffs are not rendered by default.

eng/tools/ToolDescriptionEvaluator/tools.json

Lines changed: 267 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3124,6 +3124,79 @@
31243124
}
31253125
]
31263126
},
3127+
{
3128+
"name": "create",
3129+
"description": " Creates an AI Foundry Agent that processes messages according to a given system instruction using an existing AI Foundry model deployment.",
3130+
"command": "foundry agents create",
3131+
"option": [
3132+
{
3133+
"name": "--tenant",
3134+
"description": "The Microsoft Entra ID tenant ID or name. This can be either the GUID identifier or the display name of your Entra ID tenant.",
3135+
"type": "string",
3136+
"required": null
3137+
},
3138+
{
3139+
"name": "--auth-method",
3140+
"description": "Authentication method to use. Options: 'credential' (Azure CLI/managed identity), 'key' (access key), or 'connectionString'.",
3141+
"type": "string",
3142+
"required": null
3143+
},
3144+
{
3145+
"name": "--retry-delay",
3146+
"description": "Initial delay in seconds between retry attempts. For exponential backoff, this value is used as the base.",
3147+
"type": "string",
3148+
"required": null
3149+
},
3150+
{
3151+
"name": "--retry-max-delay",
3152+
"description": "Maximum delay in seconds between retries, regardless of the retry strategy.",
3153+
"type": "string",
3154+
"required": null
3155+
},
3156+
{
3157+
"name": "--retry-max-retries",
3158+
"description": "Maximum number of retry attempts for failed operations before giving up.",
3159+
"type": "string",
3160+
"required": null
3161+
},
3162+
{
3163+
"name": "--retry-mode",
3164+
"description": "Retry strategy to use. 'fixed' uses consistent delays, 'exponential' increases delay between attempts.",
3165+
"type": "string",
3166+
"required": null
3167+
},
3168+
{
3169+
"name": "--retry-network-timeout",
3170+
"description": "Network operation timeout in seconds. Operations taking longer than this will be cancelled.",
3171+
"type": "string",
3172+
"required": null
3173+
},
3174+
{
3175+
"name": "--endpoint",
3176+
"description": "The endpoint URL for the Azure AI Foundry project/service.",
3177+
"type": "string",
3178+
"required": true
3179+
},
3180+
{
3181+
"name": "--model-deployment",
3182+
"description": "Name of the model deployment",
3183+
"type": "string",
3184+
"required": true
3185+
},
3186+
{
3187+
"name": "--agent-name",
3188+
"description": "A human-readable name of the Agent",
3189+
"type": "string",
3190+
"required": true
3191+
},
3192+
{
3193+
"name": "--system-instruction",
3194+
"description": "System instruction for the agent to follow when process messages",
3195+
"type": "string",
3196+
"required": true
3197+
}
3198+
]
3199+
},
31273200
{
31283201
"name": "evaluate",
31293202
"description": "Run agent evaluation on agent data. Requires JSON strings for query, response, and tool definitions.",
@@ -3209,6 +3282,19 @@
32093282
}
32103283
]
32113284
},
3285+
{
3286+
"name": "get-sdk-sample",
3287+
"description": "Get code samples to interact with a Foundry Agent using AI Foundry SDK and programming language of your choice.",
3288+
"command": "foundry agents get-sdk-sample",
3289+
"option": [
3290+
{
3291+
"name": "--programming-language",
3292+
"description": "The programming language of the sdk for interacting with a Foundry Agent. Supported values are csharp, python and typescript.",
3293+
"type": "string",
3294+
"required": true
3295+
}
3296+
]
3297+
},
32123298
{
32133299
"name": "list",
32143300
"description": "List all Azure AI Agents in an Azure AI Foundry project. Shows agents that can be used for AI workflows, \r\nevaluations, and interactive tasks. Requires the project endpoint URL (format: https://<resource>.services.ai.azure.com/api/projects/<project-name>).",
@@ -4169,6 +4255,183 @@
41694255
}
41704256
]
41714257
},
4258+
{
4259+
"name": "create",
4260+
"description": " Creates an AI Foundry Agent Thread that holds the messages between the Agent and the user.",
4261+
"command": "foundry threads create",
4262+
"option": [
4263+
{
4264+
"name": "--tenant",
4265+
"description": "The Microsoft Entra ID tenant ID or name. This can be either the GUID identifier or the display name of your Entra ID tenant.",
4266+
"type": "string",
4267+
"required": null
4268+
},
4269+
{
4270+
"name": "--auth-method",
4271+
"description": "Authentication method to use. Options: 'credential' (Azure CLI/managed identity), 'key' (access key), or 'connectionString'.",
4272+
"type": "string",
4273+
"required": null
4274+
},
4275+
{
4276+
"name": "--retry-delay",
4277+
"description": "Initial delay in seconds between retry attempts. For exponential backoff, this value is used as the base.",
4278+
"type": "string",
4279+
"required": null
4280+
},
4281+
{
4282+
"name": "--retry-max-delay",
4283+
"description": "Maximum delay in seconds between retries, regardless of the retry strategy.",
4284+
"type": "string",
4285+
"required": null
4286+
},
4287+
{
4288+
"name": "--retry-max-retries",
4289+
"description": "Maximum number of retry attempts for failed operations before giving up.",
4290+
"type": "string",
4291+
"required": null
4292+
},
4293+
{
4294+
"name": "--retry-mode",
4295+
"description": "Retry strategy to use. 'fixed' uses consistent delays, 'exponential' increases delay between attempts.",
4296+
"type": "string",
4297+
"required": null
4298+
},
4299+
{
4300+
"name": "--retry-network-timeout",
4301+
"description": "Network operation timeout in seconds. Operations taking longer than this will be cancelled.",
4302+
"type": "string",
4303+
"required": null
4304+
},
4305+
{
4306+
"name": "--endpoint",
4307+
"description": "The endpoint URL for the Azure AI Foundry project/service.",
4308+
"type": "string",
4309+
"required": true
4310+
},
4311+
{
4312+
"name": "--user-message",
4313+
"description": "The user message to add to the thread",
4314+
"type": "string",
4315+
"required": true
4316+
}
4317+
]
4318+
},
4319+
{
4320+
"name": "get-messages",
4321+
"description": " Get messages in an AI Foundry Agent Thread.",
4322+
"command": "foundry threads get-messages",
4323+
"option": [
4324+
{
4325+
"name": "--tenant",
4326+
"description": "The Microsoft Entra ID tenant ID or name. This can be either the GUID identifier or the display name of your Entra ID tenant.",
4327+
"type": "string",
4328+
"required": null
4329+
},
4330+
{
4331+
"name": "--auth-method",
4332+
"description": "Authentication method to use. Options: 'credential' (Azure CLI/managed identity), 'key' (access key), or 'connectionString'.",
4333+
"type": "string",
4334+
"required": null
4335+
},
4336+
{
4337+
"name": "--retry-delay",
4338+
"description": "Initial delay in seconds between retry attempts. For exponential backoff, this value is used as the base.",
4339+
"type": "string",
4340+
"required": null
4341+
},
4342+
{
4343+
"name": "--retry-max-delay",
4344+
"description": "Maximum delay in seconds between retries, regardless of the retry strategy.",
4345+
"type": "string",
4346+
"required": null
4347+
},
4348+
{
4349+
"name": "--retry-max-retries",
4350+
"description": "Maximum number of retry attempts for failed operations before giving up.",
4351+
"type": "string",
4352+
"required": null
4353+
},
4354+
{
4355+
"name": "--retry-mode",
4356+
"description": "Retry strategy to use. 'fixed' uses consistent delays, 'exponential' increases delay between attempts.",
4357+
"type": "string",
4358+
"required": null
4359+
},
4360+
{
4361+
"name": "--retry-network-timeout",
4362+
"description": "Network operation timeout in seconds. Operations taking longer than this will be cancelled.",
4363+
"type": "string",
4364+
"required": null
4365+
},
4366+
{
4367+
"name": "--endpoint",
4368+
"description": "The endpoint URL for the Azure AI Foundry project/service.",
4369+
"type": "string",
4370+
"required": true
4371+
},
4372+
{
4373+
"name": "--thread-id",
4374+
"description": "The Foundry Agent Thread Id",
4375+
"type": "string",
4376+
"required": true
4377+
}
4378+
]
4379+
},
4380+
{
4381+
"name": "list",
4382+
"description": " List AI Foundry Agent Threads.",
4383+
"command": "foundry threads list",
4384+
"option": [
4385+
{
4386+
"name": "--tenant",
4387+
"description": "The Microsoft Entra ID tenant ID or name. This can be either the GUID identifier or the display name of your Entra ID tenant.",
4388+
"type": "string",
4389+
"required": null
4390+
},
4391+
{
4392+
"name": "--auth-method",
4393+
"description": "Authentication method to use. Options: 'credential' (Azure CLI/managed identity), 'key' (access key), or 'connectionString'.",
4394+
"type": "string",
4395+
"required": null
4396+
},
4397+
{
4398+
"name": "--retry-delay",
4399+
"description": "Initial delay in seconds between retry attempts. For exponential backoff, this value is used as the base.",
4400+
"type": "string",
4401+
"required": null
4402+
},
4403+
{
4404+
"name": "--retry-max-delay",
4405+
"description": "Maximum delay in seconds between retries, regardless of the retry strategy.",
4406+
"type": "string",
4407+
"required": null
4408+
},
4409+
{
4410+
"name": "--retry-max-retries",
4411+
"description": "Maximum number of retry attempts for failed operations before giving up.",
4412+
"type": "string",
4413+
"required": null
4414+
},
4415+
{
4416+
"name": "--retry-mode",
4417+
"description": "Retry strategy to use. 'fixed' uses consistent delays, 'exponential' increases delay between attempts.",
4418+
"type": "string",
4419+
"required": null
4420+
},
4421+
{
4422+
"name": "--retry-network-timeout",
4423+
"description": "Network operation timeout in seconds. Operations taking longer than this will be cancelled.",
4424+
"type": "string",
4425+
"required": null
4426+
},
4427+
{
4428+
"name": "--endpoint",
4429+
"description": "The endpoint URL for the Azure AI Foundry project/service.",
4430+
"type": "string",
4431+
"required": true
4432+
}
4433+
]
4434+
},
41724435
{
41734436
"name": "get",
41744437
"description": "Gets Azure Function App details. Lists all Function Apps in the subscription or resource group. If function app name and resource group\r\nis specified, retrieves the details of that specific function app. Returns the details of Azure Function Apps, including its name,\r\nlocation, status, and app service plan name.",
@@ -10704,7 +10967,7 @@
1070410967
},
1070510968
{
1070610969
"name": "--format",
10707-
"description": "Output format: simple or detailed. Default is simple.",
10970+
"description": "Output format: simple or detailed.",
1070810971
"type": "string",
1070910972
"required": null
1071010973
},
@@ -10718,7 +10981,7 @@
1071810981
},
1071910982
{
1072010983
"name": "synthesize",
10721-
"description": "Convert text to speech using Azure AI Services Speech. This command takes text input and generates an audio file using advanced neural text-to-speech capabilities.\nYou must provide an Azure AI Services endpoint (e.g., https://your-service.cognitiveservices.azure.com/), the text to convert, and an output file path.\nOptional parameters include language specification (default: en-US), voice selection, audio output format (default: Riff24Khz16BitMonoPcm), and custom voice endpoint ID.\nThe command supports a wide variety of output formats and neural voices for natural-sounding speech synthesis.",
10984+
"description": "Convert text to speech using Azure AI Services Speech. This command takes text input and generates an audio file using advanced neural text-to-speech capabilities.\r\nYou must provide an Azure AI Services endpoint (e.g., https://your-service.cognitiveservices.azure.com/), the text to convert, and an output file path.\r\nOptional parameters include language specification (default: en-US), voice selection, audio output format (default: Riff24Khz16BitMonoPcm), and custom voice endpoint ID.\r\nThe command supports a wide variety of output formats and neural voices for natural-sounding speech synthesis.",
1072210985
"command": "speech tts synthesize",
1072310986
"option": [
1072410987
{
@@ -10801,7 +11064,7 @@
1080111064
},
1080211065
{
1080311066
"name": "--format",
10804-
"description": "Output format: simple or detailed. Default is simple.",
11067+
"description": "Output format: simple or detailed.",
1080511068
"type": "string",
1080611069
"required": null
1080711070
},
@@ -12999,9 +13262,5 @@
1299913262
}
1300013263
],
1300113264
"consolidated_tools": null,
13002-
<<<<<<< HEAD
13003-
"duration": 47
13004-
=======
13005-
"duration": 49
13006-
>>>>>>> 84ad4f44 (update prompts and tool description evaluator)
13265+
"duration": 55
1300713266
}

tools/Azure.Mcp.Tools.Speech/src/Azure.Mcp.Tools.Speech.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<IsAotCompatible>true</IsAotCompatible>
44
</PropertyGroup>

tools/Azure.Mcp.Tools.Speech/src/Commands/Tts/TtsSynthesizeCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ protected override TtsSynthesizeOptions BindOptions(ParseResult parseResult)
113113
return options;
114114
}
115115

116-
public override async Task<CommandResponse> ExecuteAsync(CommandContext context, ParseResult parseResult)
116+
public override async Task<CommandResponse> ExecuteAsync(CommandContext context, ParseResult parseResult, CancellationToken cancellationToken)
117117
{
118118
if (!Validate(parseResult.CommandResult, context.Response).IsValid)
119119
{

tools/Azure.Mcp.Tools.Speech/src/Services/ISpeechService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Task<SpeechRecognitionResult> RecognizeSpeechFromFile(
1717
string? profanity = null,
1818
RetryPolicyOptions? retryPolicy = null);
1919

20-
Task<Models.SynthesisResult> SynthesizeSpeechToFile(
20+
Task<SynthesisResult> SynthesizeSpeechToFile(
2121
string endpoint,
2222
string text,
2323
string outputFilePath,

0 commit comments

Comments
 (0)