Skip to main content
Glama
rafteles2016

MCP Dynamics CRM Server

by rafteles2016

dynamics_create_view

Create custom views in Microsoft Dynamics CRM by defining entity queries and column layouts using FetchXML and LayoutXML.

Instructions

Cria uma nova view para uma entidade

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
entityLogicalNameYesNome lógico da entidade
nameYesNome da view
descriptionNo
fetchXmlYesFetchXML da query
layoutXmlYesLayoutXML das colunas
solutionUniqueNameNo

Implementation Reference

  • The handler for the dynamics_create_view tool which creates a new savedquery record in Dynamics.
    server.tool(
      "dynamics_create_view",
      "Cria uma nova view para uma entidade",
      CreateViewSchema.shape,
      async (params: z.infer<typeof CreateViewSchema>) => {
        const viewData: Record<string, unknown> = {
          name: params.name,
          description: params.description || "",
          returnedtypecode: params.entityLogicalName,
          fetchxml: params.fetchXml,
          layoutxml: params.layoutXml,
          querytype: 0,
        };
    
        const result = await client.create("savedqueries", viewData);
    
        return {
          content: [
            {
              type: "text" as const,
              text: `View criada com sucesso!\nID: ${result.entityId}\nNome: ${params.name}\nEntidade: ${params.entityLogicalName}`,
            },
          ],
        };
      }
  • Zod schema definition for the dynamics_create_view tool inputs.
    export const CreateViewSchema = z.object({
      entityLogicalName: z.string().describe("Nome lógico da entidade"),
      name: z.string().describe("Nome da view"),
      description: z.string().optional(),
      fetchXml: z.string().describe("FetchXML da query"),
      layoutXml: z.string().describe("LayoutXML das colunas"),
      solutionUniqueName: z.string().optional(),
    });
Behavior2/5

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

With no annotations, the description carries full burden but only states the action without behavioral details. It doesn't mention permissions required, whether this is a destructive operation, rate limits, or what happens on success/failure. For a creation tool, this leaves critical gaps in understanding its behavior.

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, efficient sentence in Portuguese that directly states the tool's purpose without unnecessary words. It's appropriately sized and front-loaded, making it easy to parse quickly.

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

Completeness2/5

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

For a creation tool with 6 parameters, no annotations, and no output schema, the description is inadequate. It doesn't cover behavioral aspects, parameter interactions, or expected outcomes, leaving too much undefined for effective tool use in a complex system like Dynamics.

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?

Schema description coverage is 67% (4 of 6 parameters have descriptions), so the schema provides moderate documentation. The description adds no parameter information beyond the schema, not explaining relationships between parameters like 'fetchXml' and 'layoutXml' or what 'solutionUniqueName' does. Baseline 3 is appropriate given schema coverage.

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 action ('Cria uma nova view') and the target ('para uma entidade'), making the purpose understandable. However, it doesn't differentiate from sibling tools like 'dynamics_get_views' or explain what a 'view' is in this context, preventing a perfect score.

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

Usage Guidelines2/5

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

No guidance is provided on when to use this tool versus alternatives like 'dynamics_update_form' or 'dynamics_get_views'. The description lacks context about prerequisites, dependencies, or typical scenarios for creating a view, offering minimal usage direction.

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