Skip to main content
Glama
rafteles2016

MCP Dynamics CRM Server

by rafteles2016

dynamics_get_system_jobs

Monitor system jobs in Dynamics CRM to track import, bulk delete, workflow, and other operation statuses with customizable filters.

Instructions

Monitora jobs do sistema (importações, bulk deletes, workflows, etc.)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
statusFilterNoall
topNo
operationTypeNoTipo de operação do job

Implementation Reference

  • The tool "dynamics_get_system_jobs" is registered and its logic implemented here, which queries the Dynamics 'asyncoperations' table.
    server.tool(
      "dynamics_get_system_jobs",
      "Monitora jobs do sistema (importações, bulk deletes, workflows, etc.)",
      GetSystemJobsSchema.shape,
      async (params: z.infer<typeof GetSystemJobsSchema>) => {
        const filters: string[] = [];
        const statusMap: Record<string, number> = {
          waiting: 10, inprogress: 20, succeeded: 30, failed: 31, cancelled: 32,
        };
    
        if (params.statusFilter !== "all") {
          filters.push(`statuscode eq ${statusMap[params.statusFilter]}`);
        }
        if (params.operationType !== undefined) {
          filters.push(`operationtype eq ${params.operationType}`);
        }
    
        const result = await client.list("asyncoperations", {
          select: [
            "asyncoperationid", "name", "operationtype", "statuscode",
            "startedon", "completedon", "executiontimespan", "retrycount",
            "friendlymessage", "primaryentitytype", "createdon",
          ],
          filter: filters.length > 0 ? filters.join(" and ") : undefined,
          orderby: "createdon desc",
          top: params.top,
        });
    
        return {
          content: [
            {
              type: "text" as const,
              text: `## Jobs do Sistema\n\nTotal: ${result.value.length}\n\n${JSON.stringify(result.value, null, 2)}`,
            },
          ],
        };
      }
    );
  • Validation schema for the 'dynamics_get_system_jobs' tool input parameters.
    export const GetSystemJobsSchema = z.object({
      statusFilter: z.enum(["all", "waiting", "inprogress", "succeeded", "failed", "cancelled"]).default("all"),
      top: z.number().default(30),
      operationType: z.number().optional().describe("Tipo de operação do job"),
    });
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. It states the tool monitors system jobs but doesn't explain what 'monitora' entails—e.g., whether it's a read-only operation, if it requires authentication, how results are returned (e.g., pagination, format), or any rate limits. This leaves significant gaps for a tool that likely interacts with system resources.

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 a single, efficient sentence that front-loads the core purpose ('Monitora jobs do sistema') and includes helpful examples ('importações, bulk deletes, workflows, etc.'). There is no wasted verbiage, making it appropriately sized for its content.

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 monitoring system jobs, no annotations, and no output schema, the description is incomplete. It lacks details on behavioral traits (e.g., safety, permissions), output format, and usage context. While concise, it doesn't provide enough information for an agent to confidently invoke this tool without additional assumptions.

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?

The description adds no information about parameters beyond what the input schema provides. With schema description coverage at 33% (only one parameter has a description), the description doesn't compensate for the low coverage. Since there are 3 parameters, the baseline is 3, as the schema provides some documentation but the description adds no value.

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 with the verb 'monitora' (monitors) and specifies the resource as 'jobs do sistema' (system jobs), with examples like imports, bulk deletes, and workflows. It distinguishes itself from siblings like dynamics_get_active_processes or dynamics_get_bulk_operations by focusing specifically on system jobs, though it doesn't explicitly contrast with them.

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 no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites, such as needing specific permissions, or compare it to sibling tools like dynamics_get_active_processes or dynamics_get_bulk_operations, leaving the agent to infer usage context from the tool name alone.

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