Skip to main content
Glama
rafteles2016

MCP Dynamics CRM Server

by rafteles2016

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
NameRequiredDescriptionDefault
pluginTypeNameNoFiltrar por nome do tipo de plugin
topNoNúmero máximo de registros
correlationIdNoID de correlação específico

Implementation Reference

  • 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)}`,
            },
          ],
        };
      }
    );
  • 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"),
    });
  • Registration of the dynamics_get_plugin_trace_logs tool within the registerPluginTools function.
    server.tool(
      "dynamics_get_plugin_trace_logs",
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. While it states the tool retrieves logs for diagnosis, it doesn't disclose important behavioral traits: whether this is a read-only operation, potential performance impact, authentication requirements, rate limits, or what format/log level the logs provide. For a diagnostic tool with zero annotation coverage, this represents a significant transparency gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise - a single sentence that directly states the tool's purpose. There's zero wasted language, and it's front-loaded with the core functionality. Every word earns its place, making it easy for an agent to quickly understand what the tool does.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of a diagnostic logging tool with no annotations and no output schema, the description is insufficiently complete. It doesn't explain what information the logs contain, how they're formatted, whether they include error details or execution traces, or what the return structure looks like. For a tool that retrieves diagnostic data, users need to understand what kind of diagnostic information they'll receive.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all three parameters with their types and descriptions. The tool description doesn't add any parameter semantics beyond what's in the schema - it doesn't explain how parameters interact, provide examples of pluginTypeName values, or clarify the relationship between correlationId and other filters. With complete schema coverage, the baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Recupera logs de rastreamento de plugins para diagnóstico' (Retrieves plugin trace logs for diagnosis). It specifies the verb ('recupera' - retrieves) and resource ('logs de rastreamento de plugins' - plugin trace logs), and distinguishes from siblings by focusing on diagnostic logs rather than performance metrics or other plugin operations. However, it doesn't explicitly differentiate from similar diagnostic tools like 'dynamics_get_plugin_performance' or 'dynamics_get_slow_plugins'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides minimal usage guidance. It mentions 'para diagnóstico' (for diagnosis), which implies a troubleshooting context, but offers no explicit guidance on when to use this tool versus alternatives like 'dynamics_get_plugin_performance' or 'dynamics_get_slow_plugins'. There's no mention of prerequisites, limitations, or specific diagnostic scenarios where this tool is preferred.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/rafteles2016/mcpDynamics'

If you have feedback or need assistance with the MCP directory API, please join our Discord server