Skip to main content
Glama
rafteles2016

MCP Dynamics CRM Server

by rafteles2016

dynamics_update_column

Modify column properties in Microsoft Dynamics CRM, including display name, description, required level, and maximum length for existing attributes.

Instructions

Atualiza propriedades de uma coluna existente

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
entityLogicalNameYesNome lógico da entidade
attributeLogicalNameYesNome lógico do atributo
displayNameNo
descriptionNo
requiredLevelNo
maxLengthNo

Implementation Reference

  • The handler function for dynamics_update_column that processes parameters and executes a patch request to the Dynamics API.
    server.tool(
      "dynamics_update_column",
      "Atualiza propriedades de uma coluna existente",
      UpdateColumnSchema.shape,
      async (params: z.infer<typeof UpdateColumnSchema>) => {
        const updateData: Record<string, unknown> = {};
        if (params.displayName) {
          updateData.DisplayName = {
            "@odata.type": "Microsoft.Dynamics.CRM.Label",
            LocalizedLabels: [{ "@odata.type": "Microsoft.Dynamics.CRM.LocalizedLabel", Label: params.displayName, LanguageCode: 1046 }],
          };
        }
        if (params.description) {
          updateData.Description = {
            "@odata.type": "Microsoft.Dynamics.CRM.Label",
            LocalizedLabels: [{ "@odata.type": "Microsoft.Dynamics.CRM.LocalizedLabel", Label: params.description, LanguageCode: 1046 }],
          };
        }
        if (params.requiredLevel) {
          updateData.RequiredLevel = { Value: params.requiredLevel };
        }
        if (params.maxLength !== undefined) {
          updateData.MaxLength = params.maxLength;
        }
    
        await client.patch(
          `EntityDefinitions(LogicalName='${params.entityLogicalName}')/Attributes(LogicalName='${params.attributeLogicalName}')`,
          updateData
        );
    
        return {
          content: [
            {
              type: "text" as const,
              text: `Coluna ${params.attributeLogicalName} atualizada com sucesso!`,
            },
  • The Zod schema definition (UpdateColumnSchema) for the input validation of the dynamics_update_column tool.
    export const UpdateColumnSchema = z.object({
      entityLogicalName: z.string().describe("Nome lógico da entidade"),
      attributeLogicalName: z.string().describe("Nome lógico do atributo"),
      displayName: z.string().optional(),
      description: z.string().optional(),
      requiredLevel: z.enum(["None", "SystemRequired", "ApplicationRequired"]).optional(),
      maxLength: z.number().optional(),
    });

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