Skip to main content
Glama
rafteles2016

MCP Dynamics CRM Server

by rafteles2016

dynamics_create_web_resource

Create and deploy web resources like HTML, CSS, JavaScript, and images in Microsoft Dynamics CRM to customize interfaces and extend functionality.

Instructions

Cria um novo web resource no Dynamics CRM

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesNome do web resource (ex: new_/scripts/account.js)
displayNameYesNome de exibição
typeYesTipo do web resource
contentNoConteúdo do web resource (texto ou Base64)
descriptionNo
solutionUniqueNameNoNome único da solução para adicionar o recurso
generateTemplateNoGerar template padrão se content não fornecido

Implementation Reference

  • Handler implementation for dynamics_create_web_resource tool.
    server.tool(
      "dynamics_create_web_resource",
      "Cria um novo web resource no Dynamics CRM",
      CreateWebResourceSchema.shape,
      async (params: z.infer<typeof CreateWebResourceSchema>) => {
        let content = params.content;
    
        if (!content && params.generateTemplate) {
          const templateKey = params.type.toLowerCase() as keyof typeof WEB_RESOURCE_TEMPLATES;
          const template = WEB_RESOURCE_TEMPLATES[templateKey];
          if (template) {
            content = typeof template === "string" ? template : template.form || "";
            content = content
              .replace(/{{NAME}}/g, params.name)
              .replace(/{{DISPLAY_NAME}}/g, params.displayName);
          }
        }
    
        const encodedContent = content ? Buffer.from(content).toString("base64") : "";
    
        const data: Record<string, unknown> = {
          name: params.name,
          displayname: params.displayName,
          webresourcetype: TYPE_MAP[params.type],
          content: encodedContent,
          description: params.description || "",
        };
    
        let endpoint = "webresourceset";
        if (params.solutionUniqueName) {
          endpoint += `?SolutionUniqueName='${params.solutionUniqueName}'`;
        }
    
        const result = await client.create(endpoint, data);
    
        return {
          content: [
            {
              type: "text" as const,
              text: `Web resource criado com sucesso!\nID: ${result.entityId}\nNome: ${params.name}\nTipo: ${params.type}${params.solutionUniqueName ? `\nSolução: ${params.solutionUniqueName}` : ""}`,
            },
          ],
        };
      }
    );
  • Zod schema definition for input validation of the dynamics_create_web_resource tool.
    export const CreateWebResourceSchema = z.object({
      name: z.string().describe("Nome do web resource (ex: new_/scripts/account.js)"),
      displayName: z.string().describe("Nome de exibição"),
      type: WebResourceTypeEnum,
      content: z.string().optional().describe("Conteúdo do web resource (texto ou Base64)"),
      description: z.string().optional(),
      solutionUniqueName: z.string().optional().describe("Nome único da solução para adicionar o recurso"),
      generateTemplate: z.boolean().default(false).describe("Gerar template padrão se content não fornecido"),
    });
  • Registration function that exposes the tool to the MCP server.
    export function registerWebResourceTools(
      server: { tool: Function },
      client: DataverseClient
    ) {
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. While 'creates' implies a write operation, the description provides no information about permissions required, whether the operation is idempotent, what happens on failure, or what the response contains. For a creation tool with 7 parameters and no output schema, this is a significant gap in behavioral context.

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 states the core purpose without any wasted words. It's appropriately sized for a tool with good schema documentation and gets straight to the point.

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?

For a creation tool with 7 parameters, no annotations, and no output schema, the description is insufficient. It doesn't explain what happens after creation, whether the resource is immediately available, what permissions are required, or how it integrates with the broader Dynamics CRM workflow. The high schema coverage helps, but the description itself lacks necessary operational context.

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 provides no parameter-specific information beyond what's already in the schema. However, with 86% schema description coverage, the schema does most of the heavy lifting in documenting parameters. The baseline score of 3 reflects adequate parameter documentation through the schema alone, though the description adds no additional semantic context.

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 action ('Cria' - creates) and resource ('um novo web resource no Dynamics CRM'), making the purpose immediately understandable. It doesn't explicitly differentiate from sibling tools like 'dynamics_update_web_resource' or 'dynamics_delete_web_resource', but the verb 'creates' establishes the basic operation type.

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?

No guidance is provided about when to use this tool versus alternatives. There's no mention of prerequisites, when this creation operation is appropriate versus updating existing resources, or how it relates to sibling tools like 'dynamics_generate_web_resource_code' or 'dynamics_publish_web_resource'.

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