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
| Name | Required | Description | Default |
|---|---|---|---|
| solutionUniqueName | Yes | Nome único da solução | |
| componentType | No | Filtrar por tipo de componente |
Implementation Reference
- src/tools/solutions/index.ts:215-259 (handler)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)}`, }, ], }; } ); - src/tools/solutions/index.ts:35-38 (schema)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"), }); - src/tools/solutions/index.ts:216-216 (registration)Registration of the tool in the server.tool call.
"dynamics_list_solution_components",