db620d33df
dotnet-build-and-test / dotnet-test-functions (push) Has been cancelled
dotnet-build-and-test / paths-filter (push) Has been cancelled
dotnet-build-and-test / dotnet-build (Debug, windows-latest, net9.0) (push) Has been cancelled
dotnet-build-and-test / dotnet-build (Release, ubuntu-latest, net10.0) (push) Has been cancelled
dotnet-build-and-test / dotnet-build (Release, ubuntu-latest, net8.0) (push) Has been cancelled
dotnet-build-and-test / dotnet-build (Release, windows-latest, net472) (push) Has been cancelled
dotnet-build-and-test / dotnet-test (Release, integration, true, ubuntu-latest, net10.0) (push) Has been cancelled
dotnet-build-and-test / dotnet-test (Release, integration, true, windows-latest, net472) (push) Has been cancelled
dotnet-build-and-test / dotnet-foundry-hosted-it (push) Has been cancelled
dotnet-build-and-test / dotnet-build-and-test-check (push) Has been cancelled
dotnet-build-and-test / Integration Test Report (push) Has been cancelled
CodeQL / Analyze (csharp) (push) Has been cancelled
CodeQL / Analyze (python) (push) Has been cancelled
64 lines
1.8 KiB
YAML
64 lines
1.8 KiB
YAML
#
|
|
# This workflow demonstrates invoking MCP tools directly from a declarative workflow.
|
|
# Uses the Foundry MCP server to search AI model details.
|
|
#
|
|
# The workflow:
|
|
# 1. Accepts a model search term as input
|
|
# 2. Invokes the Foundry MCP tool
|
|
# 3. Invokes the Microsoft Learn MCP tool
|
|
# 4. Uses an agent to summarize the results
|
|
#
|
|
# Example input:
|
|
# gpt-5.4-mini
|
|
#
|
|
kind: Workflow
|
|
trigger:
|
|
|
|
kind: OnConversationStart
|
|
id: workflow_invoke_mcp_tool
|
|
actions:
|
|
|
|
# Set the search query from user input or use default
|
|
- kind: SetVariable
|
|
id: set_search_query
|
|
variable: Local.SearchQuery
|
|
value: =System.LastMessage.Text
|
|
|
|
# Invoke MCP search tool on Foundry MCP server
|
|
- kind: InvokeMcpTool
|
|
id: invoke_foundry_search
|
|
serverUrl: https://mcp.ai.azure.com
|
|
serverLabel: azure_mcp_server
|
|
toolName: model_details_get
|
|
conversationId: =System.ConversationId
|
|
arguments:
|
|
modelName: =Local.SearchQuery
|
|
output:
|
|
autoSend: true
|
|
result: Local.FoundrySearchResult
|
|
|
|
# Invoke MCP search tool on Microsoft Learn server
|
|
- kind: InvokeMcpTool
|
|
id: invoke_docs_search
|
|
serverUrl: https://learn.microsoft.com/api/mcp
|
|
serverLabel: microsoft_docs
|
|
toolName: microsoft_docs_search
|
|
conversationId: =System.ConversationId
|
|
arguments:
|
|
query: =Local.SearchQuery
|
|
output:
|
|
autoSend: true
|
|
result: Local.DocsSearchResult
|
|
|
|
# Use the search agent to provide a helpful response based on results
|
|
- kind: InvokeAzureAgent
|
|
id: summarize_results
|
|
agent:
|
|
name: McpSearchAgent
|
|
conversationId: =System.ConversationId
|
|
input:
|
|
messages: =UserMessage("Based on the search results for '" & Local.SearchQuery & "', please provide a helpful summary.")
|
|
output:
|
|
autoSend: true
|
|
result: Local.Summary
|