Skip to main content
Glama
rafteles2016

MCP Dynamics CRM Server

by rafteles2016

dynamics_get_views

Retrieve entity views from Microsoft Dynamics CRM to access system or personal configurations for development and management workflows.

Instructions

Recupera views de uma entidade

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
entityLogicalNameYesNome lógico da entidade
viewTypeNosystem
viewIdNo

Implementation Reference

  • The tool "dynamics_get_views" is registered and handled directly within src/tools/schema/index.ts. It uses the `client.list` method to fetch views from Dynamics 365, either from `savedqueries` or `userqueries` depending on the `viewType`.
    // 7. Get Views
    server.tool(
      "dynamics_get_views",
      "Recupera views de uma entidade",
      GetViewSchema.shape,
      async (params: z.infer<typeof GetViewSchema>) => {
        const entity = params.viewType === "system" ? "savedqueries" : "userqueries";
        let filter = `returnedtypecode eq '${params.entityLogicalName}'`;
        if (params.viewId) {
          const idField = params.viewType === "system" ? "savedqueryid" : "userqueryid";
          filter += ` and ${idField} eq '${params.viewId}'`;
        }
    
        const result = await client.list(entity, {
          select: params.viewType === "system"
            ? ["savedqueryid", "name", "description", "fetchxml", "layoutxml", "isdefault", "querytype"]
            : ["userqueryid", "name", "description", "fetchxml", "layoutxml"],
          filter,
          orderby: "name asc",
        });
    
        return {
          content: [
            {
              type: "text" as const,
              text: `Views encontradas: ${result.value.length}\n\n${JSON.stringify(result.value, null, 2)}`,
            },
          ],
        };
Behavior1/5

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

No annotations are provided, so the description carries full burden. It only states 'retrieves views' without disclosing behavioral traits like authentication needs, rate limits, pagination, error handling, or what 'retrieves' entails (e.g., returns a list, single view, or metadata). This leaves critical operational details unspecified.

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

Conciseness4/5

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

The description is a single, efficient sentence in Portuguese with no wasted words. It's front-loaded and appropriately sized for its minimal content, though brevity contributes to underspecification rather than clarity.

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?

Given complexity (a read operation with 3 parameters), no annotations, no output schema, and low schema coverage, the description is incomplete. It lacks details on return values, error conditions, and operational context, making it inadequate for reliable tool invocation.

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

Parameters2/5

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

Schema description coverage is 33% (only 'entityLogicalName' has a description), with 3 parameters total. The description adds no parameter semantics beyond the schema—it doesn't explain 'viewType' enum values ('system' vs 'personal') or 'viewId' usage. With low coverage, the description fails to compensate, leaving most parameters poorly documented.

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

Purpose3/5

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

The description 'Recupera views de uma entidade' (Retrieves views of an entity) states a basic purpose with verb+resource, but it's vague about what 'views' are (e.g., data views, UI views, or query views) and doesn't differentiate from sibling tools like 'dynamics_get_forms' or 'dynamics_get_entity_analytics'. It's minimally adequate but lacks specificity.

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. Sibling tools include 'dynamics_get_forms' and 'dynamics_get_entity_analytics', which might retrieve related metadata, but the description offers no context on distinctions, prerequisites, or exclusions.

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