-
Notifications
You must be signed in to change notification settings - Fork 16
mcp_get_plugin_trace_logs
PhuocLe edited this page Jun 20, 2026
·
3 revisions
| Field | Value |
|---|---|
| Tool name | get_plugin_trace_logs |
| MCP title | List and inspect plugin trace logs |
| Category | standard |
| Implementation | DynamicsCrm.DevKit.Cli/Mcp/Tools/GetPluginTraceLogsTool.cs |
| Estimated token count | ~361 tokens (tools/list tool JSON, o200k_base, measured 2026-06-18) |
| Last verified | 2026-06-18 |
Plugin trace logs for debugging plugin/custom action. record_id empty = list (filtered, default last 60 min). Set = detail (full messageblock + exceptiondetails). Requires Plugin Trace Log enabled (System Settings > Customization).
FILTER SEMANTICS: type_name filters plugintracelog.typename (plugin class/type name), NOT the Dataverse table. Use entity_name to filter logs by primary table/entity.
WHEN TO USE:
- Debug failing plugin (list first → detail with record_id for full trace)
- Trace one request across logs (correlation_id)
- Async plugin failures: combine with get_system_jobs
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
record_id |
string |
No | "" |
GUID → detail mode. Empty = list. Use parse_record_url. |
type_name |
string |
No | "" |
Plugin type name (contains). E.g. 'AccountPlugin'. |
entity_name |
string |
No | "" |
Primary table/entity filter, Display Name or logical name. Filters plugintracelog.primaryentity. |
message_name |
string |
No | "" |
SDK message: Create, Update, Delete, etc. |
mode |
string |
No | "" |
'sync' / 'async'. Empty = both. |
correlation_id |
string |
No | "" |
GUID. Trace one request across logs. |
minutes_ago |
integer |
No | 0 |
0 = 60 min default. Max 1440. |
max_records |
integer |
No | 50 |
Max 200. |
{
"type": "object",
"properties": {
"record_id": {
"type": "string",
"description": "GUID → detail mode. Empty = list. Use parse_record_url.",
"default": ""
},
"type_name": {
"type": "string",
"description": "Plugin type name (contains). E.g. 'AccountPlugin'.",
"default": ""
},
"entity_name": {
"type": "string",
"description": "Primary table/entity filter, Display Name or logical name. Filters plugintracelog.primaryentity.",
"default": ""
},
"message_name": {
"type": "string",
"description": "SDK message: Create, Update, Delete, etc.",
"default": ""
},
"mode": {
"type": "string",
"description": "'sync' / 'async'. Empty = both.",
"default": ""
},
"correlation_id": {
"type": "string",
"description": "GUID. Trace one request across logs.",
"default": ""
},
"minutes_ago": {
"type": "integer",
"description": "0 = 60 min default. Max 1440.",
"default": 0
},
"max_records": {
"type": "integer",
"description": "Max 200.",
"default": 50
}
},
"required": []
}| Resource | URI / URI template | MIME type | Reason |
|---|---|---|---|
server_logic_guide |
docs://server_logic_guide |
text/markdown |
Inferred from source: Filtering patterns, list/detail modes, and entity scoping for server-logic tools. Read this when get_plugins, get_workflows, get_flows, etc. returns an error. |
- Debug failing plugin (list first → detail with record_id for full trace)
- Trace one request across logs (correlation_id)
- Async plugin failures: combine with get_system_jobs
- FILTER SEMANTICS: type_name filters plugintracelog.typename (plugin class/type name), NOT the Dataverse table. Use entity_name to filter logs by primary table/entity.
{
"record_id": "string"
}Returns CallToolResult from the MCP server. The response content and structured fields follow the tool implementation and model returned by GetPluginTraceLogsTool.get_plugin_trace_logs.
- "Show recent failed plugin trace logs for Account updates and include correlation IDs."
- "Open this plugin trace log and summarize the exception details."
- "Find trace logs for this plugin type in the last hour and group them by message."