Skip to main content
Glama
rafteles2016

MCP Dynamics CRM Server

by rafteles2016

dynamics_list_tables

Retrieve and filter Dynamics CRM entity tables to identify custom or specific data structures for development and integration workflows.

Instructions

Lista tabelas (entidades) do Dynamics CRM

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filterNoFiltro OData
customOnlyNoApenas tabelas customizadas
topNo

Implementation Reference

  • The implementation of the `dynamics_list_tables` tool, including the definition, schema validation, and handler logic.
    server.tool(
      "dynamics_list_tables",
      "Lista tabelas (entidades) do Dynamics CRM",
      ListTablesSchema.shape,
      async (params: z.infer<typeof ListTablesSchema>) => {
        const filters: string[] = [];
        if (params.customOnly) {
          filters.push("IsCustomEntity eq true");
        }
        if (params.filter) {
          filters.push(params.filter);
        }
    
        const result = await client.get<{ value: Record<string, unknown>[] }>(
          `EntityDefinitions?$select=LogicalName,SchemaName,DisplayName,EntitySetName,Description,IsCustomEntity,OwnershipType,PrimaryIdAttribute,PrimaryNameAttribute&$filter=${filters.join(" and ")}&$top=${params.top}`
        );
    
        return {
          content: [
            {
              type: "text" as const,
              text: `Tabelas encontradas: ${result.value.length}\n\n${JSON.stringify(result.value, null, 2)}`,
            },
          ],
        };
      }
    );
  • The Zod schema definition for input validation for the `dynamics_list_tables` tool.
    export const ListTablesSchema = z.object({
      filter: z.string().optional().describe("Filtro OData"),
      customOnly: z.boolean().default(true).describe("Apenas tabelas customizadas"),
      top: z.number().default(50),
    });

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