Building and customizing solutions using Microsoft 365 Copilot APIs and tools
Copilot Studio can report daily MCP-backed tool executions across agents through environment-level Application Insights telemetry, but it does not currently expose a separate MCP-server invocation counter or documented server-endpoint dimension.
Configure centralized telemetry
Environment-level telemetry is the appropriate scope because it centralizes agent and tool execution across a Copilot Studio environment. It is currently a preview feature and requires:
- A managed Power Platform environment.
- Power Platform administrator or Dynamics 365 administrator privileges.
- An administrator role in the Dataverse environment.
- An Application Insights resource and the prerequisites for exporting data to it. ^1^
Configure it as follows:
- In Power Platform admin center, create an Application Insights export package.
- Set Export type to Copilot Studio, configure the destination Application Insights resource, and save the export.
- Run a test conversation that invokes an MCP tool.
- Allow up to 24 hours for a new configuration to deliver telemetry.
- In Azure portal → Application Insights → Logs, verify:
-
InvokeAgentandExecuteToolrows appear independencies. - Child
ExecuteToolrows share anoperation_Idwith theirInvokeAgentrow. ^2^
-
Before filtering MCP calls, discover the values actually emitted in your environment because the preview schema can evolve:
dependencies
| where timestamp > ago(7d)
| mv-expand Key = bag_keys(customDimensions) to typeof(string)
| summarize Events=make_set(name),
SampleValue=take_any(tostring(customDimensions[Key])) by Key
| order by Key asc
Query daily MCP tool calls by agent
After confirming that gen_ai.tool.type identifies MCP in your data, run:
dependencies
| where timestamp >= ago(90d)
| where name == "ExecuteTool"
| extend AgentName = tostring(customDimensions["gen_ai.agent.name"]),
AgentId = tostring(customDimensions["gen_ai.agent.id"]),
ToolName = tostring(customDimensions["gen_ai.tool.name"]),
ToolType = tostring(customDimensions["gen_ai.tool.type"])
| where ToolType contains "MCP"
| summarize TotalCalls=count(),
SuccessfulCalls=countif(success == true),
FailedCalls=countif(success != true)
by Day=bin(timestamp, 1d), AgentName, AgentId, ToolName, ToolType
| order by Day desc, AgentName asc, TotalCalls desc
This supplies:
- Daily call totals
- Agent name and ID
- MCP tool name/type
- Successful and failed executions
- Historical trends over the selected retention period
The telemetry schema records gen_ai.tool.name, gen_ai.tool.type, call ID, arguments, and result for each ExecuteTool span. The documented fields do not include a distinct MCP server name or endpoint. ^2^
Server-level totals and endpoint identity
Maintain a controlled mapping of ToolName → MCP server → endpoint, then join that mapping into the query. For example:
let McpMap = datatable(ToolName:string, ServerName:string, Endpoint:string)
[
"server-prefix:tool-a", "Finance MCP", "https://mcp.contoso.com",
"server-prefix:tool-b", "Finance MCP", "https://mcp.contoso.com"
];
dependencies
| where name == "ExecuteTool"
| extend ToolName=tostring(customDimensions["gen_ai.tool.name"]),
Agent=tostring(customDimensions["gen_ai.agent.name"])
| join kind=leftouter McpMap on ToolName
| summarize Calls=count(), Success=countif(success == true),
Failures=countif(success != true)
by bin(timestamp, 1d), ServerName, Endpoint, Agent
This counts MCP-backed ExecuteTool spans—not every network request received by the server. Discovery calls, retries, authentication attempts, and connection failures might not correspond one-for-one with those spans. For authoritative HTTP request counts, endpoint-level failures, and retry traffic, instrument the MCP server or its API gateway and correlate requests using available call/trace identifiers.
Dashboard and API options
- Agent Insights Hub provides tool call totals, success/failure counts, success rate, response time, and daily tool trends, with scheduled daily synchronization and historical backfill up to 365 days. It remains tool-level rather than a documented MCP-server/endpoint inventory. ^3^
- For programmatic extraction, query Application Insights logs through Azure Monitor query client libraries or the Application Insights REST API. ^4^
- Application Insights log retention is configurable through the associated Log Analytics workspace; supported log retention ranges from 30 to 730 days. ^5^
Therefore, MCP calls can be distinguished from non-MCP tools through gen_ai.tool.type, subject to validating its emitted values, but Application Insights represents them as individual tool executions, not as a separate server-call entity.
References