dynamics_get_plugin_trace_logs
Retrieve plugin trace logs from Dynamics CRM for diagnostic troubleshooting and performance monitoring. Filter by plugin type, correlation ID, or limit results to identify system issues.
Instructions
Recupera logs de rastreamento de plugins para diagnóstico
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pluginTypeName | No | Filtrar por nome do tipo de plugin | |
| top | No | Número máximo de registros | |
| correlationId | No | ID de correlação específico |
Implementation Reference
- src/tools/plugins/index.ts:276-309 (handler)The dynamics_get_plugin_trace_logs tool handler implementation.
server.tool( "dynamics_get_plugin_trace_logs", "Recupera logs de rastreamento de plugins para diagnóstico", GetPluginTraceLogsSchema.shape, async (params: z.infer<typeof GetPluginTraceLogsSchema>) => { const filters: string[] = []; if (params.pluginTypeName) { filters.push(`contains(typename,'${params.pluginTypeName}')`); } if (params.correlationId) { filters.push(`correlationid eq '${params.correlationId}'`); } const result = await client.list("plugintracelogs", { select: [ "plugintracelogid", "typename", "messagename", "performanceexecutionstarttime", "performanceexecutionduration", "operationtype", "messageblock", "exceptiondetails", "correlationid", "depth", "createdon", ], filter: filters.length > 0 ? filters.join(" and ") : undefined, orderby: "createdon desc", top: params.top, }); return { content: [ { type: "text" as const, text: `Logs de plugin encontrados: ${result.value.length}\n\n${JSON.stringify(result.value, null, 2)}`, }, ], }; } ); - src/tools/plugins/index.ts:55-59 (schema)The Zod schema definition for input parameters of dynamics_get_plugin_trace_logs.
export const GetPluginTraceLogsSchema = z.object({ pluginTypeName: z.string().optional().describe("Filtrar por nome do tipo de plugin"), top: z.number().default(20).describe("Número máximo de registros"), correlationId: z.string().optional().describe("ID de correlação específico"), }); - src/tools/plugins/index.ts:276-277 (registration)Registration of the dynamics_get_plugin_trace_logs tool within the registerPluginTools function.
server.tool( "dynamics_get_plugin_trace_logs",