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
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"entityLogicalName": "<entityLogicalName>"
},
"name": "dynamics_list_columns"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| entityLogicalName | Yes | Nome lógico da entidade | |
| customOnly | No |
Implementation Reference
- src/tools/schema/index.ts:305-329 (handler)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)}`, }, ], }; } ); - src/tools/schema/index.ts:50-53 (schema)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), }); - src/tools/schema/index.ts:306-307 (registration)The registration of the "dynamics_list_columns" tool within the server tool registry.
server.tool( "dynamics_list_columns",