Skip to main content
Glama
rafteles2016

MCP Dynamics CRM Server

by rafteles2016

dynamics_list_solution_components

List components within a Dynamics CRM solution to manage schema, track dependencies, and facilitate deployment workflows.

Instructions

Lista componentes de uma solução

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
solutionUniqueNameYesNome único da solução
componentTypeNoFiltrar por tipo de componente

Implementation Reference

  • The handler for dynamics_list_solution_components. It fetches the solution ID first and then lists the components associated with that solution.
    server.tool(
      "dynamics_list_solution_components",
      "Lista componentes de uma solução",
      ListSolutionComponentsSchema.shape,
      async (params: z.infer<typeof ListSolutionComponentsSchema>) => {
        // Get solution ID first
        const solutions = await client.list("solutions", {
          select: ["solutionid"],
          filter: `uniquename eq '${params.solutionUniqueName}'`,
          top: 1,
        });
    
        if (solutions.value.length === 0) {
          return {
            content: [{ type: "text" as const, text: `Solução '${params.solutionUniqueName}' não encontrada.` }],
          };
        }
    
        const solutionId = (solutions.value[0] as Record<string, unknown>).solutionid;
        let filter = `_solutionid_value eq '${solutionId}'`;
        if (params.componentType !== undefined) {
          filter += ` and componenttype eq ${params.componentType}`;
        }
    
        const result = await client.list("solutioncomponents", {
          select: ["solutioncomponentid", "componenttype", "objectid", "rootcomponentbehavior", "ismetadata"],
          filter,
          orderby: "componenttype asc",
        });
    
        const components = result.value.map((c: Record<string, unknown>) => ({
          ...c,
          componentTypeName: COMPONENT_TYPE_NAMES[c.componenttype as number] || `Unknown (${c.componenttype})`,
        }));
    
        return {
          content: [
            {
              type: "text" as const,
              text: `Componentes em ${params.solutionUniqueName}: ${components.length}\n\n${JSON.stringify(components, null, 2)}`,
            },
          ],
        };
      }
    );
  • Input validation schema for dynamics_list_solution_components.
    export const ListSolutionComponentsSchema = z.object({
      solutionUniqueName: z.string().describe("Nome único da solução"),
      componentType: z.number().optional().describe("Filtrar por tipo de componente"),
    });
  • Registration of the tool in the server.tool call.
    "dynamics_list_solution_components",

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