Skip to main content
Glama
rafteles2016

MCP Dynamics CRM Server

by rafteles2016

dynamics_generate_plugin_project

Generate a complete C# plugin project structure for Microsoft Dynamics CRM with .csproj files, classes, and configured plugins for specific entities and events.

Instructions

Gera a estrutura completa de um projeto de plugin C# (.csproj, classes, etc.)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectNameYesNome do projeto
namespaceYesNamespace do projeto
pluginsYesLista de plugins a serem gerados

Implementation Reference

  • Handler implementation for "dynamics_generate_plugin_project" tool which generates a C# plugin project structure, including the .csproj file and associated plugin classes using templates.
    server.tool(
      "dynamics_generate_plugin_project",
      "Gera a estrutura completa de um projeto de plugin C# (.csproj, classes, etc.)",
      z.object({
        projectName: z.string().describe("Nome do projeto"),
        namespace: z.string().describe("Namespace do projeto"),
        plugins: z.array(CreatePluginSchema).describe("Lista de plugins a serem gerados"),
      }).shape,
      async (params: { projectName: string; namespace: string; plugins: z.infer<typeof CreatePluginSchema>[] }) => {
        const csproj = PLUGIN_TEMPLATES.csproj
          .replace(/{{PROJECT_NAME}}/g, params.projectName)
          .replace(/{{NAMESPACE}}/g, params.namespace);
    
        const pluginFiles: string[] = [];
        for (const plugin of params.plugins) {
          const stageValue = STAGE_MAP[plugin.stage] || 40;
          const code = PLUGIN_TEMPLATES.standard
            .replace(/{{NAMESPACE}}/g, params.namespace)
            .replace(/{{CLASS_NAME}}/g, plugin.name)
            .replace(/{{ENTITY_LOGICAL_NAME}}/g, plugin.entityLogicalName)
            .replace(/{{MESSAGE}}/g, plugin.message)
            .replace(/{{STAGE}}/g, String(stageValue))
            .replace(/{{EXECUTION_MODE}}/g, plugin.executionMode === "Synchronous" ? "0" : "1")
            .replace(/{{FILTERING_ATTRIBUTES}}/g, plugin.filteringAttributes || "")
            .replace(/{{DESCRIPTION}}/g, plugin.description || `Plugin ${plugin.name}`)
            .replace(/{{BUSINESS_LOGIC}}/g, plugin.businessLogic || "// TODO: Implement business logic");
          pluginFiles.push(`// File: ${plugin.name}.cs\n${code}`);
        }
    
        return {
          content: [
            {
              type: "text" as const,
              text: `Projeto gerado: **${params.projectName}**\n\n## ${params.projectName}.csproj\n\`\`\`xml\n${csproj}\n\`\`\`\n\n## Plugins\n${pluginFiles.map((f) => `\`\`\`csharp\n${f}\n\`\`\``).join("\n\n")}`,
            },
          ],
        };
      }
    );
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool generates project files but doesn't describe what happens during execution: whether it creates files locally or in a Dynamics environment, if it requires specific permissions, potential side effects (e.g., overwriting existing files), error handling, or output format. For a tool that likely creates multiple files, this is a significant gap in transparency.

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 in Portuguese that directly states the tool's purpose without unnecessary words. It's front-loaded with the core action ('Gera') and specifies the output types. Every part of the sentence contributes essential information.

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 tool's complexity (generating a full C# project with multiple files) and lack of annotations and output schema, the description is insufficient. It doesn't explain the behavioral aspects (e.g., file creation process, location, permissions), output details, or error scenarios. For a tool with 3 parameters and nested objects in 'plugins', more context is needed to guide effective use.

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 fully documents all parameters (projectName, namespace, plugins). The description doesn't add any parameter-specific details beyond what's in the schema, such as examples, constraints, or relationships between parameters. It only implies the parameters are used to generate the project structure. Baseline 3 is appropriate when the schema does the heavy lifting.

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: 'Gera a estrutura completa de um projeto de plugin C# (.csproj, classes, etc.)' which translates to 'Generates the complete structure of a C# plugin project (.csproj, classes, etc.)'. It specifies the verb ('generates'), resource ('C# plugin project'), and output type. However, it doesn't explicitly differentiate from sibling tools like 'dynamics_generate_plugin_code', which might generate code for existing projects rather than full project structures.

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, context (e.g., when starting a new plugin development), or compare it to sibling tools like 'dynamics_generate_plugin_code' or 'dynamics_register_plugin_step'. The agent must infer usage from the purpose 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