Skip to main content
Glama

appinsights_set_connection

Securely register the D365 F&O environment's Application Insights / Log Analytics connection for the CURRENT session. The client secret is encrypted in memory (AES-256-GCM), never written to disk and never echoed back. Once set, appinsights_query and appinsights_diagnose_slowness use it automatically until it expires or you call appinsights_clear_connection.

HOW TO GET THE VALUES: workspaceId -- the Log Analytics WORKSPACE ID (GUID, not the App Insights app id) behind the Application Insights resource the environment is linked to (D365FO: System administration > Monitoring and Telemetry parameters > Application Insights Registry tab shows the connection string; the workspace id is on that Log Analytics workspace resource's Overview blade in the Azure Portal). tenantId/clientId/clientSecret -- an Entra ID app registration granted the 'Log Analytics Reader' (or 'Monitoring Reader') role on that workspace resource (Azure Portal > workspace > Access control (IAM) > Add role assignment). Read-only -- no write access is ever needed or used.

In a locked server deployment (APPINSIGHTS_LOCK_SERVER_CONFIG=true) this tool is disabled and the server's own environment credentials are used instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
clientIdYesApp registration (client) id (GUID), granted Log Analytics Reader on the workspace.
tenantIdYesEntra (Azure AD) tenant id (GUID).
ttlMinutesNoMinutes the connection stays cached for this session (1-480). Default 60.
workspaceIdYesLog Analytics workspace ID (GUID) behind the linked Application Insights resource.
clientSecretYesApp registration client secret. Encrypted in memory; never logged or persisted.

TDQS

A4.9/5.0
Behavior5/5

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

No annotations are present, so the description carries the full burden. It discloses memory encryption (AES-256-GCM), no disk writes/echoing, session lifetime, automatic consumption by later tools, and the locked-server disable condition. It explicitly states read-only authorization is sufficient and no write access is used.

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 longer than average, but the length is earned: it front-loads the core purpose and security guarantees, then organizes credential acquisition in a clearly headed section. No redundant sentences; the locked-server caveat is a necessary edge case.

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

Completeness5/5

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

For a state-setting tool with no output schema and no annotations, this description covers prerequisites, side effects, lifetime, security, and disabled behavior. It does not detail the success response, but for a registration call that is low-risk and the remaining guidance is sufficient for an agent to invoke it correctly.

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

Parameters5/5

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

Schema covers 100% of parameters, so baseline is 3. The description adds substantial meaning: workspaceId is a GUID not the App Insights app id, with a D365FO UI path; tenant/clientId/clientSecret require an Entra ID app registration with Log Analytics Reader/Monitoring Reader role and no write access. This goes well beyond the schema property descriptions.

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

Purpose5/5

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

States a specific action ('Securely register ... connection for the CURRENT session'), names the resource (D365 F&O environment Application Insights/Log Analytics connection), and differentiates from siblings by explaining that appinsights_query and appinsights_diagnose_slowness will consume it and appinsights_clear_connection will clear it.

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

Usage Guidelines5/5

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

Provides explicit usage context: session-scoped, automatically used by appinsights_query and appinsights_diagnose_slowness, cleared by appinsights_clear_connection or expiry. Also gives a clear exclusion: in locked server deployment with APPINSIGHTS_LOCK_SERVER_CONFIG=true the tool is disabled and server credentials are used instead. It also tells the user how to obtain each credential, which is a form of usage guidance.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

TDQS

A4.1/5.0
Disambiguation4/5

Most tools have distinct purposes and clear triggers, reducing ambiguity. For example, PR-related tools are separated into analysis, listing, commenting, and dependency mapping. However, some overlap exists between find_references, find_extensions, and find_callers, which could confuse an agent without careful descriptions.

Naming Consistency4/5

Tool names follow a consistent snake_case pattern with verb_noun structure within subgroups (e.g., ado_*, find_*, search_*, generate_*). There is no mixing of camelCase or other styles, though the variety of prefixes slightly reduces predictability.

Tool Count3/5

With 38 tools, the server feels slightly over-scoped for its domain. While each tool has a specific function, the number is high compared to typical well-scoped servers (10-15 tools). Some tools like find_references and find_callers could be consolidated.

Completeness4/5

The tool set covers a broad range of D365 F&O development and DevOps tasks, including code search, analysis, security, performance, upgrades, and work item management. Minor gaps exist, such as the absence of direct object modification or batch job management, but the core workflows are well covered.