Skip to main content
Glama
rafteles2016

MCP Dynamics CRM Server

by rafteles2016

dynamics_update_web_resource

Update the content of an existing web resource in Microsoft Dynamics CRM by specifying its ID and providing new content, enabling developers to modify CRM components.

Instructions

Atualiza o conteúdo de um web resource existente

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
webResourceIdYesID do web resource
contentYesNovo conteúdo do web resource
descriptionNo

Implementation Reference

  • The handler for the 'dynamics_update_web_resource' tool, which takes a webResourceId, content, and optional description, encodes the content to Base64, and updates the web resource in Dataverse via the DataverseClient.
    server.tool(
      "dynamics_update_web_resource",
      "Atualiza o conteúdo de um web resource existente",
      UpdateWebResourceSchema.shape,
      async (params: z.infer<typeof UpdateWebResourceSchema>) => {
        const encodedContent = Buffer.from(params.content).toString("base64");
        const data: Record<string, unknown> = { content: encodedContent };
        if (params.description) data.description = params.description;
    
        await client.update("webresourceset", params.webResourceId, data);
    
        return {
          content: [
            {
              type: "text" as const,
              text: `Web resource ${params.webResourceId} atualizado com sucesso!`,
            },
          ],
        };
      }
    );
  • The Zod schema (UpdateWebResourceSchema) used to validate inputs for the 'dynamics_update_web_resource' tool.
    export const UpdateWebResourceSchema = z.object({
      webResourceId: z.string().describe("ID do web resource"),
      content: z.string().describe("Novo conteúdo do web resource"),
      description: z.string().optional(),
    });
  • The registration of the 'dynamics_update_web_resource' tool within the registerWebResourceTools function.
    server.tool(
      "dynamics_update_web_resource",
      "Atualiza o conteúdo de um web resource existente",
      UpdateWebResourceSchema.shape,
      async (params: z.infer<typeof UpdateWebResourceSchema>) => {
        const encodedContent = Buffer.from(params.content).toString("base64");
        const data: Record<string, unknown> = { content: encodedContent };
        if (params.description) data.description = params.description;
    
        await client.update("webresourceset", params.webResourceId, data);
    
        return {
          content: [
            {
              type: "text" as const,
              text: `Web resource ${params.webResourceId} atualizado com sucesso!`,
            },
          ],
        };
      }
    );
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 'Atualiza' implies a mutation operation, it doesn't specify permissions required, whether changes are reversible, rate limits, or what happens to the description field when omitted. For a mutation tool with zero annotation coverage, this is insufficient.

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 states the core purpose without unnecessary words. It's appropriately sized and front-loaded with the 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?

For a mutation tool with 3 parameters, no annotations, and no output schema, the description is inadequate. It doesn't explain behavioral aspects (permissions, side effects), doesn't clarify parameter usage (especially the undocumented 'description' field), and provides no information about return values or error conditions.

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 67% (2 of 3 parameters have descriptions). The description mentions 'conteúdo' which maps to the 'content' parameter, adding minimal value. However, it doesn't explain the purpose of the 'description' parameter (which has no schema description) or provide format details for 'webResourceId'. The description doesn't fully compensate for the schema gaps.

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 ('Atualiza' - updates) and the resource ('conteúdo de um web resource existente' - content of an existing web resource). It distinguishes this from creation (dynamics_create_web_resource) and deletion (dynamics_delete_web_resource) tools, but doesn't explicitly differentiate from other update tools like dynamics_update_column or dynamics_update_form.

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 (like needing an existing web resource), when not to use it, or how it differs from related tools like dynamics_publish_web_resources or dynamics_create_web_resource for new resources.

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