Skip to main content
Glama
rafteles2016

MCP Dynamics CRM Server

by rafteles2016

dynamics_check_solution_dependencies

Check solution dependencies before removal to identify required components and prevent system issues in Dynamics CRM.

Instructions

Verifica dependências de uma solução antes de remover

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
solutionUniqueNameYesNome único da solução

Implementation Reference

  • Handler function for the dynamics_check_solution_dependencies tool.
      async (params: z.infer<typeof CheckSolutionDependenciesSchema>) => {
        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 as string;
    
        const dependencies = await client.get<{ value: Record<string, unknown>[] }>(
          `solutions(${solutionId})/Microsoft.Dynamics.CRM.RetrieveDependenciesForUninstall()`
        );
    
        return {
          content: [
            {
              type: "text" as const,
              text: `Dependências da solução ${params.solutionUniqueName}: ${dependencies.value?.length || 0}\n\n${JSON.stringify(dependencies.value || [], null, 2)}`,
            },
          ],
        };
      }
    );
  • Schema definition for the tool input validation.
    export const CheckSolutionDependenciesSchema = z.object({
      solutionUniqueName: z.string().describe("Nome único da solução"),
    });
  • Registration of the dynamics_check_solution_dependencies tool within the MCP server.
    server.tool(
      "dynamics_check_solution_dependencies",
      "Verifica dependências de uma solução antes de remover",
      CheckSolutionDependenciesSchema.shape,
      async (params: z.infer<typeof CheckSolutionDependenciesSchema>) => {
        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 as string;
    
        const dependencies = await client.get<{ value: Record<string, unknown>[] }>(
          `solutions(${solutionId})/Microsoft.Dynamics.CRM.RetrieveDependenciesForUninstall()`
        );
    
        return {
          content: [
            {
              type: "text" as const,
              text: `Dependências da solução ${params.solutionUniqueName}: ${dependencies.value?.length || 0}\n\n${JSON.stringify(dependencies.value || [], null, 2)}`,
            },
          ],
        };
      }
    );
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions checking dependencies before removal, which implies a read-only, non-destructive operation, but it does not specify details like whether it requires specific permissions, what the output format is, or if there are rate limits. For a tool with zero annotation coverage, this leaves significant gaps in understanding its behavior and constraints.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear sentence: 'Verifica dependências de uma solução antes de remover'. It is front-loaded with the core purpose and includes the key context ('before removal') without unnecessary words. Every part of the sentence earns its place, making it highly efficient and well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (dependency checking before deletion), the absence of annotations and output schema means the description should provide more behavioral and output details. It adequately states the purpose and implied usage but lacks information on what the check entails, what dependencies are considered, or what the result looks like. With no output schema, the description does not compensate fully, leaving gaps in completeness for safe operation understanding.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, with the parameter 'solutionUniqueName' documented as 'Nome único da solução' (Unique name of the solution). The description does not add any additional meaning or context beyond what the schema provides, such as format examples or constraints. Given the high schema coverage, the baseline score of 3 is appropriate, as the schema handles the parameter documentation adequately.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Verifica dependências de uma solução antes de remover' (Checks dependencies of a solution before removal). It specifies the verb 'verifica' (checks) and the resource 'dependências de uma solução' (dependencies of a solution), making the intent explicit. However, it does not explicitly distinguish this tool from sibling tools like 'dynamics_delete_solution' or 'dynamics_remove_solution_component', which are related to removal operations, so it misses full differentiation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage context by stating 'antes de remover' (before removal), suggesting this tool should be used prior to deletion operations. However, it does not explicitly name when to use it versus alternatives (e.g., 'dynamics_delete_solution' or 'dynamics_remove_solution_component'), nor does it provide exclusions or prerequisites. The guidance is implied but not comprehensive.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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