Skip to content

Commit e56d69b

Browse files
committed
docs: Link to topic-specific .NET sample project
1 parent 8762bbe commit e56d69b

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

agent-framework/agents/tools/hosted-mcp-tools.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ The sample requires two environment variables:
3434
- `AZURE_FOUNDRY_PROJECT_MODEL_ID`: The model deployment name (defaults to "gpt-4.1-mini")
3535

3636
```csharp
37-
var endpoint = Environment.GetEnvironmentVariable("AZURE_FOUNDRY_PROJECT_ENDPOINT")
37+
var endpoint = Environment.GetEnvironmentVariable("AZURE_FOUNDRY_PROJECT_ENDPOINT")
3838
?? throw new InvalidOperationException("AZURE_FOUNDRY_PROJECT_ENDPOINT is not set.");
3939
var model = Environment.GetEnvironmentVariable("AZURE_FOUNDRY_PROJECT_MODEL_ID") ?? "gpt-4.1-mini";
4040
```
@@ -130,8 +130,8 @@ The agent is invoked with a question and executes using the configured MCP tools
130130
```csharp
131131
AgentSession session = await agent.CreateSessionAsync();
132132
var response = await agent.RunAsync(
133-
"Please summarize the Azure AI Agent documentation related to MCP Tool calling?",
134-
session,
133+
"Please summarize the Azure AI Agent documentation related to MCP Tool calling?",
134+
session,
135135
runOptions);
136136
Console.WriteLine(response);
137137
```
@@ -145,7 +145,7 @@ await persistentAgentsClient.Administration.DeleteAgentAsync(agent.Id);
145145
```
146146

147147
> [!TIP]
148-
> See the [.NET samples](https://github.com/microsoft/agent-framework/tree/main/dotnet/samples) for complete runnable examples.
148+
> See the [.NET Foundry Agent Hosted MCP Sample](https://github.com/microsoft/agent-framework/tree/main/dotnet/samples/02-agents/ModelContextProtocol/FoundryAgent_Hosted_MCP) for a complete runnable example.
149149
150150

151151
::: zone-end
@@ -190,11 +190,11 @@ async def basic_foundry_mcp_example():
190190

191191
# Create agent with hosted MCP tool
192192
agent = client.as_agent(
193-
name="MicrosoftLearnAgent",
193+
name="MicrosoftLearnAgent",
194194
instructions="You answer questions by searching Microsoft Learn content only.",
195195
tools=learn_mcp,
196196
)
197-
197+
198198
# Simple query without approval workflow
199199
result = await agent.run(
200200
"Please summarize the Azure AI Agent documentation related to MCP tool calling?"
@@ -223,7 +223,7 @@ async def multi_tool_mcp_example():
223223
approval_mode="never_require", # Auto-approve documentation searches
224224
)
225225
github_mcp = client.get_mcp_tool(
226-
name="GitHub MCP",
226+
name="GitHub MCP",
227227
url="https://api.github.com/mcp",
228228
approval_mode="always_require", # Require approval for GitHub operations
229229
headers={"Authorization": "Bearer github-token"},
@@ -235,7 +235,7 @@ async def multi_tool_mcp_example():
235235
instructions="You can search documentation and access GitHub repositories.",
236236
tools=[learn_mcp, github_mcp],
237237
)
238-
238+
239239
result = await agent.run(
240240
"Find Azure documentation and also check the latest commits in microsoft/semantic-kernel"
241241
)

0 commit comments

Comments
 (0)