Skip to main content
Glama
rafteles2016

MCP Dynamics CRM Server

by rafteles2016

dynamics_list_columns

Retrieve column attributes from Dynamics CRM tables to understand data structure and customize entity fields for development workflows.

Instructions

Lista colunas (atributos) de uma tabela

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
entityLogicalNameYesNome lógico da entidade
customOnlyNo

Implementation Reference

  • The handler implementation for the "dynamics_list_columns" tool, which queries the Dataverse API to fetch column metadata for a specified entity.
    // 4. List Columns
    server.tool(
      "dynamics_list_columns",
      "Lista colunas (atributos) de uma tabela",
      ListColumnsSchema.shape,
      async (params: z.infer<typeof ListColumnsSchema>) => {
        let filter = "";
        if (params.customOnly) {
          filter = "&$filter=IsCustomAttribute eq true";
        }
    
        const result = await client.get<{ value: Record<string, unknown>[] }>(
          `EntityDefinitions(LogicalName='${params.entityLogicalName}')/Attributes?$select=LogicalName,SchemaName,DisplayName,AttributeType,RequiredLevel,Description,IsCustomAttribute${filter}`
        );
    
        return {
          content: [
            {
              type: "text" as const,
              text: `Colunas de ${params.entityLogicalName}: ${result.value.length}\n\n${JSON.stringify(result.value, null, 2)}`,
            },
          ],
        };
      }
    );
  • The input schema definition for the "dynamics_list_columns" tool, defining the required entity name and optional custom filter.
    export const ListColumnsSchema = z.object({
      entityLogicalName: z.string().describe("Nome lógico da entidade"),
      customOnly: z.boolean().default(false),
    });
  • The registration of the "dynamics_list_columns" tool within the server tool registry.
    server.tool(
      "dynamics_list_columns",

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